Changeset 292157 in webkit


Ignore:
Timestamp:
Mar 31, 2022 6:56:29 AM (4 months ago)
Author:
Alan Bujtas
Message:

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

Reviewed by Simon Fraser.

Source/WebCore:

While neither the overflow(1) nor the css containment(2) specs are explicit about disabling the propagation of non-visible overflow to the viewport
when the <html> has containment, this behavior makes sense (and also see https://github.com/w3c/csswg-drafts/issues/7184).

(1) https://www.w3.org/TR/css-overflow-3/#overflow-propagation
(2) https://www.w3.org/TR/css-contain-1/#contain-property

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::updateFromStyle):

LayoutTests:

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r292149 r292157  
     12022-03-31  Alan Bujtas  <zalan@apple.com>
     2
     3        [CSS contain] Containment disables the special handling of the HTML body element for overflow viewport propagation [part2]
     4        https://bugs.webkit.org/show_bug.cgi?id=238572
     5
     6        Reviewed by Simon Fraser.
     7
     8        * TestExpectations: Progressions.
     9
    1102022-03-31  Tim Nguyen  <ntim@apple.com>
    211
  • trunk/LayoutTests/TestExpectations

    r292140 r292157  
    47004700imported/w3c/web-platform-tests/css/css-contain/quote-scoping-003.html [ ImageOnlyFailure ]
    47014701imported/w3c/web-platform-tests/css/css-contain/quote-scoping-004.html [ ImageOnlyFailure ]
    4702 imported/w3c/web-platform-tests/css/css-contain/contain-html-overflow-001.html [ ImageOnlyFailure ]
    4703 imported/w3c/web-platform-tests/css/css-contain/contain-html-overflow-003.html [ ImageOnlyFailure ]
    4704 imported/w3c/web-platform-tests/css/css-contain/contain-html-overflow-004.html [ ImageOnlyFailure ]
    47054702# innerText bug
    47064703webkit.org/b/238555 imported/w3c/web-platform-tests/css/css-contain/contain-flexbox-outline.html [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r292156 r292157  
     12022-03-31  Alan Bujtas  <zalan@apple.com>
     2
     3        [CSS contain] Containment disables the special handling of the HTML body element for overflow viewport propagation [part2]
     4        https://bugs.webkit.org/show_bug.cgi?id=238572
     5
     6        Reviewed by Simon Fraser.
     7
     8        While neither the overflow(1) nor the css containment(2) specs are explicit about disabling the propagation of non-visible overflow to the viewport
     9        when the <html> has containment, this behavior makes sense (and also see https://github.com/w3c/csswg-drafts/issues/7184).
     10
     11        (1) https://www.w3.org/TR/css-overflow-3/#overflow-propagation
     12        (2) https://www.w3.org/TR/css-contain-1/#contain-property
     13
     14        * rendering/RenderBox.cpp:
     15        (WebCore::RenderBox::updateFromStyle):
     16
    1172022-03-31  Alex Christensen  <achristensen@webkit.org>
    218
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r292127 r292157  
    512512            // (2) We are the primary <body> (can be checked by looking at document.body).
    513513            // (3) The root element has visible overflow.
    514             if (is<HTMLHtmlElement>(*document().documentElement())
     514            // (4) No containment is set either on the body or on the html document element.
     515            auto& documentElement = *document().documentElement();
     516            auto& documentElementRenderer = *documentElement.renderer();
     517            if (is<HTMLHtmlElement>(documentElement)
    515518                && document().body() == element()
    516                 && document().documentElement()->renderer()->effectiveOverflowX() == Overflow::Visible
    517                 && !styleToUse.effectiveContainment()) {
     519                && documentElementRenderer.effectiveOverflowX() == Overflow::Visible
     520                && !styleToUse.effectiveContainment()
     521                && !documentElementRenderer.style().effectiveContainment()) {
    518522                boxHasNonVisibleOverflow = false;
    519523            }
Note: See TracChangeset for help on using the changeset viewer.