Title: [257683] trunk
- Revision
- 257683
- Author
- [email protected]
- Date
- 2020-02-29 08:24:51 -0800 (Sat, 29 Feb 2020)
Log Message
[LFC][Floats] FloatingState::top should return topmost logical vertical position
https://bugs.webkit.org/show_bug.cgi?id=208412
<rdar://problem/59918798>
Reviewed by Antti Koivisto.
Source/WebCore:
Test: fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top.html
When computing the used height for an auto: height formatting root block level container, we have to take both the non-floating and floating
in-flow boxes into account. This patch ensures that in case of multiple floats, we use the topmost float's logical top position.
* layout/floats/FloatingState.cpp:
(WebCore::Layout::FloatingState::top const):
LayoutTests:
* fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top-expected.html: Added.
* fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (257682 => 257683)
--- trunk/LayoutTests/ChangeLog 2020-02-29 15:20:55 UTC (rev 257682)
+++ trunk/LayoutTests/ChangeLog 2020-02-29 16:24:51 UTC (rev 257683)
@@ -1,5 +1,16 @@
2020-02-29 Zalan Bujtas <[email protected]>
+ [LFC][Floats] FloatingState::top should return topmost logical vertical position
+ https://bugs.webkit.org/show_bug.cgi?id=208412
+ <rdar://problem/59918798>
+
+ Reviewed by Antti Koivisto.
+
+ * fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top-expected.html: Added.
+ * fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top.html: Added.
+
+2020-02-29 Zalan Bujtas <[email protected]>
+
[LFC][Floats] The used available width for float avoider with clear always matches the containing block's constraint
https://bugs.webkit.org/show_bug.cgi?id=208411
<rdar://problem/59918356>
Added: trunk/LayoutTests/fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top-expected.html (0 => 257683)
--- trunk/LayoutTests/fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top-expected.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top-expected.html 2020-02-29 16:24:51 UTC (rev 257683)
@@ -0,0 +1,9 @@
+<!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+div {
+ width: 300px;
+ height: 400px;
+ background-color: green;
+}
+</style>
+<div></div>
Added: trunk/LayoutTests/fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top.html (0 => 257683)
--- trunk/LayoutTests/fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top.html 2020-02-29 16:24:51 UTC (rev 257683)
@@ -0,0 +1,18 @@
+<!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+.left {
+ float: left;
+ width: 100px;
+ height: 40px;
+}
+
+.avoider {
+ width: auto;
+ height: 60px;
+}
+</style>
+<div style="background-color: green; width: 300px; overflow: hidden;">
+ <div class=left></div>
+ <div class=avoider style="clear: left"></div>
+ <div class=left style="height: 300px"></div>
+</div>
Modified: trunk/Source/WebCore/ChangeLog (257682 => 257683)
--- trunk/Source/WebCore/ChangeLog 2020-02-29 15:20:55 UTC (rev 257682)
+++ trunk/Source/WebCore/ChangeLog 2020-02-29 16:24:51 UTC (rev 257683)
@@ -1,5 +1,21 @@
2020-02-29 Zalan Bujtas <[email protected]>
+ [LFC][Floats] FloatingState::top should return topmost logical vertical position
+ https://bugs.webkit.org/show_bug.cgi?id=208412
+ <rdar://problem/59918798>
+
+ Reviewed by Antti Koivisto.
+
+ Test: fast/layoutformattingcontext/block-only/block-root-top-should-start-from-float-top.html
+
+ When computing the used height for an auto: height formatting root block level container, we have to take both the non-floating and floating
+ in-flow boxes into account. This patch ensures that in case of multiple floats, we use the topmost float's logical top position.
+
+ * layout/floats/FloatingState.cpp:
+ (WebCore::Layout::FloatingState::top const):
+
+2020-02-29 Zalan Bujtas <[email protected]>
+
[LFC][Floats] The used available width for float avoider with clear always matches the containing block's constraint
https://bugs.webkit.org/show_bug.cgi?id=208411
<rdar://problem/59918356>
Modified: trunk/Source/WebCore/layout/floats/FloatingState.cpp (257682 => 257683)
--- trunk/Source/WebCore/layout/floats/FloatingState.cpp 2020-02-29 15:20:55 UTC (rev 257682)
+++ trunk/Source/WebCore/layout/floats/FloatingState.cpp 2020-02-29 16:24:51 UTC (rev 257683)
@@ -127,7 +127,7 @@
auto floatTop = floatItem.rectWithMargin().top();
if (top) {
- top = std::max<PositionInContextRoot>(*top, { floatTop });
+ top = std::min<PositionInContextRoot>(*top, { floatTop });
continue;
}
top = PositionInContextRoot { floatTop };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes