WebKit Bugzilla
Attachment 343581 Details for
Bug 187031
: [LFC] Computed height for in-flow non-replaced should not include padding and border.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-187031-20180625212821.patch (text/plain), 3.62 KB, created by
zalan
on 2018-06-25 21:28:22 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2018-06-25 21:28:22 PDT
Size:
3.62 KB
patch
obsolete
>Subversion Revision: 233188 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 0e5c357d87f2b016c1fc783757509e6476ac293e..481bb7cf873a4e10326a33e22805a9aa842a6d42 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2018-06-25 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Computed height for in-flow non-replaced should not include padding and border. >+ https://bugs.webkit.org/show_bug.cgi?id=187031 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In certain cases the height of a non-replaced in-flow box is computed using the bottom position of its last in-flow child. >+ The in-flow child's bottom position is in the coordinate system of the containing block's border box (border box's top left is 0, 0) -> >+ it includes both the (top) border and the padding of the containing block. >+ >+ * layout/blockformatting/BlockFormattingContextGeometry.cpp: >+ (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin): >+ > 2018-06-25 Zalan Bujtas <zalan@apple.com> > > [LFC] Adjust static position for out-of-flow positioned boxes. >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >index 345c800c50ff6e77049e25e4f0439b3ec4805de7..ba65b7edb4ddc0162e5757790ccf453eef527eb8 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >@@ -82,6 +82,9 @@ FormattingContext::Geometry::HeightAndMargin BlockFormattingContext::Geometry::i > if (!is<Container>(layoutBox) || !downcast<Container>(layoutBox).hasInFlowChild()) > return 0; > >+ auto& displayBox = *layoutContext.displayBoxForLayoutBox(layoutBox); >+ auto borderAndPaddingTop = displayBox.borderTop() + displayBox.paddingTop(); >+ > // 1. the bottom edge of the last line box, if the box establishes a inline formatting context with one or more lines > if (layoutBox.establishesInlineFormattingContext()) { > // height = lastLineBox().bottom(); >@@ -94,7 +97,7 @@ FormattingContext::Geometry::HeightAndMargin BlockFormattingContext::Geometry::i > if (!MarginCollapse::isMarginBottomCollapsedWithParent(*lastInFlowChild)) { > auto* lastInFlowDisplayBox = layoutContext.displayBoxForLayoutBox(*lastInFlowChild); > ASSERT(lastInFlowDisplayBox); >- return lastInFlowDisplayBox->bottom() + lastInFlowDisplayBox->marginBottom(); >+ return lastInFlowDisplayBox->bottom() + lastInFlowDisplayBox->marginBottom() - borderAndPaddingTop; > } > > // 3. the bottom border edge of the last in-flow child whose top margin doesn't collapse with the element's bottom margin >@@ -104,7 +107,7 @@ FormattingContext::Geometry::HeightAndMargin BlockFormattingContext::Geometry::i > if (inFlowChild) { > auto* inFlowDisplayBox = layoutContext.displayBoxForLayoutBox(*inFlowChild); > ASSERT(inFlowDisplayBox); >- return inFlowDisplayBox->top() + inFlowDisplayBox->borderBox().height(); >+ return inFlowDisplayBox->top() + inFlowDisplayBox->borderBox().height() - borderAndPaddingTop; > } > > // 4. zero, otherwise >@@ -287,7 +290,6 @@ FormattingContext::Geometry::Position BlockFormattingContext::Geometry::staticPo > return { left, top }; > } > >- > FormattingContext::Geometry::Position BlockFormattingContext::Geometry::staticPosition(LayoutContext& layoutContext, const Box& layoutBox) > { > // https://www.w3.org/TR/CSS22/visuren.html#block-formatting
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 187031
: 343581