[webkit-changes] cvs commit: LayoutTests/fast/overflow overflow-text-hit-testing-expected.checksum overflow-text-hit-testing-expected.png overflow-text-hit-testing-expected.txt overflow-text-hit-testing.html

Adele adele at opensource.apple.com
Wed Dec 14 10:46:05 PST 2005


adele       05/12/14 10:46:05

  Modified:    .        ChangeLog
               khtml/rendering render_text.cpp
               .        ChangeLog
  Added:       fast/overflow overflow-text-hit-testing-expected.checksum
                        overflow-text-hit-testing-expected.png
                        overflow-text-hit-testing-expected.txt
                        overflow-text-hit-testing.html
  Log:
  LayoutTests:
  
           Layout test for <http://bugzilla.opendarwin.org/show_bug.cgi?id=5921>
           Hit-testing text in overflows does not take scrolling into account.
  
           * fast/overflow/overflow-text-hit-testing-expected.checksum: Added.
           * fast/overflow/overflow-text-hit-testing-expected.png: Added.
           * fast/overflow/overflow-text-hit-testing-expected.txt: Added.
           * fast/overflow/overflow-text-hit-testing.html: Added.
  
  WebCore:
  
           Reviewed by Darin & Geoff, committed by Adele.
  
           Test: fast/overflow/overflow-text-hit-testing.html
  
           Fix for <http://bugzilla.opendarwin.org/show_bug.cgi?id=5921>
           Hit-testing text in overflows does not take scrolling into account.
  
           * khtml/rendering/render_text.cpp:
           (RenderText::positionForCoordinates): Adjust for containing block scroll
  
  Revision  Changes    Path
  1.529     +12 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.528
  retrieving revision 1.529
  diff -u -r1.528 -r1.529
  --- ChangeLog	14 Dec 2005 18:19:02 -0000	1.528
  +++ ChangeLog	14 Dec 2005 18:45:58 -0000	1.529
  @@ -1,3 +1,15 @@
  +2005-12-14  Mitz Pettel  <opendarwin.org at mitzpettel.com>
  + 
  +         Reviewed by Darin & Geoff, committed by Adele.
  +         
  +         Test: fast/overflow/overflow-text-hit-testing.html
  + 
  +         Fix for <http://bugzilla.opendarwin.org/show_bug.cgi?id=5921>
  +         Hit-testing text in overflows does not take scrolling into account.
  + 
  +         * khtml/rendering/render_text.cpp:
  +         (RenderText::positionForCoordinates): Adjust for containing block scroll
  +         
   2005-12-14 Alexey Proskuryakov  <ap at nypop.com>
   
           Reviewed by Darin, committed by Adele.
  
  
  
  1.210     +4 -1      WebCore/khtml/rendering/render_text.cpp
  
  Index: render_text.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_text.cpp,v
  retrieving revision 1.209
  retrieving revision 1.210
  diff -u -r1.209 -r1.210
  --- render_text.cpp	2 Dec 2005 03:48:08 -0000	1.209
  +++ render_text.cpp	14 Dec 2005 18:46:03 -0000	1.210
  @@ -945,7 +945,10 @@
           return VisiblePosition(element(), 0, DOWNSTREAM);
   
       int absx, absy;
  -    containingBlock()->absolutePosition(absx, absy);
  +    RenderBlock *cb = containingBlock();
  +    cb->absolutePosition(absx, absy);
  +    if (cb->hasOverflowClip())
  +        cb->layer()->subtractScrollOffset(absx, absy);
   
       if (firstTextBox() && _y < absy + firstTextBox()->root()->bottomOverflow() && _x < absx + firstTextBox()->m_x) {
           // at the y coordinate of the first line or above
  
  
  
  1.152     +10 -0     LayoutTests/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/LayoutTests/ChangeLog,v
  retrieving revision 1.151
  retrieving revision 1.152
  diff -u -r1.151 -r1.152
  --- ChangeLog	14 Dec 2005 07:48:40 -0000	1.151
  +++ ChangeLog	14 Dec 2005 18:46:03 -0000	1.152
  @@ -1,3 +1,13 @@
  +2005-12-14  Mitz Pettel  <opendarwin.org at mitzpettel.com>
  +
  +         Layout test for <http://bugzilla.opendarwin.org/show_bug.cgi?id=5921>
  +         Hit-testing text in overflows does not take scrolling into account.
  + 
  +         * fast/overflow/overflow-text-hit-testing-expected.checksum: Added.
  +         * fast/overflow/overflow-text-hit-testing-expected.png: Added.
  +         * fast/overflow/overflow-text-hit-testing-expected.txt: Added.
  +         * fast/overflow/overflow-text-hit-testing.html: Added.
  +
   2005-12-13  Adele Peterson  <adele at apple.com>
   
           Reviewed by Maciej.
  
  
  
  1.1                  LayoutTests/fast/overflow/overflow-text-hit-testing-expected.checksum
  
  Index: overflow-text-hit-testing-expected.checksum
  ===================================================================
  1c422d6003e64c3f080ef788ab07e758
  
  
  1.1                  LayoutTests/fast/overflow/overflow-text-hit-testing-expected.png
  
  	<<Binary file>>
  
  
  1.1                  LayoutTests/fast/overflow/overflow-text-hit-testing-expected.txt
  
  Index: overflow-text-hit-testing-expected.txt
  ===================================================================
  EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 40 of #text > DIV > BODY > HTML > #document to 40 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
  EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  layer at (0,0) size 800x600
    RenderCanvas at (0,0) size 800x600
  layer at (0,0) size 800x600
    RenderBlock {HTML} at (0,0) size 800x600
      RenderBody {BODY} at (0,0) size 800x584
        RenderBlock {HR} at (0,41) size 800x2 [border: (1px inset #000000)]
        RenderBlock {P} at (0,59) size 800x54
          RenderText {TEXT} at (0,0) size 207x18
            text run at (0,0) width 207: "This tests for regressions against "
          RenderInline {I} at (0,0) size 789x36
            RenderText {TEXT} at (207,0) size 789x36
              text run at (207,0) width 448: "http://bugzilla.opendarwin.org/show_bug.cgi?id=5921 Hit-testing text "
              text run at (655,0) width 134: "in overflows does not"
              text run at (0,18) width 167: "take scrolling into account"
          RenderText {TEXT} at (167,18) size 765x36
            text run at (167,18) width 82: " by scrolling "
            text run at (249,18) width 409: "the above text all the way to the right, clicking the last letter, and "
            text run at (658,18) width 107: "verifying that the"
            text run at (0,36) width 291: "correct caret position is reported to the editing "
            text run at (291,36) width 56: "delegate."
  layer at (0,0) size 210x33 clip at (0,0) size 210x18 scrollX 33 scrollWidth 243
    RenderBlock {DIV} at (0,0) size 210x33
      RenderText {TEXT} at (0,0) size 243x18
        text run at (0,0) width 243: "Seals and caribou live in the arctic, too"
  caret: position 40 of child 0 {TEXT} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
  
  
  
  1.1                  LayoutTests/fast/overflow/overflow-text-hit-testing.html
  
  Index: overflow-text-hit-testing.html
  ===================================================================
  <html>
  <head>
      <title>Hit-testing text in overflows</title>
  <script type="text/javascript">
  var target;
  
  if (window.layoutTestController)
      layoutTestController.waitUntilDone();
  
  function step3()
  {
      eventSender.mouseUp();
      layoutTestController.notifyDone();
  }
  
  function step2()
  {
      eventSender.mouseDown();
      window.setTimeout(step3, 1);
  }
  
  function step1()
  {
      target.scrollLeft = 3000;
      if (window.layoutTestController) {
          eventSender.mouseMoveTo(205, 10);
          window.setTimeout(step2, 1);
      }
  }
  
  function test()
  {
      target = document.getElementById("target");
      window.setTimeout(step1, 1);
  }
  </script>
  </head>
  <body style="margin: 0; padding: 0;" onload="test();">
      <div id="target" style="overflow: auto; width: 210px; white-space: pre;">Seals and caribou live in the arctic, too</div>
      <hr>
      <p>
          This tests for regressions against
          <i>http://bugzilla.opendarwin.org/show_bug.cgi?id=5921 Hit-testing text
          in overflows does not take scrolling into account</i> by scrolling
          the above text all the way to the right, clicking the last letter, and
          verifying that the correct caret position is reported to the editing
          delegate.
      </p>
  </body>
  
  
  



More information about the webkit-changes mailing list