Title: [102391] trunk
- Revision
- 102391
- Author
- [email protected]
- Date
- 2011-12-08 16:07:10 -0800 (Thu, 08 Dec 2011)
Log Message
Moving SVG elements on the page doesn't always erase element at the old position
https://bugs.webkit.org/show_bug.cgi?id=74002
Patch by Florin Malita <[email protected]> on 2011-12-08
Reviewed by Darin Adler.
Source/WebCore:
Test: svg/repaint/container-repaint.svg
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::layout):
Save the old repaint bounds before updating the viewport.
LayoutTests:
* svg/repaint/container-repaint-expected.png: Added.
* svg/repaint/container-repaint-expected.txt: Added.
* svg/repaint/container-repaint.svg: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (102390 => 102391)
--- trunk/LayoutTests/ChangeLog 2011-12-08 23:38:27 UTC (rev 102390)
+++ trunk/LayoutTests/ChangeLog 2011-12-09 00:07:10 UTC (rev 102391)
@@ -1,3 +1,14 @@
+2011-12-08 Florin Malita <[email protected]>
+
+ Moving SVG elements on the page doesn't always erase element at the old position
+ https://bugs.webkit.org/show_bug.cgi?id=74002
+
+ Reviewed by Darin Adler.
+
+ * svg/repaint/container-repaint-expected.png: Added.
+ * svg/repaint/container-repaint-expected.txt: Added.
+ * svg/repaint/container-repaint.svg: Added.
+
2011-12-08 Tony Chang <[email protected]>
Mark tests added in r102388 as failing on Chromium. Fix the cross platform
Added: trunk/LayoutTests/svg/repaint/container-repaint-expected.png (0 => 102391)
--- trunk/LayoutTests/svg/repaint/container-repaint-expected.png (rev 0)
+++ trunk/LayoutTests/svg/repaint/container-repaint-expected.png 2011-12-09 00:07:10 UTC (rev 102391)
@@ -0,0 +1,7 @@
+\x89PNG
+
+
+IHDR X ' )tEXtchecksum 8726a76158a12fb8ac8507e4ef7d34d5\xEB\xA6nE
+\xB7IDATx\x9C\xED\xD8\xC1 \x80@A\xCF\xC45\xF35
+\x87R\xC1<\x9BY\xC7}\xF0\xD2\\xB3{ \xF0\xE7\xEE #\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b &\xB0 b \xB6ff\xF7 \x80_\xF1` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4 @L` \xC4\x86\xE3
+\xA9F\x95b IEND\xAEB`\x82
\ No newline at end of file
Added: trunk/LayoutTests/svg/repaint/container-repaint-expected.txt (0 => 102391)
--- trunk/LayoutTests/svg/repaint/container-repaint-expected.txt (rev 0)
+++ trunk/LayoutTests/svg/repaint/container-repaint-expected.txt 2011-12-09 00:07:10 UTC (rev 102391)
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 100x150
+ RenderSVGContainer {g} at (0,0) size 100x150
+ RenderSVGPath {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+ RenderSVGViewportContainer {svg} at (0,100) size 100x50
+ RenderSVGPath {rect} at (0,100) size 100x50 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=50.00]
+ RenderSVGPath {rect} at (0,100) size 100x50 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=100.00] [width=100.00] [height=50.00]
Added: trunk/LayoutTests/svg/repaint/container-repaint.svg (0 => 102391)
--- trunk/LayoutTests/svg/repaint/container-repaint.svg (rev 0)
+++ trunk/LayoutTests/svg/repaint/container-repaint.svg 2011-12-09 00:07:10 UTC (rev 102391)
@@ -0,0 +1,25 @@
+<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg">
+ <!-- After repositioning, the red rect should be completely hidden behind the second green rect. -->
+
+ <g>
+ <rect fill="green" width="100" height="100"/>
+
+ <svg id="mover" y="50">
+ <rect fill="red" ay="50" width="100" height="50"/>
+ </svg>
+
+ <rect y="100" fill="green" width="100" height="50"/>
+ </g>
+
+ <script>
+ function move() {
+ document.getElementById('mover').setAttribute('y', 100);
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+
+ window.addEventListener('load', function() { window.setTimeout(move, 0);}, false);
+ if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+ </script>
+</svg>
Modified: trunk/Source/WebCore/ChangeLog (102390 => 102391)
--- trunk/Source/WebCore/ChangeLog 2011-12-08 23:38:27 UTC (rev 102390)
+++ trunk/Source/WebCore/ChangeLog 2011-12-09 00:07:10 UTC (rev 102391)
@@ -1,3 +1,16 @@
+2011-12-08 Florin Malita <[email protected]>
+
+ Moving SVG elements on the page doesn't always erase element at the old position
+ https://bugs.webkit.org/show_bug.cgi?id=74002
+
+ Reviewed by Darin Adler.
+
+ Test: svg/repaint/container-repaint.svg
+
+ * rendering/svg/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::layout):
+ Save the old repaint bounds before updating the viewport.
+
2011-12-08 Tim Horton <[email protected]>
Enable animations of CSS images using -webkit-cross-fade
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp (102390 => 102391)
--- trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp 2011-12-08 23:38:27 UTC (rev 102390)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp 2011-12-09 00:07:10 UTC (rev 102391)
@@ -55,11 +55,11 @@
// RenderSVGRoot disables layoutState for the SVG rendering tree.
ASSERT(!view()->layoutStateEnabled());
+ LayoutRepainter repainter(*this, checkForRepaintDuringLayout() || selfWillPaint());
+
// Allow RenderSVGViewportContainer to update its viewport.
calcViewport();
- LayoutRepainter repainter(*this, checkForRepaintDuringLayout() || selfWillPaint());
-
// Allow RenderSVGTransformableContainer to update its transform.
bool updatedTransform = calculateLocalTransform();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes