Title: [241123] trunk
Revision
241123
Author
[email protected]
Date
2019-02-07 08:45:38 -0800 (Thu, 07 Feb 2019)

Log Message

[LFC][Out-of-flow] Use the containing block's padding width when computing min/max width.
https://bugs.webkit.org/show_bug.cgi?id=194391

Reviewed by Antti Koivisto.

Source/WebCore:

The spec is not clear about this but that's what matches the current behaviour.

Test: fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding.html

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):

Tools:

* LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

* fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding-expected.html: Added.
* fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (241122 => 241123)


--- trunk/LayoutTests/ChangeLog	2019-02-07 16:33:07 UTC (rev 241122)
+++ trunk/LayoutTests/ChangeLog	2019-02-07 16:45:38 UTC (rev 241123)
@@ -1,3 +1,13 @@
+2019-02-07  Zalan Bujtas  <[email protected]>
+
+        [LFC][Out-of-flow] Use the containing block's padding width when computing min/max width.
+        https://bugs.webkit.org/show_bug.cgi?id=194391
+
+        Reviewed by Antti Koivisto.
+
+        * fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding-expected.html: Added.
+        * fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding.html: Added.
+
 2019-02-07  Miguel Gomez  <[email protected]>
 
         Unreviewed GTK+ gardening after r241117.

Added: trunk/LayoutTests/fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding-expected.html (0 => 241123)


--- trunk/LayoutTests/fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding-expected.html	2019-02-07 16:45:38 UTC (rev 241123)
@@ -0,0 +1,17 @@
+<style>
+.container {
+    height: 120px;
+    width: 120px;
+    position: relative;
+    background-color: green;
+}
+
+div div {
+	background: blue;
+    height: 10px;
+}
+</style>
+<div class=container>
+    <div style="width: 12px;"></div>
+    <div style="width: 120px;"></div>
+</div>

Added: trunk/LayoutTests/fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding.html (0 => 241123)


--- trunk/LayoutTests/fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding.html	                        (rev 0)
+++ trunk/LayoutTests/fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding.html	2019-02-07 16:45:38 UTC (rev 241123)
@@ -0,0 +1,21 @@
+<style>
+.container {
+	padding: 10px;
+    height: 100px;
+    width: 100px;
+    position: relative;
+    background-color: green;
+}
+
+div div {
+	background: blue;
+    position: absolute;
+    top: 0px;
+    left: 0px;
+    height: 10px;
+}
+</style>
+<div class=container>
+    <div style="max-width: 10%; width: 100%;"></div>
+    <div style="top: 10px; min-width: 100%; width: 10%;"></div>
+</div>

Modified: trunk/Source/WebCore/ChangeLog (241122 => 241123)


--- trunk/Source/WebCore/ChangeLog	2019-02-07 16:33:07 UTC (rev 241122)
+++ trunk/Source/WebCore/ChangeLog	2019-02-07 16:45:38 UTC (rev 241123)
@@ -1,5 +1,19 @@
 2019-02-07  Zalan Bujtas  <[email protected]>
 
+        [LFC][Out-of-flow] Use the containing block's padding width when computing min/max width.
+        https://bugs.webkit.org/show_bug.cgi?id=194391
+
+        Reviewed by Antti Koivisto.
+
+        The spec is not clear about this but that's what matches the current behaviour.
+
+        Test: fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding.html
+
+        * layout/FormattingContext.cpp:
+        (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
+
+2019-02-07  Zalan Bujtas  <[email protected]>
+
         [LFC] Use dedicated data structures for optional used values (input to geometry functions)
         https://bugs.webkit.org/show_bug.cgi?id=194376
 

Modified: trunk/Source/WebCore/layout/FormattingContext.cpp (241122 => 241123)


--- trunk/Source/WebCore/layout/FormattingContext.cpp	2019-02-07 16:33:07 UTC (rev 241122)
+++ trunk/Source/WebCore/layout/FormattingContext.cpp	2019-02-07 16:45:38 UTC (rev 241123)
@@ -73,7 +73,7 @@
     };
 
     auto horizontalGeometry = compute({ });
-    auto containingBlockWidth = layoutState.displayBoxForLayoutBox(*layoutBox.containingBlock()).contentBoxWidth();
+    auto containingBlockWidth = layoutState.displayBoxForLayoutBox(*layoutBox.containingBlock()).paddingBoxWidth();
 
     if (auto maxWidth = Geometry::computedValueIfNotAuto(layoutBox.style().logicalMaxWidth(), containingBlockWidth)) {
         auto maxHorizontalGeometry = compute({ *maxWidth, { } });

Modified: trunk/Tools/ChangeLog (241122 => 241123)


--- trunk/Tools/ChangeLog	2019-02-07 16:33:07 UTC (rev 241122)
+++ trunk/Tools/ChangeLog	2019-02-07 16:45:38 UTC (rev 241123)
@@ -1,3 +1,12 @@
+2019-02-07  Zalan Bujtas  <[email protected]>
+
+        [LFC][Out-of-flow] Use the containing block's padding width when computing min/max width.
+        https://bugs.webkit.org/show_bug.cgi?id=194391
+
+        Reviewed by Antti Koivisto.
+
+        * LayoutReloaded/misc/LFC-passing-tests.txt:
+
 2019-02-06  Keith Rollin  <[email protected]>
 
         Remove Info.plist from MobileMiniBrowser.framework's Copy Bundle Resources phase

Modified: trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt (241122 => 241123)


--- trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt	2019-02-07 16:33:07 UTC (rev 241122)
+++ trunk/Tools/LayoutReloaded/misc/LFC-passing-tests.txt	2019-02-07 16:45:38 UTC (rev 241123)
@@ -96,6 +96,7 @@
 fast/block/block-only/relative-right.html
 fast/block/block-only/relative-siblings.html
 fast/block/block-only/relative-simple.html
+fast/block/block-only/absolute-positioned-min-max-percentage-with-parent-padding.html
 fast/block/basic/012.html
 fast/block/inside-inlines/crash-on-first-line-change.html
 fast/block/float/007.html
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to