Changeset 290634 in webkit


Ignore:
Timestamp:
Mar 1, 2022 12:55:07 AM (5 months ago)
Author:
Matt Woodrow
Message:

Handle perpendicular containing blocks when computing available logical height.
https://bugs.webkit.org/show_bug.cgi?id=236953

Reviewed by Dean Jackson.

Source/WebCore:

Handles the case where the containing block uses a perpendicular writing mode
to the current box, and we need to check the containing block's width in order
to determine height.

Existing subgrid tests marked as passing.
These subgrid reftests were failing because the -expected files were rendering incorrectly
(which don't use subgrid).

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::availableLogicalHeightUsing const):

LayoutTests:

Existing subgrid tests marked as passing.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r290633 r290634  
     12022-03-01  Matt Woodrow  <mattwoodrow@apple.com>
     2
     3        Handle perpendicular containing blocks when computing available logical height.
     4        https://bugs.webkit.org/show_bug.cgi?id=236953
     5
     6        Reviewed by Dean Jackson.
     7
     8        * TestExpectations:
     9
     10        Existing subgrid tests marked as passing.
     11
    1122022-03-01  Carlos Garcia Campos  <cgarcia@igalia.com>
    213
  • trunk/LayoutTests/TestExpectations

    r290606 r290634  
    14011401webkit.org/b/236956 imported/w3c/web-platform-tests/css/css-grid/subgrid/grid-gap-003.html [ ImageOnlyFailure ]
    14021402webkit.org/b/236957 imported/w3c/web-platform-tests/css/css-grid/subgrid/line-names-007.html [ ImageOnlyFailure ]
    1403 webkit.org/b/236953 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-002.html [ ImageOnlyFailure ]
    1404 webkit.org/b/236953 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-004.html [ ImageOnlyFailure ]
    14051403webkit.org/b/236958 imported/w3c/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-003.html [ ImageOnlyFailure ]
    14061404webkit.org/b/236949 imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-mbp-overflow-001.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r290633 r290634  
     12022-03-01  Matt Woodrow  <mattwoodrow@apple.com>
     2
     3        Handle perpendicular containing blocks when computing available logical height.
     4        https://bugs.webkit.org/show_bug.cgi?id=236953
     5
     6        Reviewed by Dean Jackson.
     7
     8        Handles the case where the containing block uses a perpendicular writing mode
     9        to the current box, and we need to check the containing block's width in order
     10        to determine height.
     11
     12        Existing subgrid tests marked as passing.
     13        These subgrid reftests were failing because the -expected files were rendering incorrectly
     14        (which don't use subgrid).
     15
     16        * rendering/RenderBox.cpp:
     17        (WebCore::RenderBox::availableLogicalHeightUsing const):
     18
    1192022-03-01  Carlos Garcia Campos  <cgarcia@igalia.com>
    220
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r290225 r290634  
    36013601}
    36023602
     3603// FIXME: evaluate whether this should be a method of RenderObject instead.
     3604static inline bool isOrthogonal(const RenderObject& renderer, const RenderObject& ancestor)
     3605{
     3606    return renderer.isHorizontalWritingMode() != ancestor.isHorizontalWritingMode();
     3607}
     3608
    36033609LayoutUnit RenderBox::availableLogicalHeightUsing(const Length& h, AvailableLogicalHeightType heightType) const
    36043610{
     
    36353641    }
    36363642
    3637     // FIXME: This is wrong if the containingBlock has a perpendicular writing mode.
    3638     LayoutUnit availableHeight = containingBlockLogicalHeightForContent(heightType);
     3643    LayoutUnit availableHeight = isOrthogonal(*this, *containingBlock()) ? containingBlockLogicalWidthForContent() : containingBlockLogicalHeightForContent(heightType);
    36393644    if (heightType == ExcludeMarginBorderPadding) {
    36403645        // FIXME: Margin collapsing hasn't happened yet, so this incorrectly removes collapsed margins.
     
    37783783    heightResult -= (containingBlock.borderBefore() + containingBlock.borderAfter());
    37793784    return heightResult;
    3780 }
    3781 
    3782 // FIXME: evaluate whether this should be a method of RenderObject instead.
    3783 static inline bool isOrthogonal(const RenderObject& renderer, const RenderObject& ancestor)
    3784 {
    3785     return renderer.isHorizontalWritingMode() != ancestor.isHorizontalWritingMode();
    37863785}
    37873786
Note: See TracChangeset for help on using the changeset viewer.