Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Unified Diff: third_party/WebKit/Source/core/layout/line/LineBoxList.cpp

Issue 1550513003: Skip dirtying lines when attaching children prior to attaching oneself (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Skip dirtying lines when attaching children prior to attaching oneself Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
diff --git a/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp b/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
index 045661e60448b806b255d3d0a5f49ea37004351b..1a4dab9de6fc17d0c31e33d7298672a400a88f44 100644
--- a/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
+++ b/third_party/WebKit/Source/core/layout/line/LineBoxList.cpp
@@ -234,6 +234,12 @@ void LineBoxList::dirtyLinesFromChangedChild(LineLayoutItem container, LineLayou
return;
LineLayoutInline inlineContainer = container.isLayoutInline() ? LineLayoutInline(container) : LineLayoutInline();
+
+ // If we are attaching children dirtying lines is unnecessary as we will do a full layout
+ // of the inline's contents anyway.
+ if (inlineContainer && inlineContainer.node() && inlineContainer.node()->needsAttach())
+ return;
+
InlineBox* firstBox = inlineContainer ? inlineContainer.firstLineBoxIncludingCulling() : firstLineBox();
// If we have no first line box, then just bail early.

Powered by Google App Engine
This is Rietveld 408576698