WebKit Bugzilla
Attachment 359639 Details for
Bug 193617
: [LFC][BFC] <body>'s overflow property value is propagated to viewport
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193617-20190120094109.patch (text/plain), 4.86 KB, created by
zalan
on 2019-01-20 09:41:13 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-01-20 09:41:13 PST
Size:
4.86 KB
patch
obsolete
>Subversion Revision: 240207 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 69c248588019dbf471e0c990f5b2d51f9787b3d3..ee867c664ca66a87c24da6d97db7d7be07353867 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-01-19 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC] <body>'s overflow property value is propagated to viewport >+ https://bugs.webkit.org/show_bug.cgi?id=193617 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When the root element is an HTML "HTML" element or an XHTML "html" element, and that element has an HTML "BODY" element >+ or an XHTML "body" element as a child, user agents must instead apply the 'overflow' property from the first such child element to the viewport, >+ if the value on the root element is 'visible'. The 'visible' value when used for the viewport must be interpreted as 'auto'. >+ The element from which the value is propagated must have a used value for 'overflow' of 'visible'. >+ >+ This also has impact on layout since <body style="overflow: hidden"> would establish a block formatting context. >+ >+ * layout/layouttree/LayoutBox.cpp: >+ (WebCore::Layout::Box::isOverflowVisible const): >+ > 2019-01-19 Zalan Bujtas <zalan@apple.com> > > [LFC][Floats] Ensure that floats in FloatingContext::m_floats are always horizontally ordered. >diff --git a/Source/WebCore/layout/layouttree/LayoutBox.cpp b/Source/WebCore/layout/layouttree/LayoutBox.cpp >index c8f7d4593e00bf90a4472cf4d6736aab20123c82..7a3107aa737fc28afcbc6722adf0e9ee7cffcc27 100644 >--- a/Source/WebCore/layout/layouttree/LayoutBox.cpp >+++ b/Source/WebCore/layout/layouttree/LayoutBox.cpp >@@ -262,7 +262,32 @@ const Box* Box::previousInFlowOrFloatingSibling() const > > bool Box::isOverflowVisible() const > { >- return m_style.overflowX() == Overflow::Visible || m_style.overflowY() == Overflow::Visible; >+ auto isOverflowVisible = m_style.overflowX() == Overflow::Visible || m_style.overflowY() == Overflow::Visible; >+ // UAs must apply the 'overflow' property set on the root element to the viewport. When the root element is an HTML "HTML" element >+ // or an XHTML "html" element, and that element has an HTML "BODY" element or an XHTML "body" element as a child, >+ // user agents must instead apply the 'overflow' property from the first such child element to the viewport, >+ // if the value on the root element is 'visible'. The 'visible' value when used for the viewport must be interpreted as 'auto'. >+ // The element from which the value is propagated must have a used value for 'overflow' of 'visible'. >+ if (isBodyBox()) { >+ auto* documentBox = parent(); >+ ASSERT(documentBox); >+ if (!documentBox->isDocumentBox()) >+ return isOverflowVisible; >+ if (!documentBox->isOverflowVisible()) >+ return isOverflowVisible; >+ return true; >+ } >+ if (isInitialContainingBlock()) { >+ auto* documentBox = downcast<Container>(*this).firstChild(); >+ if (!documentBox || !documentBox->isDocumentBox() || !is<Container>(documentBox)) >+ return isOverflowVisible; >+ auto* bodyBox = downcast<Container>(documentBox)->firstChild(); >+ if (!bodyBox || !bodyBox->isBodyBox()) >+ return isOverflowVisible; >+ auto& bodyBoxStyle = bodyBox->style(); >+ return bodyBoxStyle.overflowX() == Overflow::Visible || bodyBoxStyle.overflowY() == Overflow::Visible; >+ } >+ return isOverflowVisible; > } > > bool Box::isPaddingApplicable() const >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 0990b8874bac22dae8f16bb52c0c1f7747eee58c..c367be2696350d6482ba57dfbc13194e03da9bcc 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,12 @@ >+2019-01-19 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC] <body>'s overflow property value is propagated to viewport >+ https://bugs.webkit.org/show_bug.cgi?id=193617 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * LayoutReloaded/misc/LFC-passing-tests.txt: >+ > 2019-01-19 Zalan Bujtas <zalan@apple.com> > > [LFC][Floats] Ensure that floats in FloatingContext::m_floats are always horizontally ordered. >diff --git a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt b/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >index 130716612deda70697b5e0edf4622e6397a45454..86130c596b69c0d688a4f54a1057115036b3bbf2 100644 >--- a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >+++ b/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >@@ -122,6 +122,7 @@ fast/block/float/floats-not-cleared-crash.html > fast/block/float/crash-when-intruding-float-has-anonymous-parent-and-detach.html > fast/block/float/float-in-descendant-formatting-context.html > fast/block/float/floats-with-negative-horizontal-margin.html >+fast/block/float/float-forced-below-other-floats.html > fast/block/margin-collapse/002.html > fast/block/margin-collapse/003.html > fast/block/margin-collapse/026.html
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 193617
:
359633
| 359639