[webkit-changes] cvs commit: WebCore/manual-tests scrollbar-hittest.html

Vicki vicki at opensource.apple.com
Tue Nov 29 11:49:03 PST 2005


vicki       05/11/29 11:49:03

  Modified:    .        ChangeLog
               khtml/rendering render_layer.cpp
  Added:       manual-tests scrollbar-hittest.html
  Log:
  	Changes by Mitz Pettel, reviewed by Maciej.
  
  	- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5829 (REGRESSION: cursor tracking and hit
  	testing in scrollable block don't take borders into account)
  
  	* khtml/rendering/render_layer.cpp:
          (khtml::RenderLayer::hitTestLayer): don't add left and bottom borders when hit testing
  	* manual-tests/scrollbar-hittest.html: Added.
  
  Revision  Changes    Path
  1.429     +11 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.428
  retrieving revision 1.429
  diff -u -r1.428 -r1.429
  --- ChangeLog	29 Nov 2005 17:52:53 -0000	1.428
  +++ ChangeLog	29 Nov 2005 19:48:58 -0000	1.429
  @@ -1,3 +1,14 @@
  +2005-11-29  Vicki Murley  <vicki at apple.com>
  +
  +	Changes by Mitz Pettel, reviewed by Maciej.
  +
  +	- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5829 (REGRESSION: cursor tracking and hit 
  +	testing in scrollable block don't take borders into account)
  +
  +	* khtml/rendering/render_layer.cpp:
  +        (khtml::RenderLayer::hitTestLayer): don't add left and bottom borders when hit testing
  +	* manual-tests/scrollbar-hittest.html: Added.
  +
   2005-11-29  Darin Adler  <darin at apple.com>
   
           Reviewed by Maciej.
  
  
  
  1.126     +4 -4      WebCore/khtml/rendering/render_layer.cpp
  
  Index: render_layer.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_layer.cpp,v
  retrieving revision 1.125
  retrieving revision 1.126
  diff -u -r1.125 -r1.126
  --- render_layer.cpp	21 Nov 2005 01:20:25 -0000	1.125
  +++ render_layer.cpp	29 Nov 2005 19:49:02 -0000	1.126
  @@ -1114,8 +1114,8 @@
       // Next we want to see if the mouse pos is inside the child RenderObjects of the layer.
       if (containsPoint(xMousePos, yMousePos, fgRect) && 
           renderer()->hitTest(info, xMousePos, yMousePos,
  -                            layerBounds.x() - renderer()->xPos() + m_object->borderLeft(),
  -                            layerBounds.y() - renderer()->yPos() + m_object->borderTopExtra() - m_object->borderBottom(), HitTestDescendants)) {
  +                            layerBounds.x() - renderer()->xPos(),
  +                            layerBounds.y() - renderer()->yPos() + m_object->borderTopExtra(), HitTestDescendants)) {
           // for positioned generated content, we might still not have a
           // node by the time we get to the layer level, since none of
           // the content in the layer has an element. So just walk up
  @@ -1154,8 +1154,8 @@
       // Next we want to see if the mouse pos is inside this layer but not any of its children.
       if (containsPoint(xMousePos, yMousePos, bgRect) &&
           renderer()->hitTest(info, xMousePos, yMousePos,
  -                            layerBounds.x() - renderer()->xPos() + m_object->borderLeft(),
  -                            layerBounds.y() - renderer()->yPos() + m_object->borderTopExtra() - m_object->borderBottom(),
  +                            layerBounds.x() - renderer()->xPos(),
  +                            layerBounds.y() - renderer()->yPos() + m_object->borderTopExtra(),
                               HitTestSelf))
           return this;
   
  
  
  
  1.1                  WebCore/manual-tests/scrollbar-hittest.html
  
  Index: scrollbar-hittest.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
          "http://www.w3.org/TR/html4/strict.dtd">
  <html lang="en">
  <head>
  </head>
  <body>
  <p><b>BUG ID:</b> <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=5829">http://bugzilla.opendarwin.org/show_bug.cgi?id=5829</a> REGRESSION: cursor tracking and hit testing in scrollable block don't take borders into account</p>
  
  <p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b> <br>
  1. Scroll down by clicking in the empty space below the scroll thumb.  <br>
  2. Scroll up by clicking in the empty space above the scroll thumb.</p>
  
  <p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b> 
  Scroll thumb will move back up to the top.
  </p>
  
  <p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>  
  Scroll thumb will NOT move back up to the top.
  </p>
  
      <div style="overflow: auto; height:300px; width:50px; border-bottom: solid red 50px; border-top: solid green 20px;">
          <div style="height:400px;"></div>
      </div>
      
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list