WebKit Bugzilla
Attachment 359248 Details for
Bug 193482
: [LFC] Adjust margin box verification.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193482-20190115193903.patch (text/plain), 6.88 KB, created by
zalan
on 2019-01-15 19:39:19 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-01-15 19:39:19 PST
Size:
6.88 KB
patch
obsolete
>Subversion Revision: 239991 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1e425cae5c8a7b376a534c723f012d37d0381dc1..b3efdb192090b94db137fb360d729bb603f7ae0f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2019-01-15 Alan Kinsley <zalan@apple.com> >+ >+ [LFC] Adjust margin box verification. >+ https://bugs.webkit.org/show_bug.cgi?id=193482 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ In certain cases, like out-of-flow boxes with margin auto, marginBoxRect() returns 0. It's clearly incorrect, >+ so let's check the individual margin values instead (and at this point we know that all other boxes match). >+ >+ Test: fast/block/block-only/non-auto-top-bottom-height-with-auto-margins.html >+ >+ * layout/Verification.cpp: >+ (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded): >+ > 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/Verification.cpp b/Source/WebCore/layout/Verification.cpp >index 64f7a84f340664467f74da5c007076d272a643b9..4f26c4f7ed3c7cc53a1ba24e7dd97b4317600423 100644 >--- a/Source/WebCore/layout/Verification.cpp >+++ b/Source/WebCore/layout/Verification.cpp >@@ -265,11 +265,6 @@ static bool outputMismatchingBlockBoxInformationIfNeeded(TextStream& stream, con > return true; > } > >- if (renderer.marginBoxRect() != renderBoxLikeMarginBox(displayBox)) { >- outputRect("marginBox", renderer.marginBoxRect(), renderBoxLikeMarginBox(displayBox)); >- return true; >- } >- > if (renderer.borderBoxRect() != displayBox.borderBox()) { > outputRect("borderBox", renderer.borderBoxRect(), displayBox.borderBox()); > return true; >@@ -285,6 +280,20 @@ static bool outputMismatchingBlockBoxInformationIfNeeded(TextStream& stream, con > return true; > } > >+ if (renderer.marginBoxRect() != renderBoxLikeMarginBox(displayBox)) { >+ // In certain cases, like out-of-flow boxes with margin auto, marginBoxRect() returns 0. It's clearly incorrect, >+ // so let's check the individual margin values instead (and at this point we know that all other boxes match). >+ auto marginsMatch = displayBox.marginBefore() == renderer.marginBefore() >+ && displayBox.marginAfter() == renderer.marginAfter() >+ && displayBox.marginStart() == renderer.marginStart() >+ && displayBox.marginEnd() == renderer.marginEnd(); >+ >+ if (!marginsMatch) { >+ outputRect("marginBox", renderer.marginBoxRect(), renderBoxLikeMarginBox(displayBox)); >+ return true; >+ } >+ } >+ > return false; > } > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 050aee992e922d9190f569ec8a50724aa1b16046..2f7e7531a2e7e1fd54c842de1efb9853af262e63 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,12 @@ >+2019-01-15 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Adjust margin box verification. >+ https://bugs.webkit.org/show_bug.cgi?id=193482 >+ >+ 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..4de3e44ab39c746b0e956f7e15441989f764fa83 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-auto-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..82b098a516780c93ee954eeeef9972b63573cb89 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2019-01-15 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC] Adjust margin box verification. >+ https://bugs.webkit.org/show_bug.cgi?id=193482 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/block/block-only/non-auto-top-bottom-height-with-auto-margins-expected.txt: Added. >+ * fast/block/block-only/non-auto-top-bottom-height-with-auto-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-auto-margins-expected.txt b/LayoutTests/fast/block/block-only/non-auto-top-bottom-height-with-auto-margins-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..dbda70208b2993ec0f925d4bf99231b7dcb32d94 >--- /dev/null >+++ b/LayoutTests/fast/block/block-only/non-auto-top-bottom-height-with-auto-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,53) size 50x50 >+ RenderBlock (positioned) {DIV} at (5,45) 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,258) size 50x50 >+ RenderBlock (positioned) {DIV} at (5,30) size 50x50 [bgcolor=#0000FF] >diff --git a/LayoutTests/fast/block/block-only/non-auto-top-bottom-height-with-auto-margins.html b/LayoutTests/fast/block/block-only/non-auto-top-bottom-height-with-auto-margins.html >new file mode 100644 >index 0000000000000000000000000000000000000000..6272e875deb7a00e0aa73088b59c83c631b0d608 >--- /dev/null >+++ b/LayoutTests/fast/block/block-only/non-auto-top-bottom-height-with-auto-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: auto;"></div></div> >+<div class=container><div style="margin-bottom: auto;"></div></div> >+<div class=container><div style="margin-top: auto; margin-bottom: auto;"></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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193482
: 359248