Diff
Modified: trunk/LayoutTests/ChangeLog (111504 => 111505)
--- trunk/LayoutTests/ChangeLog 2012-03-21 05:50:30 UTC (rev 111504)
+++ trunk/LayoutTests/ChangeLog 2012-03-21 07:06:04 UTC (rev 111505)
@@ -1,3 +1,20 @@
+2012-03-21 Kaustubh Atrawalkar <[email protected]>
+
+ Rename getElementInShadowTreeStack to getNodeInShadowTreeStack
+ https://bugs.webkit.org/show_bug.cgi?id=81324
+
+ Since getElementInShadowTreeStack returns ShadowRoot as well which is not an element
+ it should be renamed to getNodeInShadowTreeStack.
+
+ Reviewed by Hajime Morita.
+
+ * fast/dom/shadow/access-key.html:
+ * fast/dom/shadow/get-element-by-id-in-shadow-root-expected.txt:
+ * fast/dom/shadow/get-element-by-id-in-shadow-root.html:
+ * fast/dom/shadow/resources/shadow-dom.js:
+ (getNodeInShadowTreeStack):
+ * fast/dom/shadow/shadow-boundary-events.html:
+
2012-03-20 Keishi Hattori <[email protected]>
Adding MISSING to platform/qt for platform/qt/plugins/application-plugin-plugins-disabled.html
Modified: trunk/LayoutTests/fast/dom/shadow/access-key.html (111504 => 111505)
--- trunk/LayoutTests/fast/dom/shadow/access-key.html 2012-03-21 05:50:30 UTC (rev 111504)
+++ trunk/LayoutTests/fast/dom/shadow/access-key.html 2012-03-21 07:06:04 UTC (rev 111505)
@@ -61,7 +61,7 @@
'shadowC/inputD', 'shadowC/inputE',
'shadowC/shadowF/inputG'];
for (var i = 0; i < ids.length; ++i) {
- var element = getElementInShadowTreeStack(ids[i]);
+ var element = getNodeInShadowTreeStack(ids[i]);
element.addEventListener('focus', recordEvent, false);
}
}
@@ -82,12 +82,12 @@
pressAccessKey('a');
shouldBe('dispatchedEvent("focus")', '["inputE"]');
- getElementInShadowTreeStack('shadowC/inputD').focus();
+ getNodeInShadowTreeStack('shadowC/inputD').focus();
clearEventRecords();
pressAccessKey('a');
shouldBe('dispatchedEvent("focus")', '["inputE"]');
- getElementInShadowTreeStack('shadowC/shadowF/inputG').focus();
+ getNodeInShadowTreeStack('shadowC/shadowF/inputG').focus();
clearEventRecords();
pressAccessKey('a');
shouldBe('dispatchedEvent("focus")', '["inputE"]');
Modified: trunk/LayoutTests/fast/dom/shadow/get-element-by-id-in-shadow-root-expected.txt (111504 => 111505)
--- trunk/LayoutTests/fast/dom/shadow/get-element-by-id-in-shadow-root-expected.txt 2012-03-21 05:50:30 UTC (rev 111504)
+++ trunk/LayoutTests/fast/dom/shadow/get-element-by-id-in-shadow-root-expected.txt 2012-03-21 07:06:04 UTC (rev 111505)
@@ -3,11 +3,11 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS getElementInShadowTreeStack('divA/inputB').id is "inputB"
-PASS getElementInShadowTreeStack('divA/divC').id is "divC"
-PASS getElementInShadowTreeStack('divA/divC/inputD').id is "inputD"
-PASS getElementInShadowTreeStack('divA/divC//inputE').id is "inputE"
-PASS getElementInShadowTreeStack('divA/divC///inputF').id is "inputF"
+PASS getNodeInShadowTreeStack('divA/inputB').id is "inputB"
+PASS getNodeInShadowTreeStack('divA/divC').id is "divC"
+PASS getNodeInShadowTreeStack('divA/divC/inputD').id is "inputD"
+PASS getNodeInShadowTreeStack('divA/divC//inputE').id is "inputE"
+PASS getNodeInShadowTreeStack('divA/divC///inputF').id is "inputF"
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/shadow/get-element-by-id-in-shadow-root.html (111504 => 111505)
--- trunk/LayoutTests/fast/dom/shadow/get-element-by-id-in-shadow-root.html 2012-03-21 05:50:30 UTC (rev 111504)
+++ trunk/LayoutTests/fast/dom/shadow/get-element-by-id-in-shadow-root.html 2012-03-21 07:06:04 UTC (rev 111505)
@@ -29,11 +29,11 @@
layoutTestController.dumpAsText();
prepareDomTree(document.body);
- shouldBeEqualToString("getElementInShadowTreeStack('divA/inputB').id", 'inputB');
- shouldBeEqualToString("getElementInShadowTreeStack('divA/divC').id", 'divC');
- shouldBeEqualToString("getElementInShadowTreeStack('divA/divC/inputD').id", 'inputD');
- shouldBeEqualToString("getElementInShadowTreeStack('divA/divC//inputE').id", 'inputE');
- shouldBeEqualToString("getElementInShadowTreeStack('divA/divC///inputF').id", 'inputF');
+ shouldBeEqualToString("getNodeInShadowTreeStack('divA/inputB').id", 'inputB');
+ shouldBeEqualToString("getNodeInShadowTreeStack('divA/divC').id", 'divC');
+ shouldBeEqualToString("getNodeInShadowTreeStack('divA/divC/inputD').id", 'inputD');
+ shouldBeEqualToString("getNodeInShadowTreeStack('divA/divC//inputE').id", 'inputE');
+ shouldBeEqualToString("getNodeInShadowTreeStack('divA/divC///inputF').id", 'inputF');
}
test();
Modified: trunk/LayoutTests/fast/dom/shadow/resources/shadow-dom.js (111504 => 111505)
--- trunk/LayoutTests/fast/dom/shadow/resources/shadow-dom.js 2012-03-21 05:50:30 UTC (rev 111504)
+++ trunk/LayoutTests/fast/dom/shadow/resources/shadow-dom.js 2012-03-21 07:06:04 UTC (rev 111505)
@@ -42,7 +42,7 @@
// You can spefify youngerShadowRoot by consecutive slashes.
// See LayoutTests/fast/dom/shadow/get-element-by-id-in-shadow-root.html for actual usages.
-function getElementInShadowTreeStack(path)
+function getNodeInShadowTreeStack(path)
{
var ids = path.split('/');
var node = document.getElementById(ids[0]);
Modified: trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events.html (111504 => 111505)
--- trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events.html 2012-03-21 05:50:30 UTC (rev 111504)
+++ trunk/LayoutTests/fast/dom/shadow/shadow-boundary-events.html 2012-03-21 07:06:04 UTC (rev 111505)
@@ -89,7 +89,7 @@
'shadowD/shadowF/shadowG/divH', 'shadowD/shadowF/shadowG/divI',
'shadowD/divJ', 'shadowD/shadowK', 'shadowD/shadowK/divL'];
for (var i = 0; i < ids.length; ++i) {
- var element = getElementInShadowTreeStack(ids[i]);
+ var element = getNodeInShadowTreeStack(ids[i]);
element.addEventListener('mouseover', recordEvent, false);
element.addEventListener('mouseout', recordEvent, false);
element.addEventListener('focusin', recordEvent, false);
@@ -102,17 +102,17 @@
function moveMouse(oldElementId, newElementId, message)
{
debug('\n' + message + '\n' + 'Moving mouse from ' + oldElementId + ' to ' + newElementId);
- moveMouseOver(getElementInShadowTreeStack(oldElementId));
+ moveMouseOver(getNodeInShadowTreeStack(oldElementId));
clearEventRecords();
- moveMouseOver(getElementInShadowTreeStack(newElementId));
+ moveMouseOver(getNodeInShadowTreeStack(newElementId));
}
function moveFocus(oldElementId, newElementId, message)
{
debug('\n' + message + '\n' + 'Moving focus from ' + oldElementId + ' to ' + newElementId);
- getElementInShadowTreeStack(oldElementId).focus();
+ getNodeInShadowTreeStack(oldElementId).focus();
clearEventRecords();
- getElementInShadowTreeStack(newElementId).focus();
+ getNodeInShadowTreeStack(newElementId).focus();
}
function test()