RenderBox::updateShapeOutsideInfoAfterStyleChange shows up on profiles
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Feb 2014 06:02:11 +0000 (06:02 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Feb 2014 06:02:11 +0000 (06:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=129075

Reviewed by Dean Jackson.

updateShapeOutsideInfoAfterStyleChange() showed up on profiles in content
with no shapes. Avoid calling this if no style has shapeOutside().

* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp

index 7c891da..bc06e8e 100644 (file)
@@ -1,3 +1,16 @@
+2014-02-20  Simon Fraser  <simon.fraser@apple.com>
+
+        RenderBox::updateShapeOutsideInfoAfterStyleChange shows up on profiles
+        https://bugs.webkit.org/show_bug.cgi?id=129075
+
+        Reviewed by Dean Jackson.
+
+        updateShapeOutsideInfoAfterStyleChange() showed up on profiles in content
+        with no shapes. Avoid calling this if no style has shapeOutside().
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::styleDidChange):
+
 2014-02-20  ChangSeok Oh  <changseok.oh@collabora.com>
 
         Remove unused chromium stuff in Extensions3D
index 0499e7a..c32584c 100644 (file)
@@ -381,7 +381,8 @@ void RenderBox::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle
     }
 
 #if ENABLE(CSS_SHAPES)
-    updateShapeOutsideInfoAfterStyleChange(style(), oldStyle);
+    if ((oldStyle && oldStyle->shapeOutside()) || style().shapeOutside())
+        updateShapeOutsideInfoAfterStyleChange(style(), oldStyle);
 #endif
 }