Title: [273262] trunk/Source/WebCore
- Revision
- 273262
- Author
- [email protected]
- Date
- 2021-02-22 10:46:50 -0800 (Mon, 22 Feb 2021)
Log Message
[LFC][Integration] Respect hasLineIfEmpty
https://bugs.webkit.org/show_bug.cgi?id=222269
Reviewed by Zalan Bujtas.
In certain editing cases a block is computed to have height of a line even if it has no content.
This fixes editing/execCommand/extracted_style_assert.html
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutModernLines):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (273261 => 273262)
--- trunk/Source/WebCore/ChangeLog 2021-02-22 18:40:49 UTC (rev 273261)
+++ trunk/Source/WebCore/ChangeLog 2021-02-22 18:46:50 UTC (rev 273262)
@@ -1,3 +1,17 @@
+2021-02-22 Antti Koivisto <[email protected]>
+
+ [LFC][Integration] Respect hasLineIfEmpty
+ https://bugs.webkit.org/show_bug.cgi?id=222269
+
+ Reviewed by Zalan Bujtas.
+
+ In certain editing cases a block is computed to have height of a line even if it has no content.
+
+ This fixes editing/execCommand/extracted_style_assert.html
+
+ * rendering/RenderBlockFlow.cpp:
+ (WebCore::RenderBlockFlow::layoutModernLines):
+
2021-02-22 Sam Weinig <[email protected]>
Add experimental support for CSS Color 5 color-mix()
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (273261 => 273262)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2021-02-22 18:40:49 UTC (rev 273261)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp 2021-02-22 18:46:50 UTC (rev 273262)
@@ -3701,7 +3701,12 @@
if (view().frameView().layoutContext().layoutState()->isPaginated())
layoutFormattingContextLineLayout.adjustForPagination();
- auto contentHeight = layoutFormattingContextLineLayout.contentLogicalHeight();
+ auto contentHeight = [&] {
+ if (!hasLines() && hasLineIfEmpty())
+ return lineHeight(true, isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes);
+
+ return layoutFormattingContextLineLayout.contentLogicalHeight();
+ }();
auto contentBoxTop = borderAndPaddingBefore();
auto contentBoxBottom = contentBoxTop + contentHeight;
auto borderBoxBottom = contentBoxBottom + borderAndPaddingAfter();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes