Commit ee1f52ee authored by nainar@chromium.org's avatar nainar@chromium.org

Make cssFloat an enumerable property of CSSStyleDeclaration

cssFloat does not show up as an enumerated property of 
CSSStyleDeclaration even though it does evaluate to a value. FF and 
IE both treat cssFloat as an enumerable property of CSSStyleDeclaration

BUG=492999

Review URL: https://codereview.chromium.org/1288623005

git-svn-id: svn://svn.chromium.org/blink/trunk@200965 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 656b425c
<!DOCTYPE html>
<script src="../../LayoutTests/resources/testharness.js"></script>
<script src="../../LayoutTests/resources/testharnessreport.js"></script>
<div id="target"></div>
<script>
addEventListener("load", function() {
test(function() {
assert_true('cssFloat' in getComputedStyle(target), 'cssFloat is in CSSStyleDeclaration');
assert_equals(target.style.cssFloat, '');
target.style.cssFloat = 'right';
assert_equals(target.style.cssFloat, 'right');
var CSSXGetComputedStyleQueries = 566;
assert_false(internals.isUseCounted(document, CSSXGetComputedStyleQueries));
}, 'Testing CSSFloat');
}, false);
</script>
......@@ -79,6 +79,7 @@ colorRendering
content
counterIncrement
counterReset
cssFloat
cssText
cursor
cx
......
......@@ -292,6 +292,7 @@ interface CSSRuleList
method constructor
method item
interface CSSStyleDeclaration
getter cssFloat
getter cssText
getter length
getter parentRule
......@@ -301,6 +302,7 @@ interface CSSStyleDeclaration
method item
method removeProperty
method setProperty
setter cssFloat
setter cssText
interface CSSStyleRule
getter selectorText
......
......@@ -80,6 +80,7 @@ columnFill
content
counterIncrement
counterReset
cssFloat
cssText
cursor
cx
......
......@@ -376,6 +376,7 @@ interface CSSRuleList
method constructor
method item
interface CSSStyleDeclaration
getter cssFloat
getter cssText
getter length
getter parentRule
......@@ -385,6 +386,7 @@ interface CSSStyleDeclaration
method item
method removeProperty
method setProperty
setter cssFloat
setter cssText
interface CSSStyleRule
getter selectorText
......
......@@ -91,6 +91,8 @@ private:
bool isPropertyImplicit(const String& propertyName) override;
void setProperty(const String& propertyName, const String& value, const String& priority, ExceptionState&) override;
String removeProperty(const String& propertyName, ExceptionState&) override;
String cssFloat() const;
void setCSSFloat(const String&, ExceptionState&);
String cssText() const override;
void setCSSText(const String&, ExceptionState&) override;
PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) override;
......
......@@ -47,6 +47,14 @@ public:
#endif
virtual CSSRule* parentRule() const = 0;
String cssFloat()
{
return getPropertyValueInternal(CSSPropertyFloat);
}
void setCSSFloat(const String& value, ExceptionState& exceptionState)
{
setPropertyInternal(CSSPropertyFloat, value, false, exceptionState);
}
virtual String cssText() const = 0;
virtual void setCSSText(const String&, ExceptionState&) = 0;
virtual unsigned length() const = 0;
......
......@@ -36,7 +36,7 @@
// void setPropertyPriority(DOMString property, [TreatNullAs=EmptyString] DOMString priority);
[RaisesException] DOMString removeProperty(DOMString property);
readonly attribute CSSRule? parentRule;
// [TreatNullAs=EmptyString] attribute DOMString cssFloat;
[RaisesException=Setter, TreatNullAs=EmptyString] attribute DOMString cssFloat;
// The camel-cased and dashed attribute getters have custom bindings.
// http://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-camel-cased-attribute
......
......@@ -56,6 +56,8 @@ private:
bool isPropertyImplicit(const String& propertyName) final;
void setProperty(const String& propertyName, const String& value, const String& priority, ExceptionState&) final;
String removeProperty(const String& propertyName, ExceptionState&) final;
String cssFloat() const;
void setCSSFloat(const String&, ExceptionState&);
String cssText() const final;
void setCSSText(const String&, ExceptionState&) final;
PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) final;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment