Title: [103631] trunk
- Revision
- 103631
- Author
- [email protected]
- Date
- 2011-12-23 09:01:47 -0800 (Fri, 23 Dec 2011)
Log Message
Blur filter doesn't invalidate enough
https://bugs.webkit.org/show_bug.cgi?id=74891
Source/WebCore:
Reviewed by Darin Adler.
Take the effects of filters into account for repainting; we need
to inflate the repaint rect by the outsets provided by the filter.
Test: css3/filters/filter-repaint.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::computeRectForRepaint):
LayoutTests:
Reviewed by Darin Adler.
Repaint test for the effects of a blur filter.
* css3/filters/filter-repaint-expected.txt: Added.
* css3/filters/filter-repaint-expected.png: Added.
* css3/filters/filter-repaint.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (103630 => 103631)
--- trunk/LayoutTests/ChangeLog 2011-12-23 16:56:35 UTC (rev 103630)
+++ trunk/LayoutTests/ChangeLog 2011-12-23 17:01:47 UTC (rev 103631)
@@ -1,5 +1,18 @@
2011-12-23 Simon Fraser <[email protected]>
+ Blur filter doesn't invalidate enough
+ https://bugs.webkit.org/show_bug.cgi?id=74891
+
+ Reviewed by Darin Adler.
+
+ Repaint test for the effects of a blur filter.
+
+ * css3/filters/filter-repaint-expected.txt: Added.
+ * css3/filters/filter-repaint-expected.png: Added.
+ * css3/filters/filter-repaint.html: Added.
+
+2011-12-23 Simon Fraser <[email protected]>
+
Filters should apply to inline elements
https://bugs.webkit.org/show_bug.cgi?id=75152
Added: trunk/LayoutTests/css3/filters/filter-repaint-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/css3/filters/filter-repaint-expected.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/css3/filters/filter-repaint-expected.txt (0 => 103631)
--- trunk/LayoutTests/css3/filters/filter-repaint-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/filters/filter-repaint-expected.txt 2011-12-23 17:01:47 UTC (rev 103631)
@@ -0,0 +1 @@
+
Added: trunk/LayoutTests/css3/filters/filter-repaint.html (0 => 103631)
--- trunk/LayoutTests/css3/filters/filter-repaint.html (rev 0)
+++ trunk/LayoutTests/css3/filters/filter-repaint.html 2011-12-23 17:01:47 UTC (rev 103631)
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ .box {
+ position: relative;
+ height: 200px;
+ width: 200px;
+ background-color: green;
+ }
+
+ .blurry {
+ margin: 50px;
+ -webkit-filter: blur(10px);
+ }
+
+ #change {
+ height: 100px;
+ width: 100px;
+ top: 50px;
+ left: 50px;
+ background-color: red;
+ }
+ </style>
+ <script src=""
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText(true);
+
+ function repaintTest()
+ {
+ document.getElementById('change').style.backgroundColor = "green";
+ }
+ </script>
+</head>
+<body _onload_="runRepaintTest()">
+
+ <div class="blurry box">
+ <div id="change" class="box">
+ </div>
+ </div>
+
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (103630 => 103631)
--- trunk/Source/WebCore/ChangeLog 2011-12-23 16:56:35 UTC (rev 103630)
+++ trunk/Source/WebCore/ChangeLog 2011-12-23 17:01:47 UTC (rev 103631)
@@ -1,5 +1,22 @@
2011-12-23 Simon Fraser <[email protected]>
+ Blur filter doesn't invalidate enough
+ https://bugs.webkit.org/show_bug.cgi?id=74891
+
+ Reviewed by Darin Adler.
+
+ Take the effects of filters into account for repainting; we need
+ to inflate the repaint rect by the outsets provided by the filter.
+
+ Test: css3/filters/filter-repaint.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::computeRectForRepaint):
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::computeRectForRepaint):
+
+2011-12-23 Simon Fraser <[email protected]>
+
Filters should apply to inline elements
https://bugs.webkit.org/show_bug.cgi?id=75152
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (103630 => 103631)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2011-12-23 16:56:35 UTC (rev 103630)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2011-12-23 17:01:47 UTC (rev 103631)
@@ -1567,6 +1567,19 @@
if (isWritingModeRoot() && !isPositioned())
flipForWritingMode(rect);
+
+#if ENABLE(CSS_FILTERS)
+ if (style()->hasFilterOutsets()) {
+ LayoutUnit topOutset;
+ LayoutUnit rightOutset;
+ LayoutUnit bottomOutset;
+ LayoutUnit leftOutset;
+ style()->filter().getOutsets(topOutset, rightOutset, bottomOutset, leftOutset);
+ rect.move(-leftOutset, -topOutset);
+ rect.expand(leftOutset + rightOutset, topOutset + bottomOutset);
+ }
+#endif
+
LayoutPoint topLeft = rect.location();
topLeft.move(x(), y());
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (103630 => 103631)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2011-12-23 16:56:35 UTC (rev 103630)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2011-12-23 17:01:47 UTC (rev 103631)
@@ -1063,6 +1063,18 @@
}
}
+#if ENABLE(CSS_FILTERS)
+ if (style()->hasFilterOutsets()) {
+ LayoutUnit topOutset;
+ LayoutUnit rightOutset;
+ LayoutUnit bottomOutset;
+ LayoutUnit leftOutset;
+ style()->filter().getOutsets(topOutset, rightOutset, bottomOutset, leftOutset);
+ rect.move(-leftOutset, -topOutset);
+ rect.expand(leftOutset + rightOutset, topOutset + bottomOutset);
+ }
+#endif
+
if (style()->position() == RelativePosition && layer()) {
// Apply the relative position offset when invalidating a rectangle. The layer
// is translated, but the render box isn't, so we need to do this to get the
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes