Skip to content

Commit

Permalink
Merge r230480 - Do not layout images when we only need the overflow i…
Browse files Browse the repository at this point in the history
…nformation.

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):
  • Loading branch information
alanbaradlay authored and carlosgcampos committed May 7, 2018
1 parent b72ca48 commit 1dd95df
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,17 @@
2018-04-10 Zalan Bujtas <zalan@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-09 Michael Catanzaro <mcatanzaro@igalia.com>

Unreviewed, rolling out r230390.
Expand Down
6 changes: 6 additions & 0 deletions Source/WebCore/rendering/RenderImage.cpp
Expand Up @@ -699,6 +699,12 @@ bool RenderImage::canHaveChildren() const

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();
Expand Down

0 comments on commit 1dd95df

Please sign in to comment.