Title: [135236] trunk
- Revision
- 135236
- Author
- [email protected]
- Date
- 2012-11-19 20:10:46 -0800 (Mon, 19 Nov 2012)
Log Message
[Shadow] attribute pseudo should return empty string instead of null when nothing is specified.
https://bugs.webkit.org/show_bug.cgi?id=102753
Reviewed by Hajime Morita.
Source/WebCore:
The ShadowDOM spec is changed so that attribute 'pseudo' returns empty string instead of null when
no value is set.
Test: fast/dom/shadow/pseudo-attribute.html
* dom/Element.idl:
LayoutTests:
* fast/dom/shadow/pseudo-attribute-expected.txt:
* fast/dom/shadow/pseudo-attribute.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (135235 => 135236)
--- trunk/LayoutTests/ChangeLog 2012-11-20 03:27:50 UTC (rev 135235)
+++ trunk/LayoutTests/ChangeLog 2012-11-20 04:10:46 UTC (rev 135236)
@@ -1,3 +1,13 @@
+2012-11-19 Shinya Kawanaka <[email protected]>
+
+ [Shadow] attribute pseudo should return empty string instead of null when nothing is specified.
+ https://bugs.webkit.org/show_bug.cgi?id=102753
+
+ Reviewed by Hajime Morita.
+
+ * fast/dom/shadow/pseudo-attribute-expected.txt:
+ * fast/dom/shadow/pseudo-attribute.html:
+
2012-11-19 Adam Klein <[email protected]>
MutationObserver wrapper should not be collected while still observing
Modified: trunk/LayoutTests/fast/dom/shadow/pseudo-attribute-expected.txt (135235 => 135236)
--- trunk/LayoutTests/fast/dom/shadow/pseudo-attribute-expected.txt 2012-11-20 03:27:50 UTC (rev 135235)
+++ trunk/LayoutTests/fast/dom/shadow/pseudo-attribute-expected.txt 2012-11-20 04:10:46 UTC (rev 135236)
@@ -1,11 +1,13 @@
This test checks pseudo attribute is exposed correctly.
-PASS div.pseudo is null
+PASS div.pseudo is ''
PASS div.getAttribute('pseudo') is null
PASS div.pseudo is 'foo'
PASS div.getAttribute('pseudo') is 'foo'
PASS div.pseudo is 'bar'
PASS div.getAttribute('pseudo') is 'bar'
+PASS div.pseudo is ''
+PASS div.getAttribute('pseudo') is null
PASS div.pseudo is 'first-letter'
PASS successfullyParsed is true
Modified: trunk/LayoutTests/fast/dom/shadow/pseudo-attribute.html (135235 => 135236)
--- trunk/LayoutTests/fast/dom/shadow/pseudo-attribute.html 2012-11-20 03:27:50 UTC (rev 135235)
+++ trunk/LayoutTests/fast/dom/shadow/pseudo-attribute.html 2012-11-20 04:10:46 UTC (rev 135236)
@@ -10,7 +10,7 @@
<script>
var div = document.createElement('div');
-shouldBe("div.pseudo", "null");
+shouldBe("div.pseudo", "''");
shouldBe("div.getAttribute('pseudo')", "null");
div.setAttribute("pseudo", "foo");
@@ -21,6 +21,10 @@
shouldBe("div.pseudo", "'bar'");
shouldBe("div.getAttribute('pseudo')", "'bar'");
+div.removeAttribute('pseudo');
+shouldBe("div.pseudo", "''");
+shouldBe("div.getAttribute('pseudo')", "null");
+
// Checks pseudo accepts known pseudo-element word.
div.pseudo = 'first-letter';
shouldBe("div.pseudo", "'first-letter'");
Modified: trunk/Source/WebCore/ChangeLog (135235 => 135236)
--- trunk/Source/WebCore/ChangeLog 2012-11-20 03:27:50 UTC (rev 135235)
+++ trunk/Source/WebCore/ChangeLog 2012-11-20 04:10:46 UTC (rev 135236)
@@ -1,3 +1,17 @@
+2012-11-19 Shinya Kawanaka <[email protected]>
+
+ [Shadow] attribute pseudo should return empty string instead of null when nothing is specified.
+ https://bugs.webkit.org/show_bug.cgi?id=102753
+
+ Reviewed by Hajime Morita.
+
+ The ShadowDOM spec is changed so that attribute 'pseudo' returns empty string instead of null when
+ no value is set.
+
+ Test: fast/dom/shadow/pseudo-attribute.html
+
+ * dom/Element.idl:
+
2012-11-19 Kentaro Hara <[email protected]>
In CodeGeneratorGObject.pm we should rename $dataNode to $interface
Modified: trunk/Source/WebCore/dom/Element.idl (135235 => 135236)
--- trunk/Source/WebCore/dom/Element.idl 2012-11-20 03:27:50 UTC (rev 135235)
+++ trunk/Source/WebCore/dom/Element.idl 2012-11-20 04:10:46 UTC (rev 135236)
@@ -120,7 +120,7 @@
readonly attribute unsigned long childElementCount;
#if defined(ENABLE_SHADOW_DOM)
- [TreatReturnedNullStringAs=Null, V8EnabledAtRuntime=shadowDOM] attribute DOMString pseudo;
+ [Reflect, V8EnabledAtRuntime=shadowDOM] attribute DOMString pseudo;
#endif
// DOM 4
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes