Title: [290634] trunk
- Revision
- 290634
- Author
- [email protected]
- Date
- 2022-03-01 00:55:07 -0800 (Tue, 01 Mar 2022)
Log 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:
* TestExpectations:
Existing subgrid tests marked as passing.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (290633 => 290634)
--- trunk/LayoutTests/ChangeLog 2022-03-01 08:48:19 UTC (rev 290633)
+++ trunk/LayoutTests/ChangeLog 2022-03-01 08:55:07 UTC (rev 290634)
@@ -1,3 +1,14 @@
+2022-03-01 Matt Woodrow <[email protected]>
+
+ Handle perpendicular containing blocks when computing available logical height.
+ https://bugs.webkit.org/show_bug.cgi?id=236953
+
+ Reviewed by Dean Jackson.
+
+ * TestExpectations:
+
+ Existing subgrid tests marked as passing.
+
2022-03-01 Carlos Garcia Campos <[email protected]>
[ATSPI] Remove layout tests checking children added/removed notifications
Modified: trunk/LayoutTests/TestExpectations (290633 => 290634)
--- trunk/LayoutTests/TestExpectations 2022-03-01 08:48:19 UTC (rev 290633)
+++ trunk/LayoutTests/TestExpectations 2022-03-01 08:55:07 UTC (rev 290634)
@@ -1400,8 +1400,6 @@
webkit.org/b/236959 imported/w3c/web-platform-tests/css/css-grid/subgrid/baseline-001.html [ ImageOnlyFailure ]
webkit.org/b/236956 imported/w3c/web-platform-tests/css/css-grid/subgrid/grid-gap-003.html [ ImageOnlyFailure ]
webkit.org/b/236957 imported/w3c/web-platform-tests/css/css-grid/subgrid/line-names-007.html [ ImageOnlyFailure ]
-webkit.org/b/236953 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-002.html [ ImageOnlyFailure ]
-webkit.org/b/236953 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-004.html [ ImageOnlyFailure ]
webkit.org/b/236958 imported/w3c/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-003.html [ ImageOnlyFailure ]
webkit.org/b/236949 imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-mbp-overflow-001.html [ ImageOnlyFailure ]
webkit.org/b/236949 imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-mbp-overflow-002.html [ ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (290633 => 290634)
--- trunk/Source/WebCore/ChangeLog 2022-03-01 08:48:19 UTC (rev 290633)
+++ trunk/Source/WebCore/ChangeLog 2022-03-01 08:55:07 UTC (rev 290634)
@@ -1,3 +1,21 @@
+2022-03-01 Matt Woodrow <[email protected]>
+
+ Handle perpendicular containing blocks when computing available logical height.
+ https://bugs.webkit.org/show_bug.cgi?id=236953
+
+ Reviewed by Dean Jackson.
+
+ 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):
+
2022-03-01 Carlos Garcia Campos <[email protected]>
[ATSPI] Remove layout tests checking children added/removed notifications
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (290633 => 290634)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2022-03-01 08:48:19 UTC (rev 290633)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2022-03-01 08:55:07 UTC (rev 290634)
@@ -3600,6 +3600,12 @@
return constrainContentBoxLogicalHeightByMinMax(availableLogicalHeightUsing(style().logicalHeight(), heightType), std::nullopt);
}
+// FIXME: evaluate whether this should be a method of RenderObject instead.
+static inline bool isOrthogonal(const RenderObject& renderer, const RenderObject& ancestor)
+{
+ return renderer.isHorizontalWritingMode() != ancestor.isHorizontalWritingMode();
+}
+
LayoutUnit RenderBox::availableLogicalHeightUsing(const Length& h, AvailableLogicalHeightType heightType) const
{
// We need to stop here, since we don't want to increase the height of the table
@@ -3634,8 +3640,7 @@
return computedValues.m_extent - block.borderAndPaddingLogicalHeight() - block.scrollbarLogicalHeight();
}
- // FIXME: This is wrong if the containingBlock has a perpendicular writing mode.
- LayoutUnit availableHeight = containingBlockLogicalHeightForContent(heightType);
+ LayoutUnit availableHeight = isOrthogonal(*this, *containingBlock()) ? containingBlockLogicalWidthForContent() : containingBlockLogicalHeightForContent(heightType);
if (heightType == ExcludeMarginBorderPadding) {
// FIXME: Margin collapsing hasn't happened yet, so this incorrectly removes collapsed margins.
availableHeight -= marginBefore() + marginAfter() + borderAndPaddingLogicalHeight();
@@ -3779,12 +3784,6 @@
return heightResult;
}
-// FIXME: evaluate whether this should be a method of RenderObject instead.
-static inline bool isOrthogonal(const RenderObject& renderer, const RenderObject& ancestor)
-{
- return renderer.isHorizontalWritingMode() != ancestor.isHorizontalWritingMode();
-}
-
static void computeInlineStaticDistance(Length& logicalLeft, Length& logicalRight, const RenderBox* child, const RenderBoxModelObject& containerBlock, LayoutUnit containerLogicalWidth, RenderFragmentContainer* fragment)
{
if (!logicalLeft.isAuto() || !logicalRight.isAuto())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes