Title: [290948] branches/safari-613-branch
- Revision
- 290948
- Author
- [email protected]
- Date
- 2022-03-07 14:11:01 -0800 (Mon, 07 Mar 2022)
Log Message
Cherry-pick r290706. rdar://problem/89566459
REGRESSION(r285232) https://alvaromontoro.github.io/almond.css/demo/ looks wrong in Safari, ok in Chrome and Firefox
https://bugs.webkit.org/show_bug.cgi?id=237276
<rdar://problem/89566459>
Reviewed by Simon Fraser.
Source/WebCore:
r285232 introduced the isFixed() check as a resolvable preferred width type, but percent values are also resolvable as
block layout gets the horizontal constraint from the containing block chain (unlike the height percent values) -i.e. 'width: 50%' can be resolved during preferred width computation.
Test: fast/css-grid-layout/ascpect-ratio-with-percent-width.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):
LayoutTests:
* fast/css-grid-layout/ascpect-ratio-with-percent-width-expected.html: Added.
* fast/css-grid-layout/ascpect-ratio-with-percent-width.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-613-branch/LayoutTests/ChangeLog (290947 => 290948)
--- branches/safari-613-branch/LayoutTests/ChangeLog 2022-03-07 22:10:57 UTC (rev 290947)
+++ branches/safari-613-branch/LayoutTests/ChangeLog 2022-03-07 22:11:01 UTC (rev 290948)
@@ -1,5 +1,44 @@
2022-03-07 Russell Epstein <[email protected]>
+ Cherry-pick r290706. rdar://problem/89566459
+
+ REGRESSION(r285232) https://alvaromontoro.github.io/almond.css/demo/ looks wrong in Safari, ok in Chrome and Firefox
+ https://bugs.webkit.org/show_bug.cgi?id=237276
+ <rdar://problem/89566459>
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ r285232 introduced the isFixed() check as a resolvable preferred width type, but percent values are also resolvable as
+ block layout gets the horizontal constraint from the containing block chain (unlike the height percent values) -i.e. 'width: 50%' can be resolved during preferred width computation.
+
+ Test: fast/css-grid-layout/ascpect-ratio-with-percent-width.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):
+
+ LayoutTests:
+
+ * fast/css-grid-layout/ascpect-ratio-with-percent-width-expected.html: Added.
+ * fast/css-grid-layout/ascpect-ratio-with-percent-width.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-01 Alan Bujtas <[email protected]>
+
+ REGRESSION(r285232) https://alvaromontoro.github.io/almond.css/demo/ looks wrong in Safari, ok in Chrome and Firefox
+ https://bugs.webkit.org/show_bug.cgi?id=237276
+ <rdar://problem/89566459>
+
+ Reviewed by Simon Fraser.
+
+ * fast/css-grid-layout/ascpect-ratio-with-percent-width-expected.html: Added.
+ * fast/css-grid-layout/ascpect-ratio-with-percent-width.html: Added.
+
+2022-03-07 Russell Epstein <[email protected]>
+
Cherry-pick r290606. rdar://problem/89482882
[macOS] Unable to upload ".pages" files to file inputs accepting ".pages" and ".jpeg" files
Added: branches/safari-613-branch/LayoutTests/fast/css-grid-layout/ascpect-ratio-with-percent-width-expected.html (0 => 290948)
--- branches/safari-613-branch/LayoutTests/fast/css-grid-layout/ascpect-ratio-with-percent-width-expected.html (rev 0)
+++ branches/safari-613-branch/LayoutTests/fast/css-grid-layout/ascpect-ratio-with-percent-width-expected.html 2022-03-07 22:11:01 UTC (rev 290948)
@@ -0,0 +1,17 @@
+<style>
+div {
+ display: grid;
+ place-items: center;
+
+ width: 200px;
+ height: 200px;
+
+ border: solid;
+ background-color: cyan;
+
+ font-family: Ahem;
+ font-size: 20px;
+}
+</style>
+<!-- PASS if the text content is centered both horizontally and vertically -->
+<div>centered</div>
\ No newline at end of file
Added: branches/safari-613-branch/LayoutTests/fast/css-grid-layout/ascpect-ratio-with-percent-width.html (0 => 290948)
--- branches/safari-613-branch/LayoutTests/fast/css-grid-layout/ascpect-ratio-with-percent-width.html (rev 0)
+++ branches/safari-613-branch/LayoutTests/fast/css-grid-layout/ascpect-ratio-with-percent-width.html 2022-03-07 22:11:01 UTC (rev 290948)
@@ -0,0 +1,21 @@
+<style>
+.container {
+ width: 200px;
+ border: solid;
+}
+
+.grid {
+ display: grid;
+ place-items: center;
+
+ width: 100%;
+ aspect-ratio: 1;
+
+ background-color: cyan;
+
+ font-family: Ahem;
+ font-size: 20px;
+}
+</style>
+<!-- PASS if the text content is centered both horizontally and vertically -->
+<div class=container><div class=grid>centered</div></div>
\ No newline at end of file
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (290947 => 290948)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-03-07 22:10:57 UTC (rev 290947)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-03-07 22:11:01 UTC (rev 290948)
@@ -1,5 +1,49 @@
2022-03-07 Russell Epstein <[email protected]>
+ Cherry-pick r290706. rdar://problem/89566459
+
+ REGRESSION(r285232) https://alvaromontoro.github.io/almond.css/demo/ looks wrong in Safari, ok in Chrome and Firefox
+ https://bugs.webkit.org/show_bug.cgi?id=237276
+ <rdar://problem/89566459>
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ r285232 introduced the isFixed() check as a resolvable preferred width type, but percent values are also resolvable as
+ block layout gets the horizontal constraint from the containing block chain (unlike the height percent values) -i.e. 'width: 50%' can be resolved during preferred width computation.
+
+ Test: fast/css-grid-layout/ascpect-ratio-with-percent-width.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):
+
+ LayoutTests:
+
+ * fast/css-grid-layout/ascpect-ratio-with-percent-width-expected.html: Added.
+ * fast/css-grid-layout/ascpect-ratio-with-percent-width.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-01 Alan Bujtas <[email protected]>
+
+ REGRESSION(r285232) https://alvaromontoro.github.io/almond.css/demo/ looks wrong in Safari, ok in Chrome and Firefox
+ https://bugs.webkit.org/show_bug.cgi?id=237276
+ <rdar://problem/89566459>
+
+ Reviewed by Simon Fraser.
+
+ r285232 introduced the isFixed() check as a resolvable preferred width type, but percent values are also resolvable as
+ block layout gets the horizontal constraint from the containing block chain (unlike the height percent values) -i.e. 'width: 50%' can be resolved during preferred width computation.
+
+ Test: fast/css-grid-layout/ascpect-ratio-with-percent-width.html
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):
+
+2022-03-07 Russell Epstein <[email protected]>
+
Cherry-pick r290671. rdar://problem/87340464
Web app fails only when dev tools is open
Modified: branches/safari-613-branch/Source/WebCore/rendering/RenderBlock.cpp (290947 => 290948)
--- branches/safari-613-branch/Source/WebCore/rendering/RenderBlock.cpp 2022-03-07 22:10:57 UTC (rev 290947)
+++ branches/safari-613-branch/Source/WebCore/rendering/RenderBlock.cpp 2022-03-07 22:11:01 UTC (rev 290948)
@@ -3180,7 +3180,7 @@
availableHeight = std::max(0_lu, constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - scrollbarLogicalHeight(), std::nullopt));
} else if (shouldComputeLogicalHeightFromAspectRatio()) {
// Only grid is expected to be in a state where it is calculating pref width and having unknown logical width.
- if (isRenderGrid() && preferredLogicalWidthsDirty() && !style().logicalWidth().isFixed())
+ if (isRenderGrid() && preferredLogicalWidthsDirty() && !style().logicalWidth().isSpecified())
return availableHeight;
availableHeight = blockSizeFromAspectRatio(horizontalBorderAndPaddingExtent(), verticalBorderAndPaddingExtent(), LayoutUnit(style().logicalAspectRatio()), style().boxSizingForAspectRatio(), logicalWidth());
} else if (isOutOfFlowPositionedWithSpecifiedHeight) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes