Title: [117421] trunk
- Revision
- 117421
- Author
- shin...@chromium.org
- Date
- 2012-05-17 02:55:59 -0700 (Thu, 17 May 2012)
Log Message
ShadowRoot.selection should be ShadowRoot.getSelection()
https://bugs.webkit.org/show_bug.cgi?id=86598
Reviewed by Hajime Morita.
Source/WebCore:
In the latest spec, ShadowRoot.selection is changed to ShadowRoot.getSelection().
So update the implementation.
* dom/ShadowRoot.cpp:
* dom/ShadowRoot.h:
(ShadowRoot):
* dom/ShadowRoot.idl:
LayoutTests:
In the latest spec, ShadowRoot.selection is changed to ShadowRoot.getSelection().
So update the tests.
* editing/shadow/selection-of-orphan-shadowroot.html:
* editing/shadow/selection-of-shadowroot.html: Removed unnecessary code to
call ShadowRoot.selection by using ShadowRoot.getSelection(). Now ShadowRoot.getSelection()
can be called directly.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (117420 => 117421)
--- trunk/LayoutTests/ChangeLog 2012-05-17 09:30:51 UTC (rev 117420)
+++ trunk/LayoutTests/ChangeLog 2012-05-17 09:55:59 UTC (rev 117421)
@@ -1,3 +1,18 @@
+2012-05-17 Shinya Kawanaka <shin...@chromium.org>
+
+ ShadowRoot.selection should be ShadowRoot.getSelection()
+ https://bugs.webkit.org/show_bug.cgi?id=86598
+
+ Reviewed by Hajime Morita.
+
+ In the latest spec, ShadowRoot.selection is changed to ShadowRoot.getSelection().
+ So update the tests.
+
+ * editing/shadow/selection-of-orphan-shadowroot.html:
+ * editing/shadow/selection-of-shadowroot.html: Removed unnecessary code to
+ call ShadowRoot.selection by using ShadowRoot.getSelection(). Now ShadowRoot.getSelection()
+ can be called directly.
+
2012-05-17 MORITA Hajime <morr...@google.com>
Unreviewed, marking tests which need rebaselining after r117412.
Modified: trunk/LayoutTests/editing/shadow/selection-of-orphan-shadowroot.html (117420 => 117421)
--- trunk/LayoutTests/editing/shadow/selection-of-orphan-shadowroot.html 2012-05-17 09:30:51 UTC (rev 117420)
+++ trunk/LayoutTests/editing/shadow/selection-of-orphan-shadowroot.html 2012-05-17 09:55:59 UTC (rev 117421)
@@ -17,7 +17,7 @@
var shadowRoot = new WebKitShadowRoot(host);
shadowRoot.innerHTML = "Kotori Otonashi"
-var selection = shadowRoot.selection;
+var selection = shadowRoot.getSelection();
shouldBe('selection.anchorNode', 'null');
shouldBe('selection.focusNode', 'null');
Modified: trunk/LayoutTests/editing/shadow/selection-of-shadowroot.html (117420 => 117421)
--- trunk/LayoutTests/editing/shadow/selection-of-shadowroot.html 2012-05-17 09:30:51 UTC (rev 117420)
+++ trunk/LayoutTests/editing/shadow/selection-of-shadowroot.html 2012-05-17 09:55:59 UTC (rev 117421)
@@ -66,14 +66,6 @@
var container = document.getElementById('container');
createComplexShadowTree(container);
-for (var k = 0; k < treeScopes.length; ++k) {
- if (!treeScopes[k].getSelection) {
- treeScopes[k].getSelection = (function(self, k) {
- return function() { return self.selection; }
- })(treeScopes[k], k);
- }
-}
-
debug('In this test, we create a complex Shadow DOM and try to drag from a div in nested shadow root of older shadow root to a div in nested shadow root of younger shadow root. Then we get selection from the following TreeScopes:');
for (var k = 0; k < treeScopes.length; ++k) {
if (treeScopes[k] == document)
Modified: trunk/Source/WebCore/ChangeLog (117420 => 117421)
--- trunk/Source/WebCore/ChangeLog 2012-05-17 09:30:51 UTC (rev 117420)
+++ trunk/Source/WebCore/ChangeLog 2012-05-17 09:55:59 UTC (rev 117421)
@@ -1,5 +1,20 @@
2012-05-17 Shinya Kawanaka <shin...@chromium.org>
+ ShadowRoot.selection should be ShadowRoot.getSelection()
+ https://bugs.webkit.org/show_bug.cgi?id=86598
+
+ Reviewed by Hajime Morita.
+
+ In the latest spec, ShadowRoot.selection is changed to ShadowRoot.getSelection().
+ So update the implementation.
+
+ * dom/ShadowRoot.cpp:
+ * dom/ShadowRoot.h:
+ (ShadowRoot):
+ * dom/ShadowRoot.idl:
+
+2012-05-17 Shinya Kawanaka <shin...@chromium.org>
+
[Refactoring] Remove TreeScopeAdjuster
https://bugs.webkit.org/show_bug.cgi?id=86599
Modified: trunk/Source/WebCore/dom/ShadowRoot.cpp (117420 => 117421)
--- trunk/Source/WebCore/dom/ShadowRoot.cpp 2012-05-17 09:30:51 UTC (rev 117420)
+++ trunk/Source/WebCore/dom/ShadowRoot.cpp 2012-05-17 09:55:59 UTC (rev 117421)
@@ -149,11 +149,6 @@
replaceChildrenWithFragment(this, fragment.release(), ec);
}
-DOMSelection* ShadowRoot::selection() const
-{
- return getSelection();
-}
-
bool ShadowRoot::childTypeAllowed(NodeType type) const
{
switch (type) {
Modified: trunk/Source/WebCore/dom/ShadowRoot.h (117420 => 117421)
--- trunk/Source/WebCore/dom/ShadowRoot.h 2012-05-17 09:30:51 UTC (rev 117420)
+++ trunk/Source/WebCore/dom/ShadowRoot.h 2012-05-17 09:55:59 UTC (rev 117421)
@@ -76,8 +76,6 @@
Element* activeElement() const;
- DOMSelection* selection() const;
-
ShadowRoot* youngerShadowRoot() const { return prev(); }
ShadowRoot* olderShadowRoot() const { return next(); }
Modified: trunk/Source/WebCore/dom/ShadowRoot.idl (117420 => 117421)
--- trunk/Source/WebCore/dom/ShadowRoot.idl 2012-05-17 09:30:51 UTC (rev 117420)
+++ trunk/Source/WebCore/dom/ShadowRoot.idl 2012-05-17 09:55:59 UTC (rev 117421)
@@ -34,12 +34,12 @@
] ShadowRoot : DocumentFragment {
readonly attribute Element host;
readonly attribute Element activeElement;
- readonly attribute DOMSelection selection;
attribute boolean applyAuthorStyles;
attribute [TreatNullAs=NullString] DOMString innerHTML
setter raises(DOMException);
+ DOMSelection getSelection();
Element getElementById(in [Optional=DefaultIsUndefined] DOMString elementId);
NodeList getElementsByClassName(in [Optional=DefaultIsUndefined] DOMString className);
NodeList getElementsByTagName(in [Optional=DefaultIsUndefined] DOMString tagName);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes