<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>107165</bug_id>
          
          <creation_ts>2013-01-17 13:08:08 -0800</creation_ts>
          <short_desc>Traverse the layer tree instead of the render tree in closestScrollableNodeInDocumentIfPossible()</short_desc>
          <delta_ts>2013-03-01 10:39:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>UI Events</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Terry Anderson">tdanderson</reporter>
          <assigned_to name="Terry Anderson">tdanderson</assigned_to>
          <cc>rjkroege</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>809677</commentid>
    <comment_count>0</comment_count>
    <who name="Terry Anderson">tdanderson</who>
    <bug_when>2013-01-17 13:08:08 -0800</bug_when>
    <thetext>Consider Antonio&apos;s comment from https://bugs.webkit.org/show_bug.cgi?id=103952#c59:

&gt; Source/WebCore/page/EventHandler.cpp:2613
&gt; +    for (Node* scrollableNode = node; scrollableNode; scrollableNode = scrollableNode-&gt;parentNode()) {
&gt; +        if (scrollableNode-&gt;isDocumentNode())
&gt; +            break;
&gt; +        RenderObject* renderer = scrollableNode-&gt;renderer();
&gt; +        if (renderer &amp;&amp; renderer-&gt;isBox() &amp;&amp; toRenderBox(renderer)-&gt;canBeScrolledAndHasScrollableArea())
&gt; +            return scrollableNode;
&gt; +    }

It would be faster (sometimes measurably faster) if instead of traversing the Render tree upwards, you traversed the Layer tree, given that any scrollable renderer will have an associated  RenderLayer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>809687</commentid>
    <comment_count>1</comment_count>
    <who name="Terry Anderson">tdanderson</who>
    <bug_when>2013-01-17 13:15:49 -0800</bug_when>
    <thetext>I should also re-consider Antonio&apos;s comment regarding a possibly-redundant boolean member variable:

&gt; Source/WebCore/page/EventHandler.cpp:2633
&gt; +    m_lastHitTestResultOverWidget = result.isOverWidget(); 

I do not think you need this m_lastHitTestResultOverWidget boolean. The Renderer can tell you this as well no? RenderObject::isWidget()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>845296</commentid>
    <comment_count>2</comment_count>
    <who name="Terry Anderson">tdanderson</who>
    <bug_when>2013-03-01 10:39:53 -0800</bug_when>
    <thetext>The function closestScrollableNodeCandidate() in EventHandler.cpp is being removed in https://bugs.webkit.org/show_bug.cgi?id=109769 since we&apos;re no longer going to be using it, so this issue is no longer valid.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>