Title: [145448] trunk
Revision
145448
Author
[email protected]
Date
2013-03-11 18:08:34 -0700 (Mon, 11 Mar 2013)

Log Message

Hit testing should use ancestorInThisScope to get the non-shadow ancestor
https://bugs.webkit.org/show_bug.cgi?id=112068

Patch by Christian Biesinger <[email protected]> on 2013-03-11
Reviewed by Dimitri Glazkov.

Source/WebCore:

Tests: media/nodesFromRect-shadowContent.html

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::setToNonShadowAncestor):
(WebCore::HitTestResult::addNodeToRectBasedTestResult):
Use ancestorInThisScope which is not deprecated and which produces
correct results for nested shadow trees (e.g. in case of <video>,
which contains <input> elements for the controls, which themselves
have shadow trees)

LayoutTests:

* media/nodesFromRect-shadowContent.html: Extend the hit testing rect
to guarantee reaching a nested shadow tree.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (145447 => 145448)


--- trunk/LayoutTests/ChangeLog	2013-03-12 01:07:10 UTC (rev 145447)
+++ trunk/LayoutTests/ChangeLog	2013-03-12 01:08:34 UTC (rev 145448)
@@ -1,3 +1,13 @@
+2013-03-11  Christian Biesinger  <[email protected]>
+
+        Hit testing should use ancestorInThisScope to get the non-shadow ancestor
+        https://bugs.webkit.org/show_bug.cgi?id=112068
+
+        Reviewed by Dimitri Glazkov.
+
+        * media/nodesFromRect-shadowContent.html: Extend the hit testing rect
+        to guarantee reaching a nested shadow tree.
+
 2013-03-11  James Robinson  <[email protected]>
 
         More chromium layer tree rebaselines for r145422

Modified: trunk/LayoutTests/media/nodesFromRect-shadowContent.html (145447 => 145448)


--- trunk/LayoutTests/media/nodesFromRect-shadowContent.html	2013-03-12 01:07:10 UTC (rev 145447)
+++ trunk/LayoutTests/media/nodesFromRect-shadowContent.html	2013-03-12 01:08:34 UTC (rev 145448)
@@ -33,7 +33,7 @@
       var clickX = playCoords[0];
       var clickY = playCoords[1];
 
-      check(clickX, clickY, 10, 10, 20, 20, [e.v1, e.body]);
+      check(clickX, clickY, 100, 100, 20, 20, [e.v1, e.body]);
 
       var shadow =['-webkit-media-controls-timeline-container', '-webkit-media-controls-play-button', '-webkit-media-controls-panel', '-webkit-media-controls'];
       checkShadowContent(clickX, clickY, 10, 10, 20, 20, shadow);

Modified: trunk/Source/WebCore/ChangeLog (145447 => 145448)


--- trunk/Source/WebCore/ChangeLog	2013-03-12 01:07:10 UTC (rev 145447)
+++ trunk/Source/WebCore/ChangeLog	2013-03-12 01:08:34 UTC (rev 145448)
@@ -1,3 +1,20 @@
+2013-03-11  Christian Biesinger  <[email protected]>
+
+        Hit testing should use ancestorInThisScope to get the non-shadow ancestor
+        https://bugs.webkit.org/show_bug.cgi?id=112068
+
+        Reviewed by Dimitri Glazkov.
+
+        Tests: media/nodesFromRect-shadowContent.html
+
+        * rendering/HitTestResult.cpp:
+        (WebCore::HitTestResult::setToNonShadowAncestor):
+        (WebCore::HitTestResult::addNodeToRectBasedTestResult):
+        Use ancestorInThisScope which is not deprecated and which produces
+        correct results for nested shadow trees (e.g. in case of <video>,
+        which contains <input> elements for the controls, which themselves
+        have shadow trees)
+
 2013-03-11  Abhishek Arya  <[email protected]>
 
         Replace static_cast with to* helper functions.

Modified: trunk/Source/WebCore/rendering/HitTestResult.cpp (145447 => 145448)


--- trunk/Source/WebCore/rendering/HitTestResult.cpp	2013-03-12 01:07:10 UTC (rev 145447)
+++ trunk/Source/WebCore/rendering/HitTestResult.cpp	2013-03-12 01:08:34 UTC (rev 145448)
@@ -115,11 +115,11 @@
 {
     Node* node = innerNode();
     if (node)
-        node = node->deprecatedShadowAncestorNode();
+        node = node->document()->ancestorInThisScope(node);
     setInnerNode(node);
     node = innerNonSharedNode();
     if (node)
-        node = node->deprecatedShadowAncestorNode();
+        node = node->document()->ancestorInThisScope(node);
     setInnerNonSharedNode(node);
 }
 
@@ -557,7 +557,7 @@
         return true;
 
     if (!request.allowsShadowContent())
-        node = node->deprecatedShadowAncestorNode();
+        node = node->document()->ancestorInThisScope(node);
 
     mutableRectBasedTestResult().add(node);
 
@@ -577,7 +577,7 @@
         return true;
 
     if (!request.allowsShadowContent())
-        node = node->deprecatedShadowAncestorNode();
+        node = node->document()->ancestorInThisScope(node);
 
     mutableRectBasedTestResult().add(node);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to