⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 285854 in webkit


Ignore:
Timestamp:
Nov 16, 2021, 1:46:49 AM (5 years ago)
Author:
cathiechen
Message:

[CSS contain] The size should be updated if layout containment is inside a fit-content parent
https://bugs.webkit.org/show_bug.cgi?id=233046

Reviewed by Rob Buis.

Source/WebCore:

When the object is a layout containment, we also need to add size containment as the constraint of
being a relayout boundary. Otherwise when the layout size depends on the content, the layout size
might not be updated correctly.

Test: imported/w3c/web-platform-tests/css/css-contain/contain-layout-019.html

  • rendering/RenderObject.cpp:

(WebCore::objectIsRelayoutBoundary):

LayoutTests:

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r285852 r285854  
     12021-11-16  Cathie Chen  <cathiechen@igalia.com>
     2
     3        [CSS contain] The size should be updated if layout containment is inside a fit-content parent
     4        https://bugs.webkit.org/show_bug.cgi?id=233046
     5
     6        Reviewed by Rob Buis.
     7
     8        * TestExpectations:
     9
    1102021-11-15  Tim Nguyen  <ntim@apple.com>
    211
  • trunk/LayoutTests/TestExpectations

    r285852 r285854  
    48434843imported/w3c/web-platform-tests/css/css-contain/contain-html-w-m-003.html [ ImageOnlyFailure ]
    48444844imported/w3c/web-platform-tests/css/css-contain/contain-html-w-m-004.html [ ImageOnlyFailure ]
    4845 imported/w3c/web-platform-tests/css/css-contain/contain-layout-019.html [ ImageOnlyFailure ]
    48464845imported/w3c/web-platform-tests/css/css-contain/contain-paint-026.html [ ImageOnlyFailure ]
    48474846
  • trunk/Source/WebCore/ChangeLog

    r285846 r285854  
     12021-11-16  Cathie Chen  <cathiechen@igalia.com>
     2
     3        [CSS contain] The size should be updated if layout containment is inside a fit-content parent
     4        https://bugs.webkit.org/show_bug.cgi?id=233046
     5
     6        Reviewed by Rob Buis.
     7
     8        When the object is a layout containment, we also need to add size containment as the constraint of
     9        being a relayout boundary. Otherwise when the layout size depends on the content, the layout size
     10        might not be updated correctly.
     11
     12        Test: imported/w3c/web-platform-tests/css/css-contain/contain-layout-019.html
     13
     14        * rendering/RenderObject.cpp:
     15        (WebCore::objectIsRelayoutBoundary):
     16
    1172021-11-15  Sam Weinig  <weinig@apple.com>
    218
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r285745 r285854  
    506506        return true;
    507507
    508     if (shouldApplyLayoutContainment(*object))
     508    if (shouldApplyLayoutContainment(*object) && shouldApplySizeContainment(*object))
    509509        return true;
    510510
Note: See TracChangeset for help on using the changeset viewer.