Title: [238781] trunk/Source/WebCore
- Revision
- 238781
- Author
- [email protected]
- Date
- 2018-12-01 08:03:52 -0800 (Sat, 01 Dec 2018)
Log Message
[LFC][BFC] Call instrinsicWidthConstraints on the correct formatting state.
https://bugs.webkit.org/show_bug.cgi?id=192274
Reviewed by Antti Koivisto.
When we call intrinsic width on a formatting context root, we need to use the formatting state
that this root constructs and not the one it lives in.
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::instrinsicWidthConstraints const):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const): it's the caller's responsiblitiy to store the intrinsic values.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (238780 => 238781)
--- trunk/Source/WebCore/ChangeLog 2018-12-01 15:12:42 UTC (rev 238780)
+++ trunk/Source/WebCore/ChangeLog 2018-12-01 16:03:52 UTC (rev 238781)
@@ -1,3 +1,18 @@
+2018-12-01 Zalan Bujtas <[email protected]>
+
+ [LFC][BFC] Call instrinsicWidthConstraints on the correct formatting state.
+ https://bugs.webkit.org/show_bug.cgi?id=192274
+
+ Reviewed by Antti Koivisto.
+
+ When we call intrinsic width on a formatting context root, we need to use the formatting state
+ that this root constructs and not the one it lives in.
+
+ * layout/blockformatting/BlockFormattingContext.cpp:
+ (WebCore::Layout::BlockFormattingContext::instrinsicWidthConstraints const):
+ * layout/inlineformatting/InlineFormattingContext.cpp:
+ (WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const): it's the caller's responsiblitiy to store the intrinsic values.
+
2018-11-30 Alex Christensen <[email protected]>
Fix Windows build.
Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp (238780 => 238781)
--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2018-12-01 15:12:42 UTC (rev 238780)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp 2018-12-01 16:03:52 UTC (rev 238781)
@@ -413,12 +413,13 @@
auto skipDescendants = formattingState.instrinsicWidthConstraints(childBox) || !Geometry::instrinsicWidthConstraintsNeedChildrenWidth(childBox) || childBox.establishesFormattingContext();
if (skipDescendants) {
+ InstrinsicWidthConstraints instrinsicWidthConstraints;
if (!Geometry::instrinsicWidthConstraintsNeedChildrenWidth(childBox))
- formattingState.setInstrinsicWidthConstraints(childBox, Geometry::instrinsicWidthConstraints(layoutState, childBox));
+ instrinsicWidthConstraints = Geometry::instrinsicWidthConstraints(layoutState, childBox);
else if (childBox.establishesFormattingContext())
- formattingState.setInstrinsicWidthConstraints(childBox, formattingState.formattingContext(childBox)->instrinsicWidthConstraints());
+ instrinsicWidthConstraints = layoutState.createFormattingStateForFormattingRootIfNeeded(childBox).formattingContext(childBox)->instrinsicWidthConstraints();
+ formattingState.setInstrinsicWidthConstraints(childBox, instrinsicWidthConstraints);
- ASSERT(formattingState.instrinsicWidthConstraints(childBox));
queue.removeLast();
if (!childBox.nextInFlowOrFloatingSibling())
break;
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp (238780 => 238781)
--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2018-12-01 15:12:42 UTC (rev 238780)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2018-12-01 16:03:52 UTC (rev 238781)
@@ -549,9 +549,7 @@
return maxContentLogicalRight;
};
- auto instrinsicWidthConstraints = FormattingContext::InstrinsicWidthConstraints { maximumLineWidth(0), maximumLineWidth(LayoutUnit::max()) };
- formattingStateForRoot.setInstrinsicWidthConstraints(root(), instrinsicWidthConstraints);
- return instrinsicWidthConstraints;
+ return FormattingContext::InstrinsicWidthConstraints { maximumLineWidth(0), maximumLineWidth(LayoutUnit::max()) };
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes