| Differences between
and this patch
- a/Source/WebCore/ChangeLog +15 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2019-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
        * layout/layouttree/LayoutBox.cpp:
14
        (WebCore::Layout::Box::isOverflowVisible const):
15
1
2019-01-19  Zalan Bujtas  <zalan@apple.com>
16
2019-01-19  Zalan Bujtas  <zalan@apple.com>
2
17
3
        [LFC][Floats] Ensure that floats in FloatingContext::m_floats are always horizontally ordered.
18
        [LFC][Floats] Ensure that floats in FloatingContext::m_floats are always horizontally ordered.
- a/Source/WebCore/layout/layouttree/LayoutBox.cpp -1 / +26 lines
Lines 262-268 const Box* Box::previousInFlowOrFloatingSibling() const a/Source/WebCore/layout/layouttree/LayoutBox.cpp_sec1
262
262
263
bool Box::isOverflowVisible() const
263
bool Box::isOverflowVisible() const
264
{
264
{
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;
266
}
291
}
267
292
268
bool Box::isPaddingApplicable() const
293
bool Box::isPaddingApplicable() const
- a/Tools/ChangeLog +9 lines
Lines 1-3 a/Tools/ChangeLog_sec1
1
2019-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
1
2019-01-19  Zalan Bujtas  <zalan@apple.com>
10
2019-01-19  Zalan Bujtas  <zalan@apple.com>
2
11
3
        [LFC][Floats] Ensure that floats in FloatingContext::m_floats are always horizontally ordered.
12
        [LFC][Floats] Ensure that floats in FloatingContext::m_floats are always horizontally ordered.
- a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt +1 lines
Lines 122-127 fast/block/float/floats-not-cleared-crash.html a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt_sec1
122
fast/block/float/crash-when-intruding-float-has-anonymous-parent-and-detach.html
122
fast/block/float/crash-when-intruding-float-has-anonymous-parent-and-detach.html
123
fast/block/float/float-in-descendant-formatting-context.html
123
fast/block/float/float-in-descendant-formatting-context.html
124
fast/block/float/floats-with-negative-horizontal-margin.html
124
fast/block/float/floats-with-negative-horizontal-margin.html
125
fast/block/float/float-forced-below-other-floats.html
125
fast/block/margin-collapse/002.html
126
fast/block/margin-collapse/002.html
126
fast/block/margin-collapse/003.html
127
fast/block/margin-collapse/003.html
127
fast/block/margin-collapse/026.html
128
fast/block/margin-collapse/026.html

Return to Bug 193617