Title: [167240] trunk
- Revision
- 167240
- Author
- r...@igalia.com
- Date
- 2014-04-14 04:21:49 -0700 (Mon, 14 Apr 2014)
Log Message
[JSC] CSSStyleDeclaration report incorrect descriptor
https://bugs.webkit.org/show_bug.cgi?id=89697
Reviewed by Benjamin Poulain.
Source/WebCore:
Change descriptor of CSSStyleDeclaration properties in order to have
writable and enumerable attributes set to true. Configurable is kept to
false since the property is not deleteable.
Test: fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor.html
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate): Only set
DontDelete attribute when creating the descriptor for
CSSStyleDeclaration properties.
LayoutTests:
Add new test to check the descriptor of CSSStyleDeclaration properties.
* fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor-expected.txt: Added.
* fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (167239 => 167240)
--- trunk/LayoutTests/ChangeLog 2014-04-14 11:20:37 UTC (rev 167239)
+++ trunk/LayoutTests/ChangeLog 2014-04-14 11:21:49 UTC (rev 167240)
@@ -1,3 +1,15 @@
+2014-04-14 Manuel Rego Casasnovas <r...@igalia.com>
+
+ [JSC] CSSStyleDeclaration report incorrect descriptor
+ https://bugs.webkit.org/show_bug.cgi?id=89697
+
+ Reviewed by Benjamin Poulain.
+
+ Add new test to check the descriptor of CSSStyleDeclaration properties.
+
+ * fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor-expected.txt: Added.
+ * fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor.html: Added.
+
2014-04-14 Benjamin Poulain <benja...@webkit.org>
CSS JIT: compile the :nth-child() pseudo class
Added: trunk/LayoutTests/fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor-expected.txt (0 => 167240)
--- trunk/LayoutTests/fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor-expected.txt 2014-04-14 11:21:49 UTC (rev 167240)
@@ -0,0 +1,12 @@
+This tests the descriptor of CSSStyleDeclaration properties.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS descriptor['writable'] is true
+PASS descriptor['enumerable'] is true
+PASS descriptor['configurable'] is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor.html (0 => 167240)
--- trunk/LayoutTests/fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor.html (rev 0)
+++ trunk/LayoutTests/fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor.html 2014-04-14 11:21:49 UTC (rev 167240)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <script src=""
+ <script>
+ description("This tests the descriptor of CSSStyleDeclaration properties.");
+
+ var descriptor = Object.getOwnPropertyDescriptor(document.body.style, 'color');
+ shouldBeTrue("descriptor['writable']");
+ shouldBeTrue("descriptor['enumerable']");
+ shouldBeFalse("descriptor['configurable']");
+ </script>
+ <script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (167239 => 167240)
--- trunk/Source/WebCore/ChangeLog 2014-04-14 11:20:37 UTC (rev 167239)
+++ trunk/Source/WebCore/ChangeLog 2014-04-14 11:21:49 UTC (rev 167240)
@@ -1,3 +1,21 @@
+2014-04-14 Manuel Rego Casasnovas <r...@igalia.com>
+
+ [JSC] CSSStyleDeclaration report incorrect descriptor
+ https://bugs.webkit.org/show_bug.cgi?id=89697
+
+ Reviewed by Benjamin Poulain.
+
+ Change descriptor of CSSStyleDeclaration properties in order to have
+ writable and enumerable attributes set to true. Configurable is kept to
+ false since the property is not deleteable.
+
+ Test: fast/dom/CSSStyleDeclaration/cssstyledeclaration-properties-descriptor.html
+
+ * bindings/js/JSCSSStyleDeclarationCustom.cpp:
+ (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate): Only set
+ DontDelete attribute when creating the descriptor for
+ CSSStyleDeclaration properties.
+
2014-04-14 Benjamin Poulain <benja...@webkit.org>
[JSC] Improve the call site of string comparison in some hot path
Modified: trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp (167239 => 167240)
--- trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp 2014-04-14 11:20:37 UTC (rev 167239)
+++ trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp 2014-04-14 11:21:49 UTC (rev 167240)
@@ -336,9 +336,9 @@
return false;
if (propertyInfo.hadPixelOrPosPrefix)
- slot.setCustomIndex(this, ReadOnly | DontDelete | DontEnum, static_cast<unsigned>(propertyInfo.propertyID), cssPropertyGetterPixelOrPosPrefixCallback);
+ slot.setCustomIndex(this, DontDelete, static_cast<unsigned>(propertyInfo.propertyID), cssPropertyGetterPixelOrPosPrefixCallback);
else
- slot.setCustomIndex(this, ReadOnly | DontDelete | DontEnum, static_cast<unsigned>(propertyInfo.propertyID), cssPropertyGetterCallback);
+ slot.setCustomIndex(this, DontDelete, static_cast<unsigned>(propertyInfo.propertyID), cssPropertyGetterCallback);
return true;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes