Title: [143379] branches/chromium/1364
Revision
143379
Author
p...@google.com
Date
2013-02-19 13:48:33 -0800 (Tue, 19 Feb 2013)

Log Message

Merge 141645
> Prevent skipped repaints for children of inner SVG elements
> https://bugs.webkit.org/show_bug.cgi?id=108429
> 
> Reviewed by Eric Seidel.
> 
> Source/WebCore:
> 
> This patch fixes a bug caused by r108699 and r133786 where we would not repaint children
> of inner SVG elements because "m_didTransformToRootUpdate" was never reset on viewport
> containers. The stale m_didTransformToRootUpdate variable caused us to skip child repaints.
> 
> I verified that the Robohornet SVG benchmark performance gains in r133786 are not regressed
> with this patch.
> 
> Test: svg/repaint/svgsvgelement-repaint-children.html
> 
> * rendering/svg/RenderSVGViewportContainer.cpp:
> (WebCore::RenderSVGViewportContainer::calcViewport):
> 
>     This can be removed because setNeedsTransformUpdate() will set m_needsTransformUpdate.
> 
> (WebCore::RenderSVGViewportContainer::calculateLocalTransform):
> 
>     This change is straightforward and is similar to the equivalent assignment in
>     RenderSVGTransformableContainer::calculateLocalTransform().
> 
> LayoutTests:
> 
> Need to update expectations for a single file (just a 1px difference).
> 
> * platform/chromium/TestExpectations:
> * platform/efl/TestExpectations:
> * platform/mac/TestExpectations:
> * platform/qt/TestExpectations:
> * platform/win/TestExpectations:
> * svg/repaint/svgsvgelement-repaint-children-expected.png: Added.
> * svg/repaint/svgsvgelement-repaint-children-expected.txt: Added.
> * svg/repaint/svgsvgelement-repaint-children.html: Added.
> 

TBR=p...@google.com

Modified Paths

Added Paths

Diff

Modified: branches/chromium/1364/LayoutTests/platform/chromium/TestExpectations (143378 => 143379)


--- branches/chromium/1364/LayoutTests/platform/chromium/TestExpectations	2013-02-19 21:46:06 UTC (rev 143378)
+++ branches/chromium/1364/LayoutTests/platform/chromium/TestExpectations	2013-02-19 21:48:33 UTC (rev 143379)
@@ -3619,6 +3619,10 @@
 
 webkit.org/b/94242 [ Android Debug ] media/track/track-cues-sorted-before-dispatch.html [ Crash Pass Timeout ]
 
+# Needs a rebaseline after WK108429 lands.
+webkit.org/b/108429 svg/custom/text-ctm.svg [ Pass Failure ]
+webkit.org/b/108429 svg/repaint/svgsvgelement-repaint-children.html [ Pass Failure ]
+
 # Chromium still has the CC toggle button, not the menu of tracks.
 webkit.org/b/101670 media/video-controls-captions-trackmenu.html [ Skip ]
 

Modified: branches/chromium/1364/LayoutTests/platform/mac/TestExpectations (143378 => 143379)


--- branches/chromium/1364/LayoutTests/platform/mac/TestExpectations	2013-02-19 21:46:06 UTC (rev 143378)
+++ branches/chromium/1364/LayoutTests/platform/mac/TestExpectations	2013-02-19 21:48:33 UTC (rev 143379)
@@ -1155,6 +1155,9 @@
 webkit.org/b/98687 fast/css-generated-content/table-row-group-to-inline.html [ Failure ]
 webkit.org/b/104595 fast/css/empty-generated-content.html [ Failure ]
 
+# Needs a rebaseline after WK108429 lands.
+webkit.org/b/108429 svg/custom/text-ctm.svg [ Pass Failure ]
+
 webkit.org/b/93247 [ Debug ] fast/lists/list-marker-remove-crash.html [ Crash ]
 
 # (r124484) inspector/device-orientation-success.html failing on Mac ports

Modified: branches/chromium/1364/LayoutTests/platform/qt/TestExpectations (143378 => 143379)


--- branches/chromium/1364/LayoutTests/platform/qt/TestExpectations	2013-02-19 21:46:06 UTC (rev 143378)
+++ branches/chromium/1364/LayoutTests/platform/qt/TestExpectations	2013-02-19 21:48:33 UTC (rev 143379)
@@ -2336,6 +2336,9 @@
 webkit.org/b/99870 svg/transforms/text-with-pattern-inside-transformed-html.xhtml [ Pass ImageOnlyFailure ]
 webkit.org/b/99870 svg/custom/pattern-scaling.svg [ Pass ImageOnlyFailure Missing ]
 
+# Needs a rebaseline after WK108429 lands.
+webkit.org/b/108429 svg/custom/text-ctm.svg [ Pass Failure ]
+
 # Disable webaudio codec tests, including proprietary codecs.
 webkit.org/b/88794 webaudio/codec-tests
 

Modified: branches/chromium/1364/LayoutTests/platform/win/TestExpectations (143378 => 143379)


--- branches/chromium/1364/LayoutTests/platform/win/TestExpectations	2013-02-19 21:46:06 UTC (rev 143378)
+++ branches/chromium/1364/LayoutTests/platform/win/TestExpectations	2013-02-19 21:48:33 UTC (rev 143379)
@@ -2035,6 +2035,9 @@
 fast/forms/time-multiple-fields
 fast/forms/week-multiple-fields
 
+# Needs a rebaseline after WK108429 lands.
+svg/custom/text-ctm.svg
+
 # Require rebaseline after https://bugs.webkit.org/show_bug.cgi?id=84286
 fast/block/float/avoidance-rtl.html
 fast/borders/border-radius-wide-border-01.html

Copied: branches/chromium/1364/LayoutTests/svg/repaint/svgsvgelement-repaint-children-expected.png (from rev 141645, trunk/LayoutTests/svg/repaint/svgsvgelement-repaint-children-expected.png) (0 => 143379)


--- branches/chromium/1364/LayoutTests/svg/repaint/svgsvgelement-repaint-children-expected.png	                        (rev 0)
+++ branches/chromium/1364/LayoutTests/svg/repaint/svgsvgelement-repaint-children-expected.png	2013-02-19 21:48:33 UTC (rev 143379)
@@ -0,0 +1,6 @@
+\x89PNG
+
+
+IHDR X\x9Av\x82p)tEXtchecksumb380fbdf4fbb23b4019ae70727d4e7b7\x99\xAA}8\x8CIDATx\x9C\xED\xD9\xC1
+\x82EA14cE[#эX\xC6\xC3#\xC1\x99\xF3\xFE\xF5e\x97\x99y?ϫ\xFFC\x80d\x90 @F\x80dֳ\x83\xED\xB5-\xC5\xBE3\xFBWo\x80_\xF9\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90Y\xCFf\x9F\xA3ܟ\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80d\x90 @F\x80\x99\x98\xFB
+;VOdSIEND\xAEB`\x82
\ No newline at end of file

Copied: branches/chromium/1364/LayoutTests/svg/repaint/svgsvgelement-repaint-children-expected.txt (from rev 141645, trunk/LayoutTests/svg/repaint/svgsvgelement-repaint-children-expected.txt) (0 => 143379)


--- branches/chromium/1364/LayoutTests/svg/repaint/svgsvgelement-repaint-children-expected.txt	                        (rev 0)
+++ branches/chromium/1364/LayoutTests/svg/repaint/svgsvgelement-repaint-children-expected.txt	2013-02-19 21:48:33 UTC (rev 143379)
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x420
+  RenderBlock {HTML} at (0,0) size 800x420
+    RenderBody {BODY} at (8,8) size 784x404
+      RenderSVGRoot {svg} at (8,8) size 100x100
+        RenderSVGViewportContainer {svg} at (8,8) size 100x100
+          RenderSVGRect {rect} at (8,8) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+          RenderSVGPath {path} at (8,8) size 0x0 [fill={[type=SOLID] [color=#FF0000]}] [data="" 0 0 Z"]
+      RenderText {#text} at (0,0) size 0x0

Copied: branches/chromium/1364/LayoutTests/svg/repaint/svgsvgelement-repaint-children.html (from rev 141645, trunk/LayoutTests/svg/repaint/svgsvgelement-repaint-children.html) (0 => 143379)


--- branches/chromium/1364/LayoutTests/svg/repaint/svgsvgelement-repaint-children.html	                        (rev 0)
+++ branches/chromium/1364/LayoutTests/svg/repaint/svgsvgelement-repaint-children.html	2013-02-19 21:48:33 UTC (rev 143379)
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <script src=""
+</head>
+<!-- Test for WK108429: All red should disappear, leaving just a green square. -->
+<body _onload_="runRepaintTest()">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="400">
+  <svg>
+    <rect x="0" y="0" width="100" height="100" fill="green"/>
+    <path id="path" d="M0 0 L 100 0 L 100 100 L 0 100Z" fill="red"/>
+  </svg>
+<script>
+function repaintTest() {
+  if (window.testRunner)
+    testRunner.waitUntilDone();
+
+  setTimeout(function() {
+    var pathEl = document.getElementById('path');
+    pathEl.setAttribute('d', 'M0 0Z');
+    if (window.testRunner)
+      testRunner.notifyDone();
+  }, 1);
+}
+</script>
+</svg>
+</body>
+</html>

Modified: branches/chromium/1364/Source/WebCore/rendering/svg/RenderSVGViewportContainer.cpp (143378 => 143379)


--- branches/chromium/1364/Source/WebCore/rendering/svg/RenderSVGViewportContainer.cpp	2013-02-19 21:46:06 UTC (rev 143378)
+++ branches/chromium/1364/Source/WebCore/rendering/svg/RenderSVGViewportContainer.cpp	2013-02-19 21:48:33 UTC (rev 143379)
@@ -114,7 +114,6 @@
     }
 
     if (oldViewport != m_viewport) {
-        m_didTransformToRootUpdate = true;
         setNeedsBoundariesUpdate();
         setNeedsTransformUpdate();
     }
@@ -122,6 +121,7 @@
 
 bool RenderSVGViewportContainer::calculateLocalTransform() 
 {
+    m_didTransformToRootUpdate = m_needsTransformUpdate || SVGRenderSupport::transformToRootChanged(parent());
     if (!m_needsTransformUpdate)
         return false;
     
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to