Modified: trunk/LayoutTests/ChangeLog (118319 => 118320)
--- trunk/LayoutTests/ChangeLog 2012-05-24 03:59:41 UTC (rev 118319)
+++ trunk/LayoutTests/ChangeLog 2012-05-24 04:23:25 UTC (rev 118320)
@@ -1,3 +1,13 @@
+2012-05-23 Hayato Ito <[email protected]>
+
+ Add a test case of event dispatching which uses inactive insertion points.
+ https://bugs.webkit.org/show_bug.cgi?id=87229
+
+ Reviewed by Darin Adler.
+
+ * fast/dom/shadow/shadow-dom-event-dispatching-expected.txt:
+ * fast/dom/shadow/shadow-dom-event-dispatching.html:
+
2012-05-23 Shinya Kawanaka <[email protected]>
Document.elementFromPoint exposes inner element of Shadow DOM.
Modified: trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching-expected.txt (118319 => 118320)
--- trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching-expected.txt 2012-05-24 03:59:41 UTC (rev 118319)
+++ trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching-expected.txt 2012-05-24 04:23:25 UTC (rev 118320)
@@ -295,6 +295,32 @@
mouseover
@top (target: top) (related: shadow-host)
+
+
+Composed Shadow Tree will be:
+DIV id=sandbox
+ DIV id=top
+ DIV id=A
+ DIV id=B
+ DIV id=parent-of-inactive-content
+ CONTENT id=inactive-content
+ DIV id=child-of-inactive-content
+
+
+Moving mouse from A to child-of-inactive-content
+
+ mouseout
+ @A (target: A) (related: child-of-inactive-content)
+ @top (target: A) (related: child-of-inactive-content)
+
+ mouseover
+ @child-of-inactive-content (target: child-of-inactive-content) (related: A)
+ @inactive-content (target: child-of-inactive-content) (related: A)
+ @parent-of-inactive-content (target: child-of-inactive-content) (related: A)
+ @active-content (target: active-content) (related: A)
+ @shadow-root-B (target: active-content) (related: A)
+ @B (target: child-of-inactive-content) (related: A)
+ @top (target: child-of-inactive-content) (related: A)
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching.html (118319 => 118320)
--- trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching.html 2012-05-24 03:59:41 UTC (rev 118319)
+++ trunk/LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching.html 2012-05-24 04:23:25 UTC (rev 118320)
@@ -88,7 +88,8 @@
var node = getNodeInShadowTreeStack(nodes[i]);
node.addEventListener('mouseover', recordEvent, false);
node.addEventListener('mouseout', recordEvent, false);
- if (node.tagName == 'DIV' || node.tagName == 'DETAILS' || node.tagName == 'SUMMARY')
+ // <content> might be an inactive insertion point, so style it also.
+ if (node.tagName == 'DIV' || node.tagName == 'DETAILS' || node.tagName == 'SUMMARY' || node.tagName == 'CONTENT')
node.setAttribute('style', 'padding-top: ' + defaultPaddingSize + 'px;');
}
}
@@ -205,7 +206,25 @@
debug('\n\nComposed Shadow Tree will be:\n' + dumpComposedShadowTree(parent));
}
+function prepareDOMTree7(parent)
+{
+ parent.appendChild(
+ createDOM('div', {'id': 'top'},
+ createDOM('div', {'id': 'A'}),
+ createDOM('div', {'id': 'B'},
+ createShadowRoot(
+ createDOM('content', {'id': 'active-content', 'select': '#parent-of-inactive-content'})),
+ createDOM('div', {'id': 'parent-of-inactive-content'},
+ createDOM('content', {'id': 'inactive-content'},
+ createDOM('div', {'id': 'child-of-inactive-content'}))))));
+ addEventListeners(['top', 'A', 'B', 'B/', 'B/active-content',
+ 'parent-of-inactive-content', 'inactive-content', 'child-of-inactive-content']);
+ getNodeInShadowTreeStack('B/').id = 'shadow-root-B';
+ parent.offsetLeft;
+ debug('\n\nComposed Shadow Tree will be:\n' + dumpComposedShadowTree(parent));
+}
+
function debugDispatchedEvent(eventType)
{
debug('\n ' + eventType);
@@ -293,6 +312,11 @@
debugDispatchedEvent('mouseover');
sandbox.innerHTML = '';
+ prepareDOMTree7(sandbox);
+
+ moveMouse('A', 'child-of-inactive-content');
+
+ sandbox.innerHTML = '';
}
test();