Title: [268283] trunk/Source/WebCore
- Revision
- 268283
- Author
- [email protected]
- Date
- 2020-10-09 13:03:48 -0700 (Fri, 09 Oct 2020)
Log Message
[LFC][Integration] Expand the line content width with the caret when applicable
https://bugs.webkit.org/show_bug.cgi?id=217527
Reviewed by Antti Koivisto.
This patch is in preparation for enabling 'overflow: hidden' for IFC.
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::constructContent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (268282 => 268283)
--- trunk/Source/WebCore/ChangeLog 2020-10-09 20:02:15 UTC (rev 268282)
+++ trunk/Source/WebCore/ChangeLog 2020-10-09 20:03:48 UTC (rev 268283)
@@ -1,3 +1,15 @@
+2020-10-09 Zalan Bujtas <[email protected]>
+
+ [LFC][Integration] Expand the line content width with the caret when applicable
+ https://bugs.webkit.org/show_bug.cgi?id=217527
+
+ Reviewed by Antti Koivisto.
+
+ This patch is in preparation for enabling 'overflow: hidden' for IFC.
+
+ * layout/integration/LayoutIntegrationLineLayout.cpp:
+ (WebCore::LayoutIntegration::LineLayout::constructContent):
+
2020-10-09 Fujii Hironori <[email protected]>
[WinCairo][GraphicsLayerTextureMapper] backdrop-filter support
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (268282 => 268283)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2020-10-09 20:02:15 UTC (rev 268282)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2020-10-09 20:03:48 UTC (rev 268283)
@@ -165,10 +165,19 @@
auto& line = lines[lineIndex];
auto& lineBoxLogicalRect = line.lineBoxLogicalRect();
// FIXME: This is where the logical to physical translate should happen.
- auto overflowWidth = std::max(line.logicalWidth(), lineBoxLogicalRect.width());
+ auto overflowWidth = [&] {
+ // FIXME: It's the copy of the lets-adjust-overflow-for-the-caret behavior from ComplexLineLayout::addOverflowFromInlineChildren.
+ auto endPadding = m_flow.hasOverflowClip() ? m_flow.paddingEnd() : 0_lu;
+ if (!endPadding)
+ endPadding = m_flow.endPaddingWidthForCaret();
+ if (m_flow.hasOverflowClip() && !endPadding && m_flow.element() && m_flow.element()->isRootEditableElement())
+ endPadding = 1;
+ auto lineBoxLogicalWidth = lineBoxLogicalRect.width() + endPadding;
+ return std::max(line.logicalWidth(), lineBoxLogicalWidth);
+ };
auto lineBoxLogicalBottom = (lineBoxLogicalRect.top() - line.logicalTop()) + lineBoxLogicalRect.height();
auto overflowHeight = std::max(line.logicalHeight(), lineBoxLogicalBottom);
- auto scrollableOverflowRect = FloatRect { line.logicalLeft(), line.logicalTop(), overflowWidth, overflowHeight };
+ auto scrollableOverflowRect = FloatRect { line.logicalLeft(), line.logicalTop(), overflowWidth(), overflowHeight };
auto firstRunIndex = runIndex;
auto lineInkOverflowRect = scrollableOverflowRect;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes