WebKit Bugzilla
Attachment 359217 Details for
Bug 193470
: [LFC][Out-of-flow] Set used vertical margin values when top/height/bottom are non-auto.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193470-20190115161521.patch (text/plain), 6.29 KB, created by
zalan
on 2019-01-15 16:15:36 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-01-15 16:15:36 PST
Size:
6.29 KB
patch
obsolete
>Subversion Revision: 239991 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1e425cae5c8a7b376a534c723f012d37d0381dc1..b2090a001c6a426f1b6f69190efdc48fea4cff53 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-01-15 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][Out-of-flow] Set used vertical margin values when top/height/bottom are non-auto. >+ https://bugs.webkit.org/show_bug.cgi?id=193470 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Non-auto vertical margin values (which is mostly the case) should be set as used values. >+ >+ Test: fast/block/block-only/non-auto-top-bottom-height-with-margins.html >+ >+ * layout/FormattingContextGeometry.cpp: >+ (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry): >+ > 2019-01-15 Zalan Bujtas <zalan@apple.com> > > [LFC][Out-of-flow] Ignore bottom when the vertical values are over-constrained >diff --git a/Source/WebCore/layout/FormattingContextGeometry.cpp b/Source/WebCore/layout/FormattingContextGeometry.cpp >index f5fec044b2f340b2da11048d3a785e59a5201ba6..6c3102ce89c9f2cc771e21b4c595b92f5b79859b 100644 >--- a/Source/WebCore/layout/FormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/FormattingContextGeometry.cpp >@@ -304,7 +304,8 @@ VerticalGeometry FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeomet > } else if (!computedVerticalMargin.after) { > usedVerticalMargin.before = *computedVerticalMargin.before; > usedVerticalMargin.after = containingBlockHeight - (*top + usedVerticalMargin.before + borderTop + paddingTop + contentHeight() + paddingBottom + borderBottom + *bottom); >- } >+ } else >+ usedVerticalMargin = { *computedVerticalMargin.before, *computedVerticalMargin.after }; > // Over-constrained? > auto boxHeight = *top + usedVerticalMargin.before + borderTop + paddingTop + contentHeight() + paddingBottom + borderBottom + usedVerticalMargin.after + *bottom; > if (boxHeight != containingBlockHeight) >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 050aee992e922d9190f569ec8a50724aa1b16046..0ca009d82171ceac2d6ee155d1e79658604ca424 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,12 @@ >+2019-01-15 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][Out-of-flow] Set used vertical margin values when top/height/bottom are non-auto. >+ https://bugs.webkit.org/show_bug.cgi?id=193470 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * LayoutReloaded/misc/LFC-passing-tests.txt: >+ > 2019-01-15 Zalan Bujtas <zalan@apple.com> > > [LFC][Out-of-flow] Ignore bottom when the vertical values are over-constrained >diff --git a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt b/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >index 42d36df795f86953835de7b806176632ce3df864..2e17460f024060c19e65231b8e2edbc21bfabc2f 100644 >--- a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >+++ b/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >@@ -79,6 +79,7 @@ fast/block/block-only/relative-simple.html > fast/block/block-only/box-sizing-inflow-out-of-flow-simple.html > fast/block/block-only/out-of-flow-with-containing-block-border-padding.html > fast/block/block-only/non-auto-top-bottom-left-right-widht-height-out-of-flow.html >+fast/block/block-only/non-auto-top-bottom-height-with-margins.html > fast/block/basic/002.html > fast/block/basic/003.html > fast/block/basic/006.html >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 411004ba5dae1b7c93b339628c417c1fbb903c2a..2ea4dbf1a40041ebca6536188df6f0025ddd04c1 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2019-01-15 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][Out-of-flow] Set used vertical margin values when top/height/bottom are non-auto. >+ https://bugs.webkit.org/show_bug.cgi?id=193470 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/block/block-only/non-auto-top-bottom-height-with-margins-expected.txt: Added. >+ * fast/block/block-only/non-auto-top-bottom-height-with-margins.html: Added. >+ > 2019-01-15 Zalan Bujtas <zalan@apple.com> > > [LFC][Out-of-flow] Ignore bottom when the vertical values are over-constrained >diff --git a/LayoutTests/fast/block/block-only/non-auto-top-bottom-height-with-margins-expected.txt b/LayoutTests/fast/block/block-only/non-auto-top-bottom-height-with-margins-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..9b747284544e8cca9d5e088865b86157e3fdad07 >--- /dev/null >+++ b/LayoutTests/fast/block/block-only/non-auto-top-bottom-height-with-margins-expected.txt >@@ -0,0 +1,17 @@ >+layer at (0,0) size 800x600 >+ RenderView at (0,0) size 800x600 >+layer at (0,0) size 800x600 >+ RenderBlock {HTML} at (0,0) size 800x600 >+ RenderBody {BODY} at (8,8) size 784x584 >+layer at (8,8) size 110x110 >+ RenderBlock (relative positioned) {DIV} at (0,0) size 110x110 [border: (5px solid #008000)] >+layer at (13,33) size 50x50 >+ RenderBlock (positioned) {DIV} at (5,25) size 50x50 [bgcolor=#0000FF] >+layer at (8,118) size 110x110 >+ RenderBlock (relative positioned) {DIV} at (0,110) size 110x110 [border: (5px solid #008000)] >+layer at (13,133) size 50x50 >+ RenderBlock (positioned) {DIV} at (5,15) size 50x50 [bgcolor=#0000FF] >+layer at (8,228) size 110x110 >+ RenderBlock (relative positioned) {DIV} at (0,220) size 110x110 [border: (5px solid #008000)] >+layer at (13,253) size 50x50 >+ RenderBlock (positioned) {DIV} at (5,25) size 50x50 [bgcolor=#0000FF] >diff --git a/LayoutTests/fast/block/block-only/non-auto-top-bottom-height-with-margins.html b/LayoutTests/fast/block/block-only/non-auto-top-bottom-height-with-margins.html >new file mode 100644 >index 0000000000000000000000000000000000000000..af25ab25c47feaecbb436b4dbd50bea161832a89 >--- /dev/null >+++ b/LayoutTests/fast/block/block-only/non-auto-top-bottom-height-with-margins.html >@@ -0,0 +1,22 @@ >+<style> >+.container { >+ border: 5px solid green; >+ height: 100px; >+ width: 100px; >+ position: relative; >+} >+ >+div div { >+ background: blue; >+ position: absolute; >+ >+ height: 50px; >+ width: 50px; >+ >+ top: 10px; >+ bottom: 10px; >+} >+</style> >+<div class=container><div style="margin-top: 10px;"></div></div> >+<div class=container><div style="margin-bottom: 10px;"></div></div> >+<div class=container><div style="margin-top: 10px; margin-bottom: 10px;"></div></div>
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+
commit-queue
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193470
: 359217