Title: [272478] trunk
- Revision
- 272478
- Author
- [email protected]
- Date
- 2021-02-07 18:11:42 -0800 (Sun, 07 Feb 2021)
Log Message
[LFC][IFC] ASSERT(constraints.left->x <= constraints.right->x) when left and right floats run out of space
https://bugs.webkit.org/show_bug.cgi?id=220963
<rdar://problem/73861675>
Reviewed by Simon Fraser.
Source/WebCore:
Remove the incorrect assert. It's valid to have "horizontally overlapping" floats here since
we probe for a vertical range (not just a point) and vertical ranges can have
multiple left and right floats where they simply "overlap" each other when only x is taken into account.
When two floats (left and right) line up like this:
_______
| LF |
|_______|
_______
| RF |
|_______|
and as we try to find space for the inline content, we may end up with a vertical range (candidate line position + line height)
where we find both LF and RF. In this range the float boxes do overlap horizontally.
It simply means that at that vertical position there's no available space for the inline content.
Test: fast/inline/intrusive-left-right-floats-assert.html
* layout/inlineformatting/InlineLineBuilder.cpp:
(WebCore::Layout::LineBuilder::floatConstraints const):
LayoutTests:
* fast/inline/intrusive-left-right-floats-assert-expected.txt: Added.
* fast/inline/intrusive-left-right-floats-assert.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (272477 => 272478)
--- trunk/LayoutTests/ChangeLog 2021-02-07 22:10:39 UTC (rev 272477)
+++ trunk/LayoutTests/ChangeLog 2021-02-08 02:11:42 UTC (rev 272478)
@@ -1,3 +1,14 @@
+2021-02-07 Zalan Bujtas <[email protected]>
+
+ [LFC][IFC] ASSERT(constraints.left->x <= constraints.right->x) when left and right floats run out of space
+ https://bugs.webkit.org/show_bug.cgi?id=220963
+ <rdar://problem/73861675>
+
+ Reviewed by Simon Fraser.
+
+ * fast/inline/intrusive-left-right-floats-assert-expected.txt: Added.
+ * fast/inline/intrusive-left-right-floats-assert.html: Added.
+
2021-02-06 Lauro Moura <[email protected]>
[WPE] Gardening mathml failures
Added: trunk/LayoutTests/fast/inline/intrusive-left-right-floats-assert-expected.txt (0 => 272478)
--- trunk/LayoutTests/fast/inline/intrusive-left-right-floats-assert-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/inline/intrusive-left-right-floats-assert-expected.txt 2021-02-08 02:11:42 UTC (rev 272478)
@@ -0,0 +1 @@
+PASS if no assert in debug
Added: trunk/LayoutTests/fast/inline/intrusive-left-right-floats-assert.html (0 => 272478)
--- trunk/LayoutTests/fast/inline/intrusive-left-right-floats-assert.html (rev 0)
+++ trunk/LayoutTests/fast/inline/intrusive-left-right-floats-assert.html 2021-02-08 02:11:42 UTC (rev 272478)
@@ -0,0 +1,22 @@
+<style>
+.box {
+ width: 60px;
+ height: 30px;
+ float: left;
+ background-color: blue;
+}
+
+.box.right {
+ float: right;
+ background-color: green;
+}
+</style>
+<div style="width: 100px">
+ <div class="box"></div>
+ <div class="right box"></div>
+ <div>PASS if no assert in debug</div>
+</div>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
Modified: trunk/Source/WebCore/ChangeLog (272477 => 272478)
--- trunk/Source/WebCore/ChangeLog 2021-02-07 22:10:39 UTC (rev 272477)
+++ trunk/Source/WebCore/ChangeLog 2021-02-08 02:11:42 UTC (rev 272478)
@@ -1,3 +1,31 @@
+2021-02-07 Zalan Bujtas <[email protected]>
+
+ [LFC][IFC] ASSERT(constraints.left->x <= constraints.right->x) when left and right floats run out of space
+ https://bugs.webkit.org/show_bug.cgi?id=220963
+ <rdar://problem/73861675>
+
+ Reviewed by Simon Fraser.
+
+ Remove the incorrect assert. It's valid to have "horizontally overlapping" floats here since
+ we probe for a vertical range (not just a point) and vertical ranges can have
+ multiple left and right floats where they simply "overlap" each other when only x is taken into account.
+
+ When two floats (left and right) line up like this:
+ _______
+ | LF |
+ |_______|
+ _______
+ | RF |
+ |_______|
+ and as we try to find space for the inline content, we may end up with a vertical range (candidate line position + line height)
+ where we find both LF and RF. In this range the float boxes do overlap horizontally.
+ It simply means that at that vertical position there's no available space for the inline content.
+
+ Test: fast/inline/intrusive-left-right-floats-assert.html
+
+ * layout/inlineformatting/InlineLineBuilder.cpp:
+ (WebCore::Layout::LineBuilder::floatConstraints const):
+
2021-02-07 Wenson Hsieh <[email protected]>
Remove a duplicate implementation of EventHandler::mouseDownMayStartSelect()
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp (272477 => 272478)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp 2021-02-07 22:10:39 UTC (rev 272477)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp 2021-02-08 02:11:42 UTC (rev 272478)
@@ -392,7 +392,6 @@
auto lineLogicalLeft = lineLogicalRect.left();
auto lineLogicalRight = lineLogicalRect.right();
if (constraints.left && constraints.right) {
- ASSERT(constraints.left->x <= constraints.right->x);
lineLogicalRight = constraints.right->x;
lineLogicalLeft = constraints.left->x;
} else if (constraints.left) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes