Title: [273647] trunk/Source/WebCore
- Revision
- 273647
- Author
- commit-qu...@webkit.org
- Date
- 2021-03-01 06:22:35 -0800 (Mon, 01 Mar 2021)
Log Message
Change order in RenderBlock::availableLogicalHeightForPercentageComputation
https://bugs.webkit.org/show_bug.cgi?id=222468
Patch by Rob Buis <rb...@igalia.com> on 2021-03-01
Reviewed by Manuel Rego Casasnovas.
Change order in RenderBlock::availableLogicalHeightForPercentageComputation in
order to remove one check.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (273646 => 273647)
--- trunk/Source/WebCore/ChangeLog 2021-03-01 13:27:34 UTC (rev 273646)
+++ trunk/Source/WebCore/ChangeLog 2021-03-01 14:22:35 UTC (rev 273647)
@@ -1,3 +1,16 @@
+2021-03-01 Rob Buis <rb...@igalia.com>
+
+ Change order in RenderBlock::availableLogicalHeightForPercentageComputation
+ https://bugs.webkit.org/show_bug.cgi?id=222468
+
+ Reviewed by Manuel Rego Casasnovas.
+
+ Change order in RenderBlock::availableLogicalHeightForPercentageComputation in
+ order to remove one check.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):
+
2021-03-01 Philippe Normand <pnorm...@igalia.com>
[GStreamer][Playbin3] Stream collection handling fixes
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (273646 => 273647)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2021-03-01 13:27:34 UTC (rev 273646)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2021-03-01 14:22:35 UTC (rev 273647)
@@ -3212,7 +3212,12 @@
availableHeight = std::max(0_lu, constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - scrollbarLogicalHeight(), WTF::nullopt));
} else if (shouldComputeLogicalHeightFromAspectRatio()) {
availableHeight = blockSizeFromAspectRatio(horizontalBorderAndPaddingExtent(), verticalBorderAndPaddingExtent(), LayoutUnit(style().logicalAspectRatio()), style().boxSizingForAspectRatio(), logicalWidth());
- } else if (styleToUse.logicalHeight().isPercentOrCalculated() && !isOutOfFlowPositionedWithSpecifiedHeight) {
+ } else if (isOutOfFlowPositionedWithSpecifiedHeight) {
+ // Don't allow this to affect the block' size() member variable, since this
+ // can get called while the block is still laying out its kids.
+ LogicalExtentComputedValues computedValues = computeLogicalHeight(logicalHeight(), 0_lu);
+ availableHeight = computedValues.m_extent - borderAndPaddingLogicalHeight() - scrollbarLogicalHeight();
+ } else if (styleToUse.logicalHeight().isPercentOrCalculated()) {
Optional<LayoutUnit> heightWithScrollbar = computePercentageLogicalHeight(styleToUse.logicalHeight());
if (heightWithScrollbar) {
LayoutUnit contentBoxHeightWithScrollbar = adjustContentBoxLogicalHeightForBoxSizing(heightWithScrollbar.value());
@@ -3223,11 +3228,6 @@
LayoutUnit contentBoxHeight = constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - scrollbarLogicalHeight(), WTF::nullopt);
availableHeight = std::max(0_lu, contentBoxHeight);
}
- } else if (isOutOfFlowPositionedWithSpecifiedHeight) {
- // Don't allow this to affect the block' size() member variable, since this
- // can get called while the block is still laying out its kids.
- LogicalExtentComputedValues computedValues = computeLogicalHeight(logicalHeight(), 0_lu);
- availableHeight = computedValues.m_extent - borderAndPaddingLogicalHeight() - scrollbarLogicalHeight();
} else if (isRenderView())
availableHeight = view().pageOrViewLogicalHeight();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes