2010-07-14 Nikolas Zimmermann <nzimmermann@rim.com>
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Jul 2010 10:41:55 +0000 (10:41 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Jul 2010 10:41:55 +0000 (10:41 +0000)
        Reviewed by Dirk Schulze.

        Inconsistent LayoutRepainter usage in the SVG renderers
        https://bugs.webkit.org/show_bug.cgi?id=42245

        Unify LayoutRepainter usage in the SVG renders, as RenderBlock does it, always use:
        LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
        instead of including selfWillPaint / selfNeedsLayout checks. This improves layout test
        performance by 8s on my machine with a debug build (from 76.72s -> 68.59s, averaged over 5 runs)

        * rendering/RenderForeignObject.cpp:
        (WebCore::RenderForeignObject::layout):
        * rendering/RenderPath.cpp:
        (WebCore::RenderPath::layout):
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::layout):
        * rendering/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::layout):
        * rendering/RenderSVGRoot.cpp:
        (WebCore::RenderSVGRoot::layout):
        * rendering/RenderSVGText.cpp:
        (WebCore::RenderSVGText::layout):

2010-07-14  Nikolas Zimmermann  <nzimmermann@rim.com>

        Reviewed by Dirk Schulze.

        Inconsistent LayoutRepainter usage in the SVG renderers
        https://bugs.webkit.org/show_bug.cgi?id=42245

        Update pixel test baseline, which shows a marignal difference, due the repaint changes.

        * platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.checksum:
        * platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.png:

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

LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.checksum
LayoutTests/platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.png
WebCore/ChangeLog
WebCore/rendering/RenderForeignObject.cpp
WebCore/rendering/RenderPath.cpp
WebCore/rendering/RenderSVGContainer.cpp
WebCore/rendering/RenderSVGImage.cpp
WebCore/rendering/RenderSVGRoot.cpp
WebCore/rendering/RenderSVGText.cpp

index 647474a..cd3ca4d 100644 (file)
@@ -1,3 +1,15 @@
+2010-07-14  Nikolas Zimmermann  <nzimmermann@rim.com>
+
+        Reviewed by Dirk Schulze.
+
+        Inconsistent LayoutRepainter usage in the SVG renderers
+        https://bugs.webkit.org/show_bug.cgi?id=42245
+
+        Update pixel test baseline, which shows a marignal difference, due the repaint changes.
+
+        * platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.checksum:
+        * platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.png:
+
 2010-07-14  Pavel Podivilov  <podivilov@chromium.org>
 
         Reviewed by Yury Semikhatsky.
index 659a460..cc235cd 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.png and b/LayoutTests/platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.png differ
index c303083..3cba5c8 100644 (file)
@@ -1,3 +1,28 @@
+2010-07-14  Nikolas Zimmermann  <nzimmermann@rim.com>
+
+        Reviewed by Dirk Schulze.
+
+        Inconsistent LayoutRepainter usage in the SVG renderers
+        https://bugs.webkit.org/show_bug.cgi?id=42245
+
+        Unify LayoutRepainter usage in the SVG renders, as RenderBlock does it, always use:
+        LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
+        instead of including selfWillPaint / selfNeedsLayout checks. This improves layout test
+        performance by 8s on my machine with a debug build (from 76.72s -> 68.59s, averaged over 5 runs)
+
+        * rendering/RenderForeignObject.cpp:
+        (WebCore::RenderForeignObject::layout):
+        * rendering/RenderPath.cpp:
+        (WebCore::RenderPath::layout):
+        * rendering/RenderSVGContainer.cpp:
+        (WebCore::RenderSVGContainer::layout):
+        * rendering/RenderSVGImage.cpp:
+        (WebCore::RenderSVGImage::layout):
+        * rendering/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::layout):
+        * rendering/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::layout):
+
 2010-07-14  Kent Tamura  <tkent@chromium.org>
 
         Unreviewed, build fix for r63300.
index 4b94bab..5a1d972 100644 (file)
@@ -98,7 +98,7 @@ void RenderForeignObject::layout()
     ASSERT(needsLayout());
     ASSERT(!view()->layoutStateEnabled()); // RenderSVGRoot disables layoutState for the SVG rendering tree.
 
-    LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
+    LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
     SVGForeignObjectElement* foreign = static_cast<SVGForeignObjectElement*>(node());
 
     if (m_needsTransformUpdate) {
index 27d480d..760c7aa 100644 (file)
@@ -97,7 +97,7 @@ bool RenderPath::strokeContains(const FloatPoint& point, bool requiresStroke) co
 
 void RenderPath::layout()
 {
-    LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && selfNeedsLayout());
+    LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
     SVGStyledTransformableElement* element = static_cast<SVGStyledTransformableElement*>(node());
 
     bool needsPathUpdate = m_needsPathUpdate;
index d4ca69f..f84a835 100644 (file)
@@ -50,7 +50,7 @@ void RenderSVGContainer::layout()
     // Allow RenderSVGViewportContainer to update its viewport.
     calcViewport();
 
-    LayoutRepainter repainter(*this, checkForRepaintDuringLayout() || selfWillPaint());
+    LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
 
     // Allow RenderSVGTransformableContainer to update its transform.
     calculateLocalTransform();
index a4572e6..a6fe6f6 100644 (file)
@@ -52,7 +52,7 @@ void RenderSVGImage::layout()
 {
     ASSERT(needsLayout());
 
-    LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
+    LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
     SVGImageElement* image = static_cast<SVGImageElement*>(node());
 
     if (m_needsTransformUpdate) {
index 9d9d901..a121aa1 100644 (file)
@@ -108,8 +108,7 @@ void RenderSVGRoot::layout()
     // Arbitrary affine transforms are incompatible with LayoutState.
     view()->disableLayoutState();
 
-    bool needsLayout = selfNeedsLayout();
-    LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && needsLayout);
+    LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
 
     IntSize oldSize(width(), height());
     calcWidth();
@@ -119,7 +118,7 @@ void RenderSVGRoot::layout()
     SVGSVGElement* svg = static_cast<SVGSVGElement*>(node());
     m_isLayoutSizeChanged = svg->hasRelativeLengths() && oldSize != size();
 
-    SVGRenderSupport::layoutChildren(this, needsLayout);
+    SVGRenderSupport::layoutChildren(this, selfNeedsLayout());
     m_isLayoutSizeChanged = false;
 
     repainter.repaintAfterLayout();
index 12f3cb5..5d2b6b3 100644 (file)
@@ -73,7 +73,7 @@ void RenderSVGText::mapLocalToContainer(RenderBoxModelObject* repaintContainer,
 void RenderSVGText::layout()
 {
     ASSERT(needsLayout());
-    LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
+    LayoutRepainter repainter(*this, m_everHadLayout && checkForRepaintDuringLayout());
 
     if (m_needsTransformUpdate) {
         SVGTextElement* text = static_cast<SVGTextElement*>(node());