Title: [269816] trunk/Source/WebCore
- Revision
- 269816
- Author
- [email protected]
- Date
- 2020-11-14 05:53:44 -0800 (Sat, 14 Nov 2020)
Log Message
[LFC][IFC] Inline level box with negative vertical margin should not be considered empty
https://bugs.webkit.org/show_bug.cgi?id=218933
Reviewed by Antti Koivisto.
While in practice when the negative vertical margin makes the layout bounds empty (e.g: height: 100px; margin-top: -100px;),
and the inline level box contributes 0px to the line box height, it should not be considered empty.
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (269815 => 269816)
--- trunk/Source/WebCore/ChangeLog 2020-11-14 11:59:20 UTC (rev 269815)
+++ trunk/Source/WebCore/ChangeLog 2020-11-14 13:53:44 UTC (rev 269816)
@@ -1,3 +1,16 @@
+2020-11-14 Zalan Bujtas <[email protected]>
+
+ [LFC][IFC] Inline level box with negative vertical margin should not be considered empty
+ https://bugs.webkit.org/show_bug.cgi?id=218933
+
+ Reviewed by Antti Koivisto.
+
+ While in practice when the negative vertical margin makes the layout bounds empty (e.g: height: 100px; margin-top: -100px;),
+ and the inline level box contributes 0px to the line box height, it should not be considered empty.
+
+ * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
+ (WebCore::Layout::LineBoxBuilder::constructInlineLevelBoxes):
+
2020-11-13 Antoine Quint <[email protected]>
Support animations on more pseudo-elements
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp (269815 => 269816)
--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp 2020-11-14 11:59:20 UTC (rev 269815)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp 2020-11-14 13:53:44 UTC (rev 269816)
@@ -268,7 +268,9 @@
auto atomicInlineLevelBox = LineBox::InlineLevelBox::createAtomicInlineLevelBox(layoutBox, logicalLeft, { run.logicalWidth(), marginBoxHeight });
atomicInlineLevelBox->setBaseline(ascent);
atomicInlineLevelBox->setLayoutBounds(LineBox::InlineLevelBox::LayoutBounds { ascent, marginBoxHeight - ascent });
- if (marginBoxHeight)
+ // While in practice when the negative vertical margin makes the layout bounds empty (e.g: height: 100px; margin-top: -100px;), and this inline
+ // level box contributes 0px to the line box height, it should not be considered empty.
+ if (marginBoxHeight || inlineLevelBoxGeometry.marginBefore() || inlineLevelBoxGeometry.marginAfter())
atomicInlineLevelBox->setIsNonEmpty();
lineBox.addInlineLevelBox(WTFMove(atomicInlineLevelBox));
} else if (run.isInlineBoxStart()) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes