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. |