WebKit Bugzilla
Attachment 372185 Details for
Bug 198883
: [LFC][MarginCollapsing] Add check for computed height value in MarginCollapse::marginsCollapseThrough
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198883-20190615005652.patch (text/plain), 2.16 KB, created by
zalan
on 2019-06-15 00:56:55 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-06-15 00:56:55 PDT
Size:
2.16 KB
patch
obsolete
>Subversion Revision: 246456 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 5cc7b9c79cda3d1d0f5a4bd5552bd33cd8839cb9..5b874274a8716dcc63c9857c13eaf21346a6e75e 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-06-15 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][MarginCollapsing] Add check for computed height value in MarginCollapse::marginsCollapseThrough >+ https://bugs.webkit.org/show_bug.cgi?id=198883 >+ <rdar://problem/51773395> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ "A box's own margins collapse if... ...and it has a 'height' of either 0 or 'auto" >+ https://www.w3.org/TR/CSS22/box.html#collapsing-margins >+ >+ * layout/blockformatting/BlockMarginCollapse.cpp: >+ (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough): >+ > 2019-06-15 Zalan Bujtas <zalan@apple.com> > > [LFC][MarginCollapsing] Remove redundant checks in MarginCollapse::marginBefore/AfterCollapsesWith* >diff --git a/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp b/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp >index 00ae5b68013493db40ad5e36c9ba31d213e3d1f2..715d3df711137c83ec7bbaf4518fd051a18f51fa 100644 >--- a/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp >@@ -368,12 +368,13 @@ bool BlockFormattingContext::MarginCollapse::marginsCollapseThrough(const Layout > if (hasPaddingBefore(layoutBox) || hasPaddingAfter(layoutBox)) > return false; > >- // FIXME: Check for computed 0 height. >- if (!layoutBox.style().height().isAuto()) >+ auto& style = layoutBox.style(); >+ auto computedHeightValueIsZero = style.height().isFixed() && !style.height().value(); >+ if (!(style.height().isAuto() || computedHeightValueIsZero)) > return false; > > // FIXME: Check for computed 0 height. >- if (!layoutBox.style().minHeight().isAuto()) >+ if (!style.minHeight().isAuto()) > return false; > > // FIXME: Block replaced boxes clearly don't collapse through their margins, but I couldn't find it in the spec yet (and no, it's not a quirk).
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198883
:
372183
| 372185