[webkit-changes] cvs commit: WebCore/manual-tests border-repaint-glitch.html

Alexey ap at opensource.apple.com
Wed Jan 4 06:42:24 PST 2006


ap          06/01/04 06:42:23

  Modified:    .        ChangeLog
               khtml/rendering render_object.cpp
  Added:       manual-tests border-repaint-glitch.html
  Log:
          Reviewed by Darin, landed by ap.
  
          - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6301
            REGRESSION: Border repaint glitch
  
          * khtml/rendering/render_object.cpp:
          (RenderObject::repaintAfterLayoutIfNeeded): Repaint parts of the
          border that moved.
          * manual-tests/border-repaint-glitch.html: Added.
  
  Revision  Changes    Path
  1.85      +12 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- ChangeLog	4 Jan 2006 08:20:13 -0000	1.84
  +++ ChangeLog	4 Jan 2006 14:42:22 -0000	1.85
  @@ -1,3 +1,15 @@
  +2006-01-04  Mitz Pettel  <opendarwin.org at mitzpettel.com>
  +
  +        Reviewed by Darin, landed by ap.
  +        
  +        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6301
  +          REGRESSION: Border repaint glitch
  +
  +        * khtml/rendering/render_object.cpp:
  +        (RenderObject::repaintAfterLayoutIfNeeded): Repaint parts of the
  +        border that moved.
  +        * manual-tests/border-repaint-glitch.html: Added.
  +
   2005-12-30  Kimmo Kinnunen  <kimmo.kinnunen at nokia.com>
   
           Reviewed by eseidel.
  
  
  
  1.233     +4 -4      WebCore/khtml/rendering/render_object.cpp
  
  Index: render_object.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/rendering/render_object.cpp,v
  retrieving revision 1.232
  retrieving revision 1.233
  diff -u -r1.232 -r1.233
  --- render_object.cpp	27 Dec 2005 19:13:40 -0000	1.232
  +++ render_object.cpp	4 Jan 2006 14:42:23 -0000	1.233
  @@ -1442,16 +1442,16 @@
           // two rectangles (but typically only one).
           int width = abs(newBounds.width() - oldBounds.width());
           if (width)
  -            c->repaintViewRectangle(QRect(kMin(newBounds.x() + newBounds.width(), oldBounds.x() + oldBounds.width()),
  +            c->repaintViewRectangle(QRect(kMin(newBounds.x() + newBounds.width(), oldBounds.x() + oldBounds.width()) - borderRight(),
                                       newBounds.y(), 
  -                                    width,
  +                                    width + borderRight(),
                                       kMax(newBounds.height(), oldBounds.height())));
           int height = abs(newBounds.height() - oldBounds.height());
           if (height)
               c->repaintViewRectangle(QRect(newBounds.x(),
  -                                          kMin(newBounds.y() + newBounds.height(), oldBounds.y() + oldBounds.height()),
  +                                          kMin(newBounds.y() + newBounds.height(), oldBounds.y() + oldBounds.height()) - borderBottom(),
                                             kMax(newBounds.width(), oldBounds.width()),
  -                                          height));
  +                                          height + borderBottom()));
           return false;
       }
       return true;
  
  
  
  1.1                  WebCore/manual-tests/border-repaint-glitch.html
  
  Index: border-repaint-glitch.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
          "http://www.w3.org/TR/html4/strict.dtd">
  <html lang="en">
  <head>
  <style type="text/css">
      div.test { width: 200px; height: 120px; border: 1px solid blue; padding: 10px; }
  </style>
  </head>
  <body>
  <p><b>BUG ID:</b> <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=6301">Bugzilla bug 6301</a> REGRESSION: Border repaint glitch</p>
  
  <p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b> 
  Click each Test button once.
  </p>
  
  <p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b> 
  The boxes will resize, maintaining their solid red rectangular borders.
  </p>
  
  <p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>  
  The boxes will resize, but the borders will break. The first box will be missing
  small segments from either side of its bottom border. The second box will have
  small red horizontal segments protruding inwards from both sides of the border,
  where the bottom border was before.
  </p>
  
  <div class="test">
      <button onclick="document.getElementById('a').style.height = '40px'">Test</button>
      <div style="background: teal; padding: 0; border: solid red 4px;">
          <div id="a" style="height: 60px; margin: 10px; background:silver;"></div>
      </div>
  </div>
  <br>
  <div class="test">
      <button onclick="document.getElementById('b').style.height = '60px'">Test</button>
      <div style="background: teal; padding: 0; border: solid red 4px;">
          <div id="b" style="height: 40px; margin: 10px; background:silver;"></div>
      </div>
  </div>
  
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list