WebKit Bugzilla
Attachment 346504 Details for
Bug 188313
: [LFC][BFC] Special case the document renderer when computing the height and margin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
Patch.txt (text/plain), 3.30 KB, created by
zalan
on 2018-08-03 10:39:16 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-08-03 10:39:16 PDT
Size:
3.30 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3c292854495..6ed491074a2 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-08-03 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC] Special case the document renderer when computing the height and margin >+ https://bugs.webkit.org/show_bug.cgi?id=188313 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The document renderer is certainly special and its geometry is likely to be computed as part of "10.6.6 Complicated cases" (spec is unclear) but probably not by >+ making the it a formatting root. Let's just special case it at contentHeightForFormattingContextRoot(), since having the document renderer as a context root has unwanted side effect. >+ >+ * layout/FormattingContextGeometry.cpp: >+ (WebCore::Layout::contentHeightForFormattingContextRoot): >+ * layout/layouttree/LayoutBox.cpp: >+ (WebCore::Layout::Box::establishesBlockFormattingContext const): >+ > 2018-08-03 Zalan Bujtas <zalan@apple.com> > > [LFC][BFC] Layout out-of-flow descendants only on the formatting context root. >diff --git a/Source/WebCore/layout/FormattingContextGeometry.cpp b/Source/WebCore/layout/FormattingContextGeometry.cpp >index a7a8c274cf8..a8ac6f6b789 100644 >--- a/Source/WebCore/layout/FormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/FormattingContextGeometry.cpp >@@ -35,7 +35,7 @@ namespace Layout { > > static LayoutUnit contentHeightForFormattingContextRoot(LayoutContext& layoutContext, const Box& layoutBox) > { >- ASSERT(layoutBox.style().logicalHeight().isAuto() && layoutBox.establishesFormattingContext()); >+ ASSERT(layoutBox.style().logicalHeight().isAuto() && (layoutBox.establishesFormattingContext() || layoutBox.isDocumentBox())); > > // 10.6.7 'Auto' heights for block formatting context roots > >@@ -55,7 +55,13 @@ static LayoutUnit contentHeightForFormattingContextRoot(LayoutContext& layoutCon > > auto* firstDisplayBox = layoutContext.displayBoxForLayoutBox(*formattingRootContainer.firstInFlowChild()); > auto* lastDisplayBox = layoutContext.displayBoxForLayoutBox(*formattingRootContainer.lastInFlowChild()); >- auto floatsBottom = layoutContext.establishedFormattingState(layoutBox).floatingState().bottom(layoutBox); >+ auto* formattingContextRoot = &layoutBox; >+ // TODO: The document renderer is not a formatting context root by default at all. Need to find out what it is. >+ if (!layoutBox.establishesFormattingContext()) { >+ ASSERT(layoutBox.isDocumentBox()); >+ formattingContextRoot = &layoutBox.formattingContextRoot(); >+ } >+ auto floatsBottom = layoutContext.establishedFormattingState(*formattingContextRoot).floatingState().bottom(*formattingContextRoot); > > auto top = firstDisplayBox->marginBox().top(); > auto bottom = lastDisplayBox->marginBox().bottom(); >diff --git a/Source/WebCore/layout/layouttree/LayoutBox.cpp b/Source/WebCore/layout/layouttree/LayoutBox.cpp >index 5fd58291c32..b6025696d6a 100644 >--- a/Source/WebCore/layout/layouttree/LayoutBox.cpp >+++ b/Source/WebCore/layout/layouttree/LayoutBox.cpp >@@ -71,9 +71,6 @@ bool Box::establishesBlockFormattingContext() const > if (isBlockLevelBox() && !isOverflowVisible()) > return true; > >- if (isDocumentBox()) >- return true; >- > return false; > } >
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 188313
: 346504