WebKit Bugzilla
Attachment 346542 Details for
Bug 188319
: [LFC][BFC] contentHeightForFormattingContextRoot uses the wrong coordinate system to compute the height.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188319-20180803130816.patch (text/plain), 2.83 KB, created by
zalan
on 2018-08-03 13:08:17 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-08-03 13:08:17 PDT
Size:
2.83 KB
patch
obsolete
>Subversion Revision: 234554 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index eef5c6fb4c7d5127451d0c9274bd531b6967b326..3079c0756f3ee48dd7378715870d09cf5717d5c9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2018-08-03 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC] contentHeightForFormattingContextRoot uses the wrong coordinate system to compute the height. >+ https://bugs.webkit.org/show_bug.cgi?id=188319 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Display::Box::marginBox() is in the coordinate system of the box itself (8px top margin translates to y = -8px). >+ What we need instead to compute the content height is the top/bottom position in the containing block's coordinate system (rect and rectWithMargin). >+ >+ * layout/FormattingContextGeometry.cpp: >+ (WebCore::Layout::contentHeightForFormattingContextRoot): >+ > 2018-08-03 Zalan Bujtas <zalan@apple.com> > > [LFC][BFC] Special case the document renderer when computing the height and margin >diff --git a/Source/WebCore/layout/FormattingContextGeometry.cpp b/Source/WebCore/layout/FormattingContextGeometry.cpp >index a8ac6f6b789e2b5d1c35b67a2b4f22df58a76e68..d90be215553d1e27a6427cccbe05f35a72969f63 100644 >--- a/Source/WebCore/layout/FormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/FormattingContextGeometry.cpp >@@ -55,18 +55,20 @@ static LayoutUnit contentHeightForFormattingContextRoot(LayoutContext& layoutCon > > auto* firstDisplayBox = layoutContext.displayBoxForLayoutBox(*formattingRootContainer.firstInFlowChild()); > auto* lastDisplayBox = layoutContext.displayBoxForLayoutBox(*formattingRootContainer.lastInFlowChild()); >+ auto top = firstDisplayBox->rectWithMargin().top(); >+ auto bottom = lastDisplayBox->rectWithMargin().bottom(); >+ > 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(); >+ auto floatsBottom = layoutContext.establishedFormattingState(*formattingContextRoot).floatingState().bottom(*formattingContextRoot); > if (floatsBottom) > bottom = std::max(*floatsBottom, bottom); >+ > auto computedHeight = bottom - top; > LOG_WITH_STREAM(FormattingContextLayout, stream << "[Height] -> content height for formatting context root -> height(" << computedHeight << "px) layoutBox("<< &layoutBox << ")"); > return computedHeight;
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+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188319
: 346542 |
346575