Stop recomputing SVG path data twice during layout
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Feb 2012 17:57:55 +0000 (17:57 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Feb 2012 17:57:55 +0000 (17:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=79672

Patch by Philip Rogers <pdr@google.com> on 2012-02-27
Reviewed by Nikolas Zimmermann.

* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::layout):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109003 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/RenderSVGShape.cpp

index 9f2979f3b09465968079e3d8124b8d57a11145c9..0ec6d0c80f7670f30c3d95aaff657d742656f63e 100644 (file)
@@ -1,3 +1,13 @@
+2012-02-27  Philip Rogers  <pdr@google.com>
+
+        Stop recomputing SVG path data twice during layout
+        https://bugs.webkit.org/show_bug.cgi?id=79672
+
+        Reviewed by Nikolas Zimmermann.
+
+        * rendering/svg/RenderSVGShape.cpp:
+        (WebCore::RenderSVGShape::layout):
+
 2012-02-27  Timothy Hatcher  <timothy@apple.com>
 
         Updated for WebKit2 string changes.
index 31f15251ba4037a02515fd1c02f0b37b1af364e5..2dfb2d8c6cf50d6dda0d032bf94cbead3388d82e 100755 (executable)
@@ -168,7 +168,7 @@ void RenderSVGShape::layout()
     bool updateCachedBoundariesInParents = false;
 
     bool needsShapeUpdate = m_needsShapeUpdate;
-    if (needsShapeUpdate) {
+    if (needsShapeUpdate || m_needsBoundariesUpdate) {
         setIsPaintingFallback(false);
         m_path.clear();
         createShape();
@@ -182,13 +182,6 @@ void RenderSVGShape::layout()
         updateCachedBoundariesInParents = true;
     }
 
-    if (m_needsBoundariesUpdate) {
-        setIsPaintingFallback(false);
-        m_path.clear();
-        createShape();
-        updateCachedBoundariesInParents = true;
-    }
-
     // Invalidate all resources of this client if our layout changed.
     if (everHadLayout() && selfNeedsLayout()) {
         SVGResourcesCache::clientLayoutChanged(this);