Changeset 269717 in webkit
- Timestamp:
- Nov 11, 2020 10:24:45 PM (21 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
LayoutTests/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBox.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/TestExpectations
r269712 r269717 1187 1187 webkit.org/b/216145 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html [ ImageOnlyFailure ] 1188 1188 webkit.org/b/191461 imported/w3c/web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-001.html [ ImageOnlyFailure ] 1189 webkit.org/b/191462 imported/w3c/web-platform-tests/css/css-grid/grid-items/percentage-size-replaced-subitems-001.html [ ImageOnlyFailure ]1190 1189 webkit.org/b/191463 imported/w3c/web-platform-tests/css/css-grid/grid-items/explicitly-sized-grid-item-as-table.html [ ImageOnlyFailure ] 1191 1190 webkit.org/b/191627 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html [ Failure ] -
trunk/Source/WebCore/ChangeLog
r269716 r269717 1 2020-11-11 Ziran Sun <zsun@igalia.com> 2 3 [css-grid] Percentage height on replaced item with scrollbar 4 https://bugs.webkit.org/show_bug.cgi?id=191462 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 This CL is to subtract scrollbar in computeReplacedLogicalHeightUsing(). 9 In RenderBox::computeReplacedLogicalHeightUsing() we should also subtract 10 scrollbarLogicalHeight() when calculating stretchHeight. Without this subtraction, 11 it caused issues to resolve the percentage heights on grid item replaced children, 12 if the grid item has a scrollbar. 13 14 It ports the changes from the following patch at Chromium: 15 https://bugs.chromium.org/p/chromium/issues/detail?id=837141 16 Test files were already ported in WPT at 17 https://github.com/web-platform-tests/wpt/commit/538eedafb15733c6113b44998170a6bbdae7518b 18 19 * rendering/RenderBox.cpp: 20 (WebCore::RenderBox::computeReplacedLogicalHeightUsing const): 21 1 22 2020-11-11 Said Abou-Hallawa <said@apple.com> 2 23 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r269693 r269717 3192 3192 container = container->containingBlock(); 3193 3193 } 3194 bool hasPerpendicularContainingBlock = container->isHorizontalWritingMode() != isHorizontalWritingMode(); 3194 3195 Optional<LayoutUnit> stretchedHeight; 3195 3196 if (is<RenderBlock>(container)) { … … 3198 3199 if (block->isFlexItem()) 3199 3200 stretchedHeight = downcast<RenderFlexibleBox>(block->parent())->childLogicalHeightForPercentageResolution(*block); 3200 else if (block->isGridItem() && block->hasOverridingLogicalHeight() )3201 stretchedHeight = block->overriding LogicalHeight() - block->borderAndPaddingLogicalHeight();3201 else if (block->isGridItem() && block->hasOverridingLogicalHeight() && !hasPerpendicularContainingBlock) 3202 stretchedHeight = block->overridingContentLogicalHeight(); 3202 3203 } 3203 3204 … … 3223 3224 availableHeight = stretchedHeight.value(); 3224 3225 else { 3225 availableHeight = containingBlockLogicalHeightForContent(IncludeMarginBorderPadding);3226 availableHeight = hasPerpendicularContainingBlock ? containingBlockLogicalWidthForContent() : containingBlockLogicalHeightForContent(IncludeMarginBorderPadding); 3226 3227 // It is necessary to use the border-box to match WinIE's broken 3227 3228 // box model. This is essential for sizing inside
Note: See TracChangeset
for help on using the changeset viewer.