Title: [264220] trunk
- Revision
- 264220
- Author
- [email protected]
- Date
- 2020-07-10 08:39:39 -0700 (Fri, 10 Jul 2020)
Log Message
[LFC][Floats] Normal flow element that establishes a new block formatting context must not overlap the margin box of any floats
https://bugs.webkit.org/show_bug.cgi?id=214185
Reviewed by Antti Koivisto.
Source/WebCore:
BFCs in general should avoid floats. This code was confusing the cases where the block container box (not necessarily a BFC) establishes an IFC.
<div>The div establishes an IFC only. It should not avoid floats.</div>
<div style="overflow: hidden">The div establishes both a new BFC and an IFC. It should avoid floats.</div>
Test: fast/layoutformattingcontext/float-avoider-with-inline-content.html
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isFloatAvoider const):
LayoutTests:
* fast/layoutformattingcontext/float-avoider-with-inline-content-expected.html: Added.
* fast/layoutformattingcontext/float-avoider-with-inline-content.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (264219 => 264220)
--- trunk/LayoutTests/ChangeLog 2020-07-10 14:57:57 UTC (rev 264219)
+++ trunk/LayoutTests/ChangeLog 2020-07-10 15:39:39 UTC (rev 264220)
@@ -1,5 +1,15 @@
2020-07-10 Zalan Bujtas <[email protected]>
+ [LFC][Floats] Normal flow element that establishes a new block formatting context must not overlap the margin box of any floats
+ https://bugs.webkit.org/show_bug.cgi?id=214185
+
+ Reviewed by Antti Koivisto.
+
+ * fast/layoutformattingcontext/float-avoider-with-inline-content-expected.html: Added.
+ * fast/layoutformattingcontext/float-avoider-with-inline-content.html: Added.
+
+2020-07-10 Zalan Bujtas <[email protected]>
+
[LFC][MarginCollapsing] Margins do not collapse through when the box has clearance.
https://bugs.webkit.org/show_bug.cgi?id=214172
Added: trunk/LayoutTests/fast/layoutformattingcontext/float-avoider-with-inline-content-expected.html (0 => 264220)
--- trunk/LayoutTests/fast/layoutformattingcontext/float-avoider-with-inline-content-expected.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/float-avoider-with-inline-content-expected.html 2020-07-10 15:39:39 UTC (rev 264220)
@@ -0,0 +1,10 @@
+<!DOCTYPE html><!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+div {
+ width: 100px;
+ height: 100px;
+}
+
+</style>
+<div style="background-color: green"></div>
+<div style="background-color: blue; position: relative; left: 100px; top: -100px;"></div>
Added: trunk/LayoutTests/fast/layoutformattingcontext/float-avoider-with-inline-content.html (0 => 264220)
--- trunk/LayoutTests/fast/layoutformattingcontext/float-avoider-with-inline-content.html (rev 0)
+++ trunk/LayoutTests/fast/layoutformattingcontext/float-avoider-with-inline-content.html 2020-07-10 15:39:39 UTC (rev 264220)
@@ -0,0 +1,19 @@
+<!DOCTYPE html><!-- webkit-test-runner [ internal:LayoutFormattingContextEnabled=true internal:LayoutFormattingContextIntegrationEnabled=false ] -->
+<style>
+.float_box {
+ float: left;
+ background-color: green;
+ width: 100px;
+ height: 100px;
+}
+
+.float_avoider {
+ overflow: hidden;
+ width: 100px;
+ height: 100px;
+ background-color: blue;
+ color: blue;
+}
+</style>
+<div class=float_box></div>
+<div class=float_avoider>text content</div>
Modified: trunk/Source/WebCore/ChangeLog (264219 => 264220)
--- trunk/Source/WebCore/ChangeLog 2020-07-10 14:57:57 UTC (rev 264219)
+++ trunk/Source/WebCore/ChangeLog 2020-07-10 15:39:39 UTC (rev 264220)
@@ -1,3 +1,19 @@
+2020-07-10 Zalan Bujtas <[email protected]>
+
+ [LFC][Floats] Normal flow element that establishes a new block formatting context must not overlap the margin box of any floats
+ https://bugs.webkit.org/show_bug.cgi?id=214185
+
+ Reviewed by Antti Koivisto.
+
+ BFCs in general should avoid floats. This code was confusing the cases where the block container box (not necessarily a BFC) establishes an IFC.
+ <div>The div establishes an IFC only. It should not avoid floats.</div>
+ <div style="overflow: hidden">The div establishes both a new BFC and an IFC. It should avoid floats.</div>
+
+ Test: fast/layoutformattingcontext/float-avoider-with-inline-content.html
+
+ * layout/layouttree/LayoutBox.cpp:
+ (WebCore::Layout::Box::isFloatAvoider const):
+
2020-07-10 Xabier Rodriguez Calvar <[email protected]>
[GStreamer][EME][OpenCDM] Implement OpenCDM support
Modified: trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp (264219 => 264220)
--- trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp 2020-07-10 14:57:57 UTC (rev 264219)
+++ trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp 2020-07-10 15:39:39 UTC (rev 264220)
@@ -177,7 +177,7 @@
if (isFloatingPositioned() || hasFloatClear())
return true;
- return establishesTableFormattingContext() || establishesIndependentFormattingContext() || (establishesBlockFormattingContext() && !establishesInlineFormattingContext());
+ return establishesTableFormattingContext() || establishesIndependentFormattingContext() || establishesBlockFormattingContext();
}
const ContainerBox& Box::containingBlock() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes