- Revision
- 148203
- Author
- [email protected]
- Date
- 2013-04-11 07:51:08 -0700 (Thu, 11 Apr 2013)
Log Message
Parent box with background-size auto and gradient image does not get properly repainted when child box is resized.
https://bugs.webkit.org/show_bug.cgi?id=114424
Source/WebCore:
Patch by Zalan Bujtas <[email protected]> on 2013-04-11
Reviewed by Antti Koivisto.
Initiate full repaint on fill layer, when the image is generated and the background
property defines auto size.
http://www.w3.org/TR/css3-background/#background-size
'If the image has neither an intrinsic width nor an intrinsic height, its size is determined as for 'contain'.'
Extended fast/repaint/background-shorthand-with-gradient-and-height-changes.html
to cover this case too.
* rendering/RenderObject.cpp:
(WebCore::mustRepaintFillLayers):
LayoutTests:
Patch by Zalan Bujtas <[email protected]> on 2013-04-11
Reviewed by Antti Koivisto.
* fast/repaint/background-shorthand-with-gradient-and-height-changes-expected.txt:
* fast/repaint/background-shorthand-with-gradient-and-height-changes.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (148202 => 148203)
--- trunk/LayoutTests/ChangeLog 2013-04-11 14:42:14 UTC (rev 148202)
+++ trunk/LayoutTests/ChangeLog 2013-04-11 14:51:08 UTC (rev 148203)
@@ -1,3 +1,13 @@
+2013-04-11 Zalan Bujtas <[email protected]>
+
+ Parent box with background-size auto and gradient image does not get properly repainted when child box is resized.
+ https://bugs.webkit.org/show_bug.cgi?id=114424
+
+ Reviewed by Antti Koivisto.
+
+ * fast/repaint/background-shorthand-with-gradient-and-height-changes-expected.txt:
+ * fast/repaint/background-shorthand-with-gradient-and-height-changes.html:
+
2013-04-11 Zoltan Arvai <[email protected]>
[Qt] Unreviewed gardening. Remove platform specific expected after r148195.
Modified: trunk/LayoutTests/fast/repaint/background-shorthand-with-gradient-and-height-changes-expected.txt (148202 => 148203)
--- trunk/LayoutTests/fast/repaint/background-shorthand-with-gradient-and-height-changes-expected.txt 2013-04-11 14:42:14 UTC (rev 148202)
+++ trunk/LayoutTests/fast/repaint/background-shorthand-with-gradient-and-height-changes-expected.txt 2013-04-11 14:51:08 UTC (rev 148203)
@@ -3,7 +3,8 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS repaintRects.indexOf('500') is not -1
+PASS repaintRects.indexOf('28 84') is not -1
+PASS repaintRects.indexOf('8 84') is not -1
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/repaint/background-shorthand-with-gradient-and-height-changes.html (148202 => 148203)
--- trunk/LayoutTests/fast/repaint/background-shorthand-with-gradient-and-height-changes.html 2013-04-11 14:42:14 UTC (rev 148202)
+++ trunk/LayoutTests/fast/repaint/background-shorthand-with-gradient-and-height-changes.html 2013-04-11 14:51:08 UTC (rev 148203)
@@ -4,8 +4,14 @@
<script src=""
<style>
-#outer {
- padding-top: 200px;
+#wrapper {
+ width: 40px;
+}
+
+#outer-background-shorthand {
+ width: 20px;
+ padding-top: 20px;
+ float:right;
background:-webkit-gradient(
linear,
left top,
@@ -14,9 +20,21 @@
);
}
-#inner {
- height: 100px;
+#outer-background-size-auto {
+ width: 20px;
+ padding-top: 20px;
+ background-size: auto;
+ background-image: -webkit-gradient(
+ linear,
+ left top,
+ left bottom,
+ color-stop(0%, rgba(255,255,0,0)), color-stop(100%, rgba(0,0,0,1))
+ );
}
+
+.inner {
+ height: 10px;
+}
</style>
<script>
@@ -24,7 +42,9 @@
function start() {
window.setTimeout(function() {
- document.getElementById('inner').style.height = 300 + 'px';
+ document.getElementsByClassName('inner')[0].style.height = 200 + 'px';
+ document.getElementsByClassName('inner')[1].style.height = 200 + 'px';
+
window.setTimeout(logRepaints, 200);
}, 0);
@@ -41,16 +61,23 @@
repaintRects = window.internals.repaintRectsAsText(document);
window.internals.stopTrackingRepaints(document);
- shouldNotBe("repaintRects.indexOf('500')", "-1");
+ shouldNotBe("repaintRects.indexOf('28 84')", "-1");
+ shouldNotBe("repaintRects.indexOf('8 84')", "-1");
finishJSTest();
}
</script>
</head>
<body _onload_='start();'>
-<div id='outer'>
- <div id='inner'>
+<div id='wrapper'>
+ <div id='outer-background-shorthand'>
+ <div class='inner'>
+ </div>
</div>
+ <div id='outer-background-size-auto'>
+ <div class='inner'>
+ </div>
+ </div>
</div>
</body>
<script src=""
Modified: trunk/Source/WebCore/ChangeLog (148202 => 148203)
--- trunk/Source/WebCore/ChangeLog 2013-04-11 14:42:14 UTC (rev 148202)
+++ trunk/Source/WebCore/ChangeLog 2013-04-11 14:51:08 UTC (rev 148203)
@@ -1,3 +1,21 @@
+2013-04-11 Zalan Bujtas <[email protected]>
+
+ Parent box with background-size auto and gradient image does not get properly repainted when child box is resized.
+ https://bugs.webkit.org/show_bug.cgi?id=114424
+
+ Reviewed by Antti Koivisto.
+
+ Initiate full repaint on fill layer, when the image is generated and the background
+ property defines auto size.
+ http://www.w3.org/TR/css3-background/#background-size
+ 'If the image has neither an intrinsic width nor an intrinsic height, its size is determined as for 'contain'.'
+
+ Extended fast/repaint/background-shorthand-with-gradient-and-height-changes.html
+ to cover this case too.
+
+ * rendering/RenderObject.cpp:
+ (WebCore::mustRepaintFillLayers):
+
2013-04-11 ChangSeok Oh <[email protected]>
[GTK][AC] use a smart pointer for GList and ClutterCanvas
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (148202 => 148203)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2013-04-11 14:42:14 UTC (rev 148202)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2013-04-11 14:51:08 UTC (rev 148203)
@@ -835,8 +835,12 @@
return true;
if (sizeType == SizeLength) {
- if (layer->sizeLength().width().isPercent() || layer->sizeLength().height().isPercent())
+ LengthSize size = layer->sizeLength();
+ if (size.width().isPercent() || size.height().isPercent())
return true;
+ // If the image has neither an intrinsic width nor an intrinsic height, its size is determined as for 'contain'.
+ if ((size.width().isAuto() || size.height().isAuto()) && img->isGeneratedImage())
+ return true;
} else if (img->usesImageContainerSize())
return true;