Title: [275758] trunk
- Revision
- 275758
- Author
- [email protected]
- Date
- 2021-04-09 04:35:30 -0700 (Fri, 09 Apr 2021)
Log Message
[css-flexbox] max-height percentages are wrongly resolved for replaced grid items in nested percentage flexboxes
https://bugs.webkit.org/show_bug.cgi?id=223931
Patch by Ziran Sun <[email protected]> on 2021-04-09
Reviewed by Javier Fernandez.
LayoutTests/imported/w3c:
* web-platform-tests/css/css-flexbox/percentage-max-height-004-expected.html: Added.
* web-platform-tests/css/css-flexbox/percentage-max-height-004.html: Added.
Source/WebCore:
This change is to make sure that when overridingContainingBlockContentLogicalHeight of a replaced's containing block
element is indefinite, % max-height of the replaced element is resolved to none.
Test: imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight const):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (275757 => 275758)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-04-09 10:56:57 UTC (rev 275757)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-04-09 11:35:30 UTC (rev 275758)
@@ -1,5 +1,15 @@
2021-04-09 Ziran Sun <[email protected]>
+ [css-flexbox] max-height percentages are wrongly resolved for replaced grid items in nested percentage flexboxes
+ https://bugs.webkit.org/show_bug.cgi?id=223931
+
+ Reviewed by Javier Fernandez.
+
+ * web-platform-tests/css/css-flexbox/percentage-max-height-004-expected.html: Added.
+ * web-platform-tests/css/css-flexbox/percentage-max-height-004.html: Added.
+
+2021-04-09 Ziran Sun <[email protected]>
+
[css-grid] Fix min/max widths of grid affected by ancestor
https://bugs.webkit.org/show_bug.cgi?id=222100
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004-expected.html (0 => 275758)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004-expected.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004-expected.html 2021-04-09 11:35:30 UTC (rev 275758)
@@ -0,0 +1,3 @@
+<!-- quirks mode -->
+<div style="width:100px; height:100px; background:green;"></div>
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004.html (0 => 275758)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004.html 2021-04-09 11:35:30 UTC (rev 275758)
@@ -0,0 +1,29 @@
+<!doctype quirks>
+<title>CSS Flexbox Test: replaced element in nested flexboxes has correct height to resolve percentage against </title>
+<link rel="author" title="Ziran Sun" href=""
+<link rel="help" href=""
+<link rel="help" href=""
+<link href="" rel="stylesheet">
+<link rel="match" href=""
+<meta name="assert" content="Replaced children with % max-height are sized correctly when their parents are flex items with percentage heights in quirks mode." />
+
+
+<style>
+.flex {
+ display:flex;
+ flex-direction:column;
+}
+.percent-height {
+ height: 100%;
+}
+.max-sizes {
+ max-height: 100%;
+ max-width: 100%;
+}
+</style>
+<div class="percent-height flex">
+ <div class="percent-height">
+ <img class="max-sizes" src="" alt="Image download support must be enabled">
+ </div>
+</div>
+
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/w3c-import.log (275757 => 275758)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/w3c-import.log 2021-04-09 10:56:57 UTC (rev 275757)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/w3c-import.log 2021-04-09 11:35:30 UTC (rev 275758)
@@ -1556,6 +1556,8 @@
/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-002.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-003-expected.xht
/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-003.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004-expected.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-width-cross-axis.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-padding-001.html
/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-size-quirks-002.html
Modified: trunk/Source/WebCore/ChangeLog (275757 => 275758)
--- trunk/Source/WebCore/ChangeLog 2021-04-09 10:56:57 UTC (rev 275757)
+++ trunk/Source/WebCore/ChangeLog 2021-04-09 11:35:30 UTC (rev 275758)
@@ -1,3 +1,18 @@
+2021-04-09 Ziran Sun <[email protected]>
+
+ [css-flexbox] max-height percentages are wrongly resolved for replaced grid items in nested percentage flexboxes
+ https://bugs.webkit.org/show_bug.cgi?id=223931
+
+ Reviewed by Javier Fernandez.
+
+ This change is to make sure that when overridingContainingBlockContentLogicalHeight of a replaced's containing block
+ element is indefinite, % max-height of the replaced element is resolved to none.
+
+ Test: imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004.html
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight const):
+
2021-04-09 Philippe Normand <[email protected]>
Unreviewed, GStreamer Thunder decryptor build fix after r275599
Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (275757 => 275758)
--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2021-04-09 10:56:57 UTC (rev 275757)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2021-04-09 11:35:30 UTC (rev 275758)
@@ -288,7 +288,8 @@
// except when in quirks mode. Flexboxes follow strict behavior even in quirks mode, though.
if (!cb || (document().inQuirksMode() && !cb->isFlexibleBoxIncludingDeprecated()))
return false;
-
+ if (thisBox && thisBox->hasOverridingContainingBlockContentLogicalHeight())
+ return thisBox->overridingContainingBlockContentLogicalHeight() == WTF::nullopt;
return !cb->hasDefiniteLogicalHeight();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes