Title: [252866] trunk/Source/WebCore
- Revision
- 252866
- Author
- [email protected]
- Date
- 2019-11-25 11:06:25 -0800 (Mon, 25 Nov 2019)
Log Message
[LFC] Do not run layout when setNeedsLayout is disabled
https://bugs.webkit.org/show_bug.cgi?id=204586
<rdar://problem/57475333>
Reviewed by Antti Koivisto.
setNeedsLayout is disabled while the content size is set on the ScrollView. It triggers a forced layout in WebkitLegacy.
* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::layout):
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (252865 => 252866)
--- trunk/Source/WebCore/ChangeLog 2019-11-25 18:33:52 UTC (rev 252865)
+++ trunk/Source/WebCore/ChangeLog 2019-11-25 19:06:25 UTC (rev 252866)
@@ -1,5 +1,20 @@
2019-11-25 Zalan Bujtas <[email protected]>
+ [LFC] Do not run layout when setNeedsLayout is disabled
+ https://bugs.webkit.org/show_bug.cgi?id=204586
+ <rdar://problem/57475333>
+
+ Reviewed by Antti Koivisto.
+
+ setNeedsLayout is disabled while the content size is set on the ScrollView. It triggers a forced layout in WebkitLegacy.
+
+ * layout/LayoutContext.cpp:
+ (WebCore::Layout::LayoutContext::layout):
+ * page/FrameViewLayoutContext.cpp:
+ (WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
+
+2019-11-25 Zalan Bujtas <[email protected]>
+
[LFC][IFC] Rename Line to LineBuilder
https://bugs.webkit.org/show_bug.cgi?id=204584
<rdar://problem/57474964>
Modified: trunk/Source/WebCore/layout/LayoutContext.cpp (252865 => 252866)
--- trunk/Source/WebCore/layout/LayoutContext.cpp 2019-11-25 18:33:52 UTC (rev 252865)
+++ trunk/Source/WebCore/layout/LayoutContext.cpp 2019-11-25 19:06:25 UTC (rev 252866)
@@ -59,6 +59,11 @@
void LayoutContext::layout(const LayoutSize& rootContentBoxSize, InvalidationState& invalidationState)
{
PhaseScope scope(Phase::Type::Layout);
+
+ auto& formattingContextRootsForLayout = invalidationState.formattingContextRoots();
+ if (formattingContextRootsForLayout.computesEmpty())
+ return;
+
// Set the geometry on the root.
// Note that we never layout the root box. It has to have an already computed geometry (in case of ICB, it's the view geometry).
// ICB establishes the initial BFC, but it does not live in a formatting context and while a non-ICB root(subtree layout) has to have a formatting context,
@@ -72,9 +77,6 @@
displayBox.setTopLeft({ });
displayBox.setContentBoxHeight(rootContentBoxSize.height());
displayBox.setContentBoxWidth(rootContentBoxSize.width());
-
- auto& formattingContextRootsForLayout = invalidationState.formattingContextRoots();
- ASSERT(!formattingContextRootsForLayout.computesEmpty());
for (auto& formattingContextRoot : formattingContextRootsForLayout)
layoutFormattingContextSubtree(formattingContextRoot, invalidationState);
}
Modified: trunk/Source/WebCore/page/FrameViewLayoutContext.cpp (252865 => 252866)
--- trunk/Source/WebCore/page/FrameViewLayoutContext.cpp 2019-11-25 18:33:52 UTC (rev 252865)
+++ trunk/Source/WebCore/page/FrameViewLayoutContext.cpp 2019-11-25 19:06:25 UTC (rev 252866)
@@ -73,8 +73,11 @@
// FIXME: This is not the real invalidation yet.
auto invalidationState = Layout::InvalidationState { };
auto invalidationContext = Layout::InvalidationContext { invalidationState };
- invalidationContext.styleChanged(*m_layoutState->root().firstChild(), StyleDifference::Layout);
+ // FrameView::setContentsSize temporary disables layout.
+ if (!m_disableSetNeedsLayoutCount)
+ invalidationContext.styleChanged(*m_layoutState->root().firstChild(), StyleDifference::Layout);
+
auto layoutContext = Layout::LayoutContext { *m_layoutState };
layoutContext.layout(view().layoutSize(), invalidationState);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes