WebKit Bugzilla
Attachment 356291 Details for
Bug 192274
: [LFC][BFC] Call instrinsicWidthConstraints on the correct formatting state.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192274-20181130212647.patch (text/plain), 3.86 KB, created by
zalan
on 2018-11-30 21:26:50 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-11-30 21:26:50 PST
Size:
3.86 KB
patch
obsolete
>Subversion Revision: 238737 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f858dd480f493797eb370f7901a2729601fdc83f..1b279a87e3570fc8be45ac68db9e1ffa80e1779e 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-11-30 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC] Call instrinsicWidthConstraints on the correct formatting state. >+ https://bugs.webkit.org/show_bug.cgi?id=192274 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 Zalan Bujtas <zalan@apple.com> > > [LFC][BFC] Compute min/maxHeight margins only when they are needed. >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >index 7ee27c1c681ae418b8e398a30f02e633e5cc165a..f80e31ff2dd29ff2d986d991276942fb1c848005 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContext.cpp >@@ -413,12 +413,13 @@ FormattingContext::InstrinsicWidthConstraints BlockFormattingContext::instrinsic > 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; >diff --git a/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp b/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp >index 39841cea95256a70b2b05b75ebaed228879cb2e9..32012c3ca2adf51a087ba7039e60bdcc9dec7e0d 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp >+++ b/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp >@@ -549,9 +549,7 @@ FormattingContext::InstrinsicWidthConstraints InlineFormattingContext::instrinsi > 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()) }; > } > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
koivisto
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192274
: 356291