Source/WebCore/ChangeLog

 12019-01-19 Zalan Bujtas <zalan@apple.com>
 2
 3 [LFC][BFC] <body>'s overflow property value is propagated to viewport
 4 https://bugs.webkit.org/show_bug.cgi?id=193617
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 When the root element is an HTML "HTML" element or an XHTML "html" element, and that element has an HTML "BODY" element
 9 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,
 10 if the value on the root element is 'visible'. The 'visible' value when used for the viewport must be interpreted as 'auto'.
 11 The element from which the value is propagated must have a used value for 'overflow' of 'visible'.
 12
 13 This also has impact on layout since <body style="overflow: hidden"> would establish a block formatting context.
 14
 15 * layout/layouttree/LayoutBox.cpp:
 16 (WebCore::Layout::Box::isOverflowVisible const):
 17
1182019-01-19 Zalan Bujtas <zalan@apple.com>
219
320 [LFC][Floats] Ensure that floats in FloatingContext::m_floats are always horizontally ordered.

Source/WebCore/layout/layouttree/LayoutBox.cpp

@@const Box* Box::previousInFlowOrFloatingSibling() const
262262
263263bool Box::isOverflowVisible() const
264264{
265  return m_style.overflowX() == Overflow::Visible || m_style.overflowY() == Overflow::Visible;
 265 auto isOverflowVisible = m_style.overflowX() == Overflow::Visible || m_style.overflowY() == Overflow::Visible;
 266 // UAs must apply the 'overflow' property set on the root element to the viewport. When the root element is an HTML "HTML" element
 267 // or an XHTML "html" element, and that element has an HTML "BODY" element or an XHTML "body" element as a child,
 268 // user agents must instead apply the 'overflow' property from the first such child element to the viewport,
 269 // if the value on the root element is 'visible'. The 'visible' value when used for the viewport must be interpreted as 'auto'.
 270 // The element from which the value is propagated must have a used value for 'overflow' of 'visible'.
 271 if (isBodyBox()) {
 272 auto* documentBox = parent();
 273 ASSERT(documentBox);
 274 if (!documentBox->isDocumentBox())
 275 return isOverflowVisible;
 276 if (!documentBox->isOverflowVisible())
 277 return isOverflowVisible;
 278 return true;
 279 }
 280 if (isInitialContainingBlock()) {
 281 auto* documentBox = downcast<Container>(*this).firstChild();
 282 if (!documentBox || !documentBox->isDocumentBox() || !is<Container>(documentBox))
 283 return isOverflowVisible;
 284 auto* bodyBox = downcast<Container>(documentBox)->firstChild();
 285 if (!bodyBox || !bodyBox->isBodyBox())
 286 return isOverflowVisible;
 287 auto& bodyBoxStyle = bodyBox->style();
 288 return bodyBoxStyle.overflowX() == Overflow::Visible || bodyBoxStyle.overflowY() == Overflow::Visible;
 289 }
 290 return isOverflowVisible;
266291}
267292
268293bool Box::isPaddingApplicable() const

Tools/ChangeLog

 12019-01-19 Zalan Bujtas <zalan@apple.com>
 2
 3 [LFC][BFC] <body>'s overflow property value is propagated to viewport
 4 https://bugs.webkit.org/show_bug.cgi?id=193617
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * LayoutReloaded/misc/LFC-passing-tests.txt:
 9
1102019-01-19 Zalan Bujtas <zalan@apple.com>
211
312 [LFC][Floats] Ensure that floats in FloatingContext::m_floats are always horizontally ordered.

Tools/LayoutReloaded/misc/LFC-passing-tests.txt

@@fast/block/float/floats-not-cleared-crash.html
122122fast/block/float/crash-when-intruding-float-has-anonymous-parent-and-detach.html
123123fast/block/float/float-in-descendant-formatting-context.html
124124fast/block/float/floats-with-negative-horizontal-margin.html
 125fast/block/float/float-forced-below-other-floats.html
125126fast/block/margin-collapse/002.html
126127fast/block/margin-collapse/003.html
127128fast/block/margin-collapse/026.html