Title: [230480] trunk/Source/WebCore
Revision
230480
Author
za...@apple.com
Date
2018-04-10 07:56:21 -0700 (Tue, 10 Apr 2018)

Log Message

Do not layout images when we only need the overflow information.
https://bugs.webkit.org/show_bug.cgi?id=175331

Reviewed by Simon Fraser.

This improves MotionMark's Simple Leaves by ~10%.

Covered by existing tests.

* rendering/RenderImage.cpp:
(WebCore::RenderImage::layout):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (230479 => 230480)


--- trunk/Source/WebCore/ChangeLog	2018-04-10 10:47:16 UTC (rev 230479)
+++ trunk/Source/WebCore/ChangeLog	2018-04-10 14:56:21 UTC (rev 230480)
@@ -1,3 +1,17 @@
+2018-04-10  Zalan Bujtas  <za...@apple.com>
+
+        Do not layout images when we only need the overflow information.
+        https://bugs.webkit.org/show_bug.cgi?id=175331
+
+        Reviewed by Simon Fraser.
+
+        This improves MotionMark's Simple Leaves by ~10%. 
+
+        Covered by existing tests.
+
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::layout):
+
 2018-04-10  Zan Dobersek  <zdober...@igalia.com>
 
         [TexMap] TextureMapperLayer unnecessarily duplicates state in GraphicsLayerTransform

Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (230479 => 230480)


--- trunk/Source/WebCore/rendering/RenderImage.cpp	2018-04-10 10:47:16 UTC (rev 230479)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp	2018-04-10 14:56:21 UTC (rev 230480)
@@ -699,6 +699,12 @@
 
 void RenderImage::layout()
 {
+    // Recomputing overflow is required only when child content is present. 
+    if (needsSimplifiedNormalFlowLayout() && !m_hasShadowControls) {
+        clearNeedsLayout();
+        return;
+    }
+
     StackStats::LayoutCheckPoint layoutCheckPoint;
 
     LayoutSize oldSize = contentBoxRect().size();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to