Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9388
REGRESSION: outlines don't get erased when removed in some cases
Test: fast/repaint/outline-shrinking.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle): Always repaint with the old style if the outline is
becoming narrower, even if we are going to relayout.
LayoutTests:
Reviewed by Darin.
- repaint test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9388
REGRESSION: outlines don't get erased when removed in some cases
* fast/repaint/outline-shrinking-expected.checksum: Added.
* fast/repaint/outline-shrinking-expected.png: Added.
* fast/repaint/outline-shrinking-expected.txt: Added.
* fast/repaint/outline-shrinking.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15038
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-06-25 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by Darin.
+
+ - repaint test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9388
+ REGRESSION: outlines don't get erased when removed in some cases
+
+ * fast/repaint/outline-shrinking-expected.checksum: Added.
+ * fast/repaint/outline-shrinking-expected.png: Added.
+ * fast/repaint/outline-shrinking-expected.txt: Added.
+ * fast/repaint/outline-shrinking.html: Added.
+
2006-06-25 Rob Buis <buis@kde.org>
Reviewed by Darin.
--- /dev/null
+e87776b8c2bfc7fbeca2e5e6abbce941
+\ No newline at end of file
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x220
+ RenderBlock {HTML} at (0,0) size 800x220
+ RenderBody {BODY} at (8,16) size 784x196
+ RenderBlock {P} at (0,0) size 784x36
+ RenderText {#text} at (0,0) size 104x18
+ text run at (0,0) width 104: "This is a test for "
+ RenderInline {I} at (0,0) size 752x36
+ RenderInline {A} at (0,0) size 348x18 [color=#0000EE]
+ RenderText {#text} at (104,0) size 348x18
+ text run at (104,0) width 348: "http://bugzilla.opendarwin.org/show_bug.cgi?id=9388"
+ RenderText {#text} at (452,0) size 752x36
+ text run at (452,0) width 4: " "
+ text run at (456,0) width 296: "REGRESSION: outlines don't get erased when"
+ text run at (0,18) width 146: "removed in some cases"
+ RenderText {#text} at (146,18) size 4x18
+ text run at (146,18) width 4: "."
+ RenderBlock {P} at (0,52) size 784x18
+ RenderText {#text} at (0,0) size 323x18
+ text run at (0,0) width 323: "There should be a green square and no trace of red."
+ RenderBlock {HR} at (0,86) size 784x2 [border: (1px inset #000000)]
+ RenderBlock {DIV} at (0,96) size 100x100 [bgcolor=#008000]
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en">
+<head>
+ <script src="repaint.js" type="text/javascript"></script>
+ <script type="text/javascript">
+ function repaintTest()
+ {
+ var target = document.getElementById('t');
+ target.style.outline = 'none';
+ target.style.fontSize = '20px'; // make it a layout change rather than a repaint
+ }
+ </script>
+</head>
+<body onload="runRepaintTest();">
+ <p>
+ This is a test for <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=9388">http://bugzilla.opendarwin.org/show_bug.cgi?id=9388</a>
+ REGRESSION: outlines don't get erased when removed in some cases</i>.
+ </p>
+ <p>
+ There should be a green square and no trace of red.
+ </p>
+ <hr>
+ <div id="t" style="background: green; font-size: 10px; outline: red dashed 4px; width: 100px; height: 100px;"></div>
+</body>
+2006-06-25 Mitz Pettel <opendarwin.org@mitzpettel.com>
+
+ Reviewed by Darin.
+
+ - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9388
+ REGRESSION: outlines don't get erased when removed in some cases
+
+ Test: fast/repaint/outline-shrinking.html
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::setStyle): Always repaint with the old style if the outline is
+ becoming narrower, even if we are going to relayout.
+
2006-06-25 Rob Buis <buis@kde.org>
Reviewed by Darin.
layer()->repaintIncludingDescendants();
if (!(m_style->clip() == style->clip()))
layer()->clearClipRects();
- }
- else if (d == RenderStyle::Repaint)
+ } else if (d == RenderStyle::Repaint || style->outlineSize() < m_style->outlineSize())
repaint();
}