WebKit Bugzilla
Attachment 361964 Details for
Bug 194622
: [LFC][BFC][MarginCollapse] Replaced boxes don't collapse through their margins
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194622-20190213164749.patch (text/plain), 5.44 KB, created by
zalan
on 2019-02-13 16:47:56 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-02-13 16:47:56 PST
Size:
5.44 KB
patch
obsolete
>Subversion Revision: 241325 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 89f81a2af92660f3f79ff12993c66a8ea8fe535e..17cd1c708e91f53a8e3195e04909329d3ae7537e 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-02-13 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC][MarginCollapse] Replaced boxes don't collapse through their margins >+ https://bugs.webkit.org/show_bug.cgi?id=194622 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Ensure that block replaced boxes don't collapse through their vertical margins. >+ >+ Test: fast/block/block-only/block-replaced-with-vertical-margins.html >+ >+ * layout/blockformatting/BlockMarginCollapse.cpp: >+ (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough): >+ * page/FrameViewLayoutContext.cpp: >+ (WebCore::layoutUsingFormattingContext): >+ > 2019-02-12 Wenson Hsieh <wenson_hsieh@apple.com> > > Allow pages to trigger programmatic paste from script on iOS >diff --git a/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp b/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp >index fc9ef81774973ab0676e15395e55c46aff4b7c5c..00e0a0f44ade82da21d3656000a0c6d21fc56ef2 100644 >--- a/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockMarginCollapse.cpp >@@ -392,6 +392,10 @@ bool BlockFormattingContext::MarginCollapse::marginsCollapseThrough(const Layout > if (!layoutBox.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). >+ if (layoutBox.isReplaced()) >+ return false; >+ > if (!is<Container>(layoutBox)) > return true; > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 4c18814d35a5339168e03f014d07bf885e5e0752..de8584d5ab282c8bb8e0bb1a79973cc1ae3849e0 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,12 @@ >+2019-02-13 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC][MarginCollapse] Replaced boxes don't collapse through their margins >+ https://bugs.webkit.org/show_bug.cgi?id=194622 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * LayoutReloaded/misc/LFC-passing-tests.txt: >+ > 2019-02-12 Zalan Bujtas <zalan@apple.com> > > [LFC] Expand tests coverage (60 new tests -> 860) >diff --git a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt b/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >index 8a95f9e338d6d59680c09ed00b310cc282c1dfcd..277f237270b400b37754344906705a612dd05a52 100644 >--- a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >+++ b/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >@@ -43,6 +43,7 @@ fast/block/block-only/absolute-width-shrink-to-fit.html > fast/block/block-only/absolute-width-stretch.html > fast/block/block-only/absolute-with-static-block-position-nested.html > fast/block/block-only/almost-intruding-left-float-simple.html >+fast/block/block-only/block-replaced-with-vertical-margins.html > fast/block/block-only/body-height-with-auto-html-height-quirk2.html > fast/block/block-only/body-height-with-auto-html-height-quirk.html > fast/block/block-only/body-height-with-non-auto-html-height-quirk2.html >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index ace72cb0da961f9ec8b8880848986f35940b87cf..e71a19f90df232cd79bdffb91e85692df852db32 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2019-02-13 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC][MarginCollapse] Replaced boxes don't collapse through their margins >+ https://bugs.webkit.org/show_bug.cgi?id=194622 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/block/block-only/block-replaced-with-vertical-margins-expected.html: Added. >+ * fast/block/block-only/block-replaced-with-vertical-margins.html: Added. >+ > 2019-02-12 Wenson Hsieh <wenson_hsieh@apple.com> > > Allow pages to trigger programmatic paste from script on iOS >diff --git a/LayoutTests/fast/block/block-only/block-replaced-with-vertical-margins-expected.html b/LayoutTests/fast/block/block-only/block-replaced-with-vertical-margins-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..e8a5bf2ac9d7a1ce8d8f87b392bbd675ff9c29ce >--- /dev/null >+++ b/LayoutTests/fast/block/block-only/block-replaced-with-vertical-margins-expected.html >@@ -0,0 +1,17 @@ >+<style> >+.first { >+ min-height: 0.1px; >+ width: 100px; >+ margin-top: 100px; >+ margin-bottom: 10px; >+ outline: 5px solid blue; >+} >+ >+.second { >+ width: 100px; >+ height: 100px; >+ margin-top: 20px; >+ outline: 5px solid blue; >+} >+</style> >+<div class=first></div><div class=second></div> >\ No newline at end of file >diff --git a/LayoutTests/fast/block/block-only/block-replaced-with-vertical-margins.html b/LayoutTests/fast/block/block-only/block-replaced-with-vertical-margins.html >new file mode 100644 >index 0000000000000000000000000000000000000000..d3e021d91cc598ebe6bef0126c0028d27826dde2 >--- /dev/null >+++ b/LayoutTests/fast/block/block-only/block-replaced-with-vertical-margins.html >@@ -0,0 +1,19 @@ >+<style> >+img { >+ display: block; >+ height: 0px; >+ min-height: 0px; >+ width: 100px; >+ margin-top: 100px; >+ margin-bottom: 10px; >+ outline: 5px solid blue; >+} >+ >+div { >+ width: 100px; >+ height: 100px; >+ margin-top: 20px; >+ outline: 5px solid blue; >+} >+</style> >+<img src="foobar.jpg"><div></div> >\ No newline at end of file
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 194622
: 361964