Skip to content
  • bweinstein@apple.com's avatar
    b8133c38
    Fixes <http://webkit.org/b/32613>. · b8133c38
    bweinstein@apple.com authored
    REGRESSION (r52008): Middle-clicking on a linked image starts a pan scroll,
    but should follow the link instead.
    
    Reviewed by Adam Roben.
    
    WebCore: 
    
    The node itself isn't the only possible node that can be a link (that was the
    original check), any of its ancestors could be links as well, we need to climb
    up the tree to see. Created a new function (enclosingAnchorNode), that finds a
    node's enclosing anchor element (if it exists), that we can share between RenderLayer
    and Node, and also added tests that test pan scrolling behavior in image maps.
    
    Tests: platform/win/fast/events/panScroll-image-no-scroll.html
           platform/win/fast/events/panScroll-imageMap-href-no-scroll.html
           platform/win/fast/events/panScroll-imageMap-noHref-scroll.html
    
    * dom/Node.cpp:
    (WebCore::Node::enclosingAnchorNode):
    (WebCore::Node::defaultEventHandler):
    * dom/Node.h:
    * rendering/RenderLayer.cpp:
    (WebCore::RenderLayer::hitTest):
    
    LayoutTests: 
    
    Added tests that test pan scrolling behavior when you middle click on images with
    links, and if you click on parts on image maps that are links, and that aren't.
    
    * platform/win/fast/events/panScroll-image-no-scroll-expected.txt: Added.
    * platform/win/fast/events/panScroll-image-no-scroll.html: Added.
    * platform/win/fast/events/panScroll-imageMap-href-no-scroll-expected.txt: Added.
    * platform/win/fast/events/panScroll-imageMap-href-no-scroll.html: Added.
    * platform/win/fast/events/panScroll-imageMap-noHref-scroll-expected.txt: Added.
    * platform/win/fast/events/panScroll-imageMap-noHref-scroll.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b8133c38
    Fixes <http://webkit.org/b/32613>.
    bweinstein@apple.com authored
    REGRESSION (r52008): Middle-clicking on a linked image starts a pan scroll,
    but should follow the link instead.
    
    Reviewed by Adam Roben.
    
    WebCore: 
    
    The node itself isn't the only possible node that can be a link (that was the
    original check), any of its ancestors could be links as well, we need to climb
    up the tree to see. Created a new function (enclosingAnchorNode), that finds a
    node's enclosing anchor element (if it exists), that we can share between RenderLayer
    and Node, and also added tests that test pan scrolling behavior in image maps.
    
    Tests: platform/win/fast/events/panScroll-image-no-scroll.html
           platform/win/fast/events/panScroll-imageMap-href-no-scroll.html
           platform/win/fast/events/panScroll-imageMap-noHref-scroll.html
    
    * dom/Node.cpp:
    (WebCore::Node::enclosingAnchorNode):
    (WebCore::Node::defaultEventHandler):
    * dom/Node.h:
    * rendering/RenderLayer.cpp:
    (WebCore::RenderLayer::hitTest):
    
    LayoutTests: 
    
    Added tests that test pan scrolling behavior when you middle click on images with
    links, and if you click on parts on image maps that are links, and that aren't.
    
    * platform/win/fast/events/panScroll-image-no-scroll-expected.txt: Added.
    * platform/win/fast/events/panScroll-image-no-scroll.html: Added.
    * platform/win/fast/events/panScroll-imageMap-href-no-scroll-expected.txt: Added.
    * platform/win/fast/events/panScroll-imageMap-href-no-scroll.html: Added.
    * platform/win/fast/events/panScroll-imageMap-noHref-scroll-expected.txt: Added.
    * platform/win/fast/events/panScroll-imageMap-noHref-scroll.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Loading