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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 1906803002: Prevent markContainerChainForLayout to scheduleRelayout() if isInPerformLayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo "scheddule" Created 4 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 0204a2614af5b3f66a06967dbaf95bdadfb5616a..1e1b2b7f1f968d42e5b64d61cc46fe85a58e1b21 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -752,10 +752,12 @@ void LayoutObject::markContainerChainForLayout(bool scheduleRelayout, SubtreeLay
{
ASSERT(!isSetNeedsLayoutForbidden());
ASSERT(!layouter || this != layouter->root());
- // When we have a layouter, it means that we're in layout and we're marking
- // a descendant as needing layout with the intention of visiting it during
- // this layout. We shouldn't be scheduling it to be laid out later.
- ASSERT(!scheduleRelayout || !layouter);
+ // When we're in layout, we're marking a descendant as needing layout with
+ // the intention of visiting it during this layout. We shouldn't be
+ // scheduling it to be laid out later.
+ // Also, scheduleRelayout() must not be called while iterating
+ // FrameView::m_layoutSubtreeRootList.
+ scheduleRelayout &= !frameView()->isInPerformLayout();
LayoutObject* object = container();
LayoutObject* last = this;
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698