Changeset 145448 in webkit


Ignore:
Timestamp:
Mar 11, 2013, 6:08:34 PM (12 years ago)
Author:
commit-queue@webkit.org
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 <cbiesinger@chromium.org> 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.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r145445 r145448  
     12013-03-11  Christian Biesinger  <cbiesinger@chromium.org>
     2
     3        Hit testing should use ancestorInThisScope to get the non-shadow ancestor
     4        https://bugs.webkit.org/show_bug.cgi?id=112068
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        * media/nodesFromRect-shadowContent.html: Extend the hit testing rect
     9        to guarantee reaching a nested shadow tree.
     10
    1112013-03-11  James Robinson  <jamesr@chromium.org>
    212
  • trunk/LayoutTests/media/nodesFromRect-shadowContent.html

    r122473 r145448  
    3434      var clickY = playCoords[1];
    3535
    36       check(clickX, clickY, 10, 10, 20, 20, [e.v1, e.body]);
     36      check(clickX, clickY, 100, 100, 20, 20, [e.v1, e.body]);
    3737
    3838      var shadow =['-webkit-media-controls-timeline-container', '-webkit-media-controls-play-button', '-webkit-media-controls-panel', '-webkit-media-controls'];
  • trunk/Source/WebCore/ChangeLog

    r145444 r145448  
     12013-03-11  Christian Biesinger  <cbiesinger@chromium.org>
     2
     3        Hit testing should use ancestorInThisScope to get the non-shadow ancestor
     4        https://bugs.webkit.org/show_bug.cgi?id=112068
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        Tests: media/nodesFromRect-shadowContent.html
     9
     10        * rendering/HitTestResult.cpp:
     11        (WebCore::HitTestResult::setToNonShadowAncestor):
     12        (WebCore::HitTestResult::addNodeToRectBasedTestResult):
     13        Use ancestorInThisScope which is not deprecated and which produces
     14        correct results for nested shadow trees (e.g. in case of <video>,
     15        which contains <input> elements for the controls, which themselves
     16        have shadow trees)
     17
    1182013-03-11  Abhishek Arya  <inferno@chromium.org>
    219
  • trunk/Source/WebCore/rendering/HitTestResult.cpp

    r144743 r145448  
    116116    Node* node = innerNode();
    117117    if (node)
    118         node = node->deprecatedShadowAncestorNode();
     118        node = node->document()->ancestorInThisScope(node);
    119119    setInnerNode(node);
    120120    node = innerNonSharedNode();
    121121    if (node)
    122         node = node->deprecatedShadowAncestorNode();
     122        node = node->document()->ancestorInThisScope(node);
    123123    setInnerNonSharedNode(node);
    124124}
     
    558558
    559559    if (!request.allowsShadowContent())
    560         node = node->deprecatedShadowAncestorNode();
     560        node = node->document()->ancestorInThisScope(node);
    561561
    562562    mutableRectBasedTestResult().add(node);
     
    578578
    579579    if (!request.allowsShadowContent())
    580         node = node->deprecatedShadowAncestorNode();
     580        node = node->document()->ancestorInThisScope(node);
    581581
    582582    mutableRectBasedTestResult().add(node);
Note: See TracChangeset for help on using the changeset viewer.