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

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

Issue 1940773002: Prevent markContainerChainForLayout to scheduleRelayout() if isInPerformLayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: 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 a8d5d0ac97e786501b826f6565b2c950f175126e..de7715c257b6c677470c7ebe94ce04b8d8523d03 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -765,7 +765,12 @@ void LayoutObject::markContainerChainForLayout(bool scheduleRelayout, SubtreeLay
{
ASSERT(!isSetNeedsLayoutForbidden());
ASSERT(!layouter || this != layouter->root());
- 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