Changeset 292127 in webkit


Ignore:
Timestamp:
Mar 30, 2022 4:23:34 PM (4 months ago)
Author:
Alan Bujtas
Message:

[CSS contain] Containment disables the special handling of the HTML body element for overflow viewport propagation.
https://bugs.webkit.org/show_bug.cgi?id=238526

Reviewed by Simon Fraser.

Source/WebCore:

https://www.w3.org/TR/css-overflow-3/#overflow-propagation

"...UAs must apply the overflow-* values set on the root element to the viewport when the root element’s display value is not none.
However, when the root element is an html element whose overflow value is visible, and that element has as a
child a body element whose display value is also not none, user agents must instead apply the
overflow-* values of the first such child element to the viewport.
The element from which the value is propagated must then have a used overflow value of visible.

Note: Using containment disables this special handling of the HTML body element..."

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::updateFromStyle):

LayoutTests:

  • TestExpectations:
  • fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping-expected.html:
  • fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r292110 r292127  
     12022-03-30  Alan Bujtas  <zalan@apple.com>
     2
     3        [CSS contain] Containment disables the special handling of the HTML body element for overflow viewport propagation.
     4        https://bugs.webkit.org/show_bug.cgi?id=238526
     5
     6        Reviewed by Simon Fraser.
     7
     8        * TestExpectations:
     9        * fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping-expected.html:
     10        * fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html:
     11
    1122022-03-30  Youenn Fablet  <youenn@apple.com>
    213
  • trunk/LayoutTests/TestExpectations

    r292084 r292127  
    46974697imported/w3c/web-platform-tests/css/css-contain/quote-scoping-003.html [ ImageOnlyFailure ]
    46984698imported/w3c/web-platform-tests/css/css-contain/quote-scoping-004.html [ ImageOnlyFailure ]
    4699 imported/w3c/web-platform-tests/css/css-contain/contain-body-overflow-001.html [ ImageOnlyFailure ]
    4700 imported/w3c/web-platform-tests/css/css-contain/contain-body-overflow-002.html [ ImageOnlyFailure ]
    4701 imported/w3c/web-platform-tests/css/css-contain/contain-body-overflow-003.html [ ImageOnlyFailure ]
    4702 imported/w3c/web-platform-tests/css/css-contain/contain-body-overflow-004.html [ ImageOnlyFailure ]
    47034699imported/w3c/web-platform-tests/css/css-contain/contain-html-overflow-001.html [ ImageOnlyFailure ]
    47044700imported/w3c/web-platform-tests/css/css-contain/contain-html-overflow-003.html [ ImageOnlyFailure ]
    47054701imported/w3c/web-platform-tests/css/css-contain/contain-html-overflow-004.html [ ImageOnlyFailure ]
     4702# innerText bug
     4703webkit.org/b/238555 imported/w3c/web-platform-tests/css/css-contain/contain-flexbox-outline.html [ Failure ]
    47064704
    47074705# Container queries
  • trunk/LayoutTests/fast/css/counters/findPlaceForCounter-parent-renderer-crash-expected.txt

    r287194 r292127  
    1 PASS if this doesn't crash
     1
  • trunk/Source/WebCore/ChangeLog

    r292120 r292127  
     12022-03-30  Alan Bujtas  <zalan@apple.com>
     2
     3        [CSS contain] Containment disables the special handling of the HTML body element for overflow viewport propagation.
     4        https://bugs.webkit.org/show_bug.cgi?id=238526
     5
     6        Reviewed by Simon Fraser.
     7
     8        https://www.w3.org/TR/css-overflow-3/#overflow-propagation
     9
     10        "...UAs must apply the overflow-* values set on the root element to the viewport when the root element’s display value is not none.
     11        However, when the root element is an html element whose overflow value is visible, and that element has as a
     12        child a body element whose display value is also not none, user agents must instead apply the
     13        overflow-* values of the first such child element to the viewport.
     14        The element from which the value is propagated must then have a used overflow value of visible.
     15
     16        Note: Using containment disables this special handling of the HTML body element..."
     17
     18        * rendering/RenderBox.cpp:
     19        (WebCore::RenderBox::updateFromStyle):
     20
    1212022-03-30  Devin Rousso  <drousso@apple.com>
    222
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r291946 r292127  
    514514            if (is<HTMLHtmlElement>(*document().documentElement())
    515515                && document().body() == element()
    516                 && document().documentElement()->renderer()->effectiveOverflowX() == Overflow::Visible) {
     516                && document().documentElement()->renderer()->effectiveOverflowX() == Overflow::Visible
     517                && !styleToUse.effectiveContainment()) {
    517518                boxHasNonVisibleOverflow = false;
    518519            }
Note: See TracChangeset for help on using the changeset viewer.