Commit 1c7fa276 authored by ap's avatar ap

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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3c9880fc
2006-01-04 Mitz Pettel <opendarwin.org@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@nokia.com>
Reviewed by eseidel.
......
......@@ -1442,16 +1442,16 @@ bool RenderObject::repaintAfterLayoutIfNeeded(const QRect& oldBounds, const QRec
// 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;
......
<!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>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment