Title: [119241] trunk
Revision
119241
Author
[email protected]
Date
2012-06-01 09:03:33 -0700 (Fri, 01 Jun 2012)

Log Message

http://shinydemos.com/clock/ doesn't seem to work
https://bugs.webkit.org/show_bug.cgi?id=79682

Reviewed by Nikolas Zimmermann.

Source/WebCore:

Test: svg/repaint/text-mask-update.svg

Currently, parent resources are not invalidated when SVGInlineText nodes
are added or removed. Adjusting SVGResourcesCache::clientWasAddedToTree()
and SVGResourcesCache::clientWillBeRemovedFromTree() to cover this case.

* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientWasAddedToTree):
(WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):

LayoutTests:

* platform/chromium-linux/svg/repaint/text-mask-update-expected.png: Added.
* platform/chromium-linux/svg/repaint/text-mask-update-expected.txt: Added.
* platform/chromium/test_expectations.txt:
* platform/mac/test_expectations.txt:
* svg/repaint/text-mask-update.svg: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (119240 => 119241)


--- trunk/LayoutTests/ChangeLog	2012-06-01 16:03:14 UTC (rev 119240)
+++ trunk/LayoutTests/ChangeLog	2012-06-01 16:03:33 UTC (rev 119241)
@@ -1,3 +1,16 @@
+2012-06-01  Florin Malita  <[email protected]>
+
+        http://shinydemos.com/clock/ doesn't seem to work
+        https://bugs.webkit.org/show_bug.cgi?id=79682
+
+        Reviewed by Nikolas Zimmermann.
+
+        * platform/chromium-linux/svg/repaint/text-mask-update-expected.png: Added.
+        * platform/chromium-linux/svg/repaint/text-mask-update-expected.txt: Added.
+        * platform/chromium/test_expectations.txt:
+        * platform/mac/test_expectations.txt:
+        * svg/repaint/text-mask-update.svg: Added.
+
 2012-06-01  Christophe Dumez  <[email protected]>
 
         [EFL] EFL's LayoutTestController needs to implement deliverWebIntent

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (119240 => 119241)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-06-01 16:03:14 UTC (rev 119240)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-06-01 16:03:33 UTC (rev 119241)
@@ -1223,6 +1223,9 @@
 BUGWK81217 : svg/carto.net/tabgroup.svg = PASS FAIL
 BUGWK81217 : svg/hixie/perf/003.xml = PASS FAIL
 
+// Needs rebaseline after https://bugs.webkit.org/show_bug.cgi?id=79682
+BUGWK79682 WIN MAC : svg/repaint/text-mask-update.svg = MISSING IMAGE+TEXT IMAGE TEXT PASS
+
 BUGWK81240 MAC : svg/text/bidi-reorder-value-lists.svg = PASS IMAGE+TEXT
 
 BUGWK81243 : svg/repaint/repainting-after-animation-element-removal.svg = PASS IMAGE

Added: trunk/LayoutTests/platform/chromium-linux/svg/repaint/text-mask-update-expected.png (0 => 119241)


--- trunk/LayoutTests/platform/chromium-linux/svg/repaint/text-mask-update-expected.png	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium-linux/svg/repaint/text-mask-update-expected.png	2012-06-01 16:03:33 UTC (rev 119241)
@@ -0,0 +1,8 @@
+\x89PNG
+
+
+IHDR X')tEXtchecksumb9636cc360c1d9aab9f48d9a3fb3c267\x8A\xD1l\x97\xA9IDATx\x9C\xED\xDD_\xA8\xDEu\xC0\xF1\xDF9\xFE\xD9\xD2
+\x8E,l*\x86څ\xA69E\xC1\xD0\x9AZ\xA0]\x84k\xE4\xCCɛ]H\xA4\x96	2EtL\xC3]i,KSD
+RF\xCAʜ\xA7%\xCEԡ\xA4E\xEA,\x9DR\xA7n\xEEt\xB186\xF3l\xF2&\x8F\xF2z\xF1\<\xBF\xDF\xF7\xF3\xFC\xCEs\xEE\xDE<ϗ\xDF32111|D,\\xB8\xF0\xC3~\xD3\xFD\xB0\xDF\xC0Ǎ\xC0\x88	,\x80\x98\xC0\x88	,\x80\x98\xC0\x88MX#?\x99\xFA\x98uŬC\xAF=t\xC9]K\x9Ey\xE5\x99\xFF\xF5\x92+\xD7\\xB9߲\xFD\xDE\xDA\xFA\xD6{\xAE\xAE\xFC\xF3\xCA#\x96\xB1\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`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@L`\xC4@\xEC?\xF2K\xD7\xC1f-\xE7\xBEIEND\xAEB`\x82
\ No newline at end of file

Added: trunk/LayoutTests/platform/chromium-linux/svg/repaint/text-mask-update-expected.txt (0 => 119241)


--- trunk/LayoutTests/platform/chromium-linux/svg/repaint/text-mask-update-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium-linux/svg/repaint/text-mask-update-expected.txt	2012-06-01 16:03:33 UTC (rev 119241)
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (10,3) size 47x22
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGResourceMasker {mask} [id="mask1"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
+        RenderSVGText {text} at (10,3) size 47x22 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 47x22
+            chunk 1 text run 1 at (10.00,20.00) startOffset 0 endOffset 4 width 47.00: "PASS"
+      RenderSVGResourceMasker {mask} [id="mask2"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
+        RenderSVGText {text}
+    RenderSVGRect {rect} at (10,3) size 47x22 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=50.00]
+      [masker="mask1"] RenderSVGResourceMasker {mask} at (10,3) size 47x22
+    RenderSVGRect {rect} at (0,0) size 0x0 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=50.00]
+      [masker="mask2"] RenderSVGResourceMasker {mask} at (0,0) size 0x0

Modified: trunk/LayoutTests/platform/mac/test_expectations.txt (119240 => 119241)


--- trunk/LayoutTests/platform/mac/test_expectations.txt	2012-06-01 16:03:14 UTC (rev 119240)
+++ trunk/LayoutTests/platform/mac/test_expectations.txt	2012-06-01 16:03:33 UTC (rev 119241)
@@ -203,6 +203,9 @@
 
 BUGWK85408 : svg/batik/text/longTextOnPath.svg = TEXT PASS
 
+// Needs rebaseline after https://bugs.webkit.org/show_bug.cgi?id=79682
+BUGWK79682 : svg/repaint/text-mask-update.svg = MISSING IMAGE+TEXT IMAGE TEXT PASS
+
 // IETC flexbox failures
 BUGWK85211 : ietestcenter/css3/flexbox/flexbox-align-stretch-001.htm = IMAGE
 BUGWK85212 : ietestcenter/css3/flexbox/flexbox-layout-002.htm = IMAGE

Added: trunk/LayoutTests/svg/repaint/text-mask-update.svg (0 => 119241)


--- trunk/LayoutTests/svg/repaint/text-mask-update.svg	                        (rev 0)
+++ trunk/LayoutTests/svg/repaint/text-mask-update.svg	2012-06-01 16:03:33 UTC (rev 119241)
@@ -0,0 +1,28 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" _onload_="runRepaintTest();">
+  <!--
+    Test for https://bugs.webkit.org/show_bug.cgi?id=79682.
+  -->
+  <script xlink:href="" type="text/_javascript_"></script>
+  <defs>
+    <mask id="mask1">
+      <text id="text1" x="10" y="20" fill="#fff" font-size="20px"></text>
+    </mask>
+    <mask id="mask2">
+      <text id="text2" x="10" y="50" fill="#fff" font-size="20px">FAIL</text>
+    </mask>
+  </defs>
+
+  <!-- the updated mask should be "PASS" -->
+  <rect width="100" height="50" fill="green" mask="url(#mask1)"/>
+  <!-- the updated mask should be empty -->
+  <rect width="100" height="50" fill="red" mask="url(#mask2)"/>
+
+  <script>
+    function repaintTest() {
+      var txt = document.createTextNode('PASS');
+      document.getElementById('text1').appendChild(txt);
+      var node = document.getElementById('text2');
+      node.removeChild(node.firstChild);
+    }
+  </script>
+</svg>

Modified: trunk/Source/WebCore/ChangeLog (119240 => 119241)


--- trunk/Source/WebCore/ChangeLog	2012-06-01 16:03:14 UTC (rev 119240)
+++ trunk/Source/WebCore/ChangeLog	2012-06-01 16:03:33 UTC (rev 119241)
@@ -1,3 +1,20 @@
+2012-06-01  Florin Malita  <[email protected]>
+
+        http://shinydemos.com/clock/ doesn't seem to work
+        https://bugs.webkit.org/show_bug.cgi?id=79682
+
+        Reviewed by Nikolas Zimmermann.
+
+        Test: svg/repaint/text-mask-update.svg
+
+        Currently, parent resources are not invalidated when SVGInlineText nodes
+        are added or removed. Adjusting SVGResourcesCache::clientWasAddedToTree()
+        and SVGResourcesCache::clientWillBeRemovedFromTree() to cover this case.
+
+        * rendering/svg/SVGResourcesCache.cpp:
+        (WebCore::SVGResourcesCache::clientWasAddedToTree):
+        (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
+
 2012-06-01  John Mellor  <[email protected]>
 
         Don't set scroll position twice in HistoryController::restoreScrollPositionAndViewState

Modified: trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp (119240 => 119241)


--- trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp	2012-06-01 16:03:14 UTC (rev 119240)
+++ trunk/Source/WebCore/rendering/svg/SVGResourcesCache.cpp	2012-06-01 16:03:33 UTC (rev 119241)
@@ -154,6 +154,10 @@
 
 void SVGResourcesCache::clientWasAddedToTree(RenderObject* renderer, const RenderStyle* newStyle)
 {
+    if (!renderer->node())
+        return;
+    RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, false);
+
     if (!rendererCanHaveResources(renderer))
         return;
     SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
@@ -162,12 +166,14 @@
 
 void SVGResourcesCache::clientWillBeRemovedFromTree(RenderObject* renderer)
 {
+    if (!renderer->node())
+        return;
+    RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, false);
+
     if (!rendererCanHaveResources(renderer))
         return;
     SVGResourcesCache* cache = resourcesCacheFromRenderObject(renderer);
     cache->removeResourcesFromRenderObject(renderer);
-
-    RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer, false);
 }
 
 void SVGResourcesCache::clientDestroyed(RenderObject* renderer)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to