Title: [287393] trunk/Source/WebCore
- Revision
- 287393
- Author
- [email protected]
- Date
- 2021-12-23 06:13:41 -0800 (Thu, 23 Dec 2021)
Log Message
[LFC][IFC] Add support for RTL scrollable overflow
https://bugs.webkit.org/show_bug.cgi?id=234617
Reviewed by Antti Koivisto.
* layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
* platform/graphics/FloatRect.h:
(WebCore::FloatRect::shiftMaxXEdgeBy):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (287392 => 287393)
--- trunk/Source/WebCore/ChangeLog 2021-12-23 08:57:46 UTC (rev 287392)
+++ trunk/Source/WebCore/ChangeLog 2021-12-23 14:13:41 UTC (rev 287393)
@@ -1,3 +1,15 @@
+2021-12-23 Alan Bujtas <[email protected]>
+
+ [LFC][IFC] Add support for RTL scrollable overflow
+ https://bugs.webkit.org/show_bug.cgi?id=234617
+
+ Reviewed by Antti Koivisto.
+
+ * layout/integration/LayoutIntegrationInlineContentBuilder.cpp:
+ (WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):
+ * platform/graphics/FloatRect.h:
+ (WebCore::FloatRect::shiftMaxXEdgeBy):
+
2021-12-23 Carlos Garcia Campos <[email protected]>
[GTK][a11y] Test accessibility/svg-remote-element.html crashes with ATSPI
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp (287392 => 287393)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp 2021-12-23 08:57:46 UTC (rev 287392)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationInlineContentBuilder.cpp 2021-12-23 14:13:41 UTC (rev 287393)
@@ -79,8 +79,10 @@
for (size_t lineIndex = 0; lineIndex < lines.size(); ++lineIndex) {
auto& line = lines[lineIndex];
auto scrollableOverflowRect = FloatRect { line.scrollableOverflow() };
- if (auto overflowWidth = lineOverflowWidth(m_blockFlow, line.contentWidth()); overflowWidth > scrollableOverflowRect.width())
- scrollableOverflowRect.setWidth(overflowWidth);
+ if (auto overflowWidth = lineOverflowWidth(m_blockFlow, line.contentWidth()); overflowWidth > scrollableOverflowRect.width()) {
+ auto overflowValue = overflowWidth - scrollableOverflowRect.width();
+ m_blockFlow.style().isLeftToRightDirection() ? scrollableOverflowRect.shiftMaxXEdgeBy(overflowValue) : scrollableOverflowRect.shiftXEdgeBy(-overflowValue);
+ }
auto firstBoxIndex = boxIndex;
auto lineInkOverflowRect = scrollableOverflowRect;
Modified: trunk/Source/WebCore/platform/graphics/FloatRect.h (287392 => 287393)
--- trunk/Source/WebCore/platform/graphics/FloatRect.h 2021-12-23 08:57:46 UTC (rev 287392)
+++ trunk/Source/WebCore/platform/graphics/FloatRect.h 2021-12-23 14:13:41 UTC (rev 287393)
@@ -150,6 +150,11 @@
setWidth(std::max(0.0f, width() - delta));
}
+ void shiftMaxXEdgeBy(float delta)
+ {
+ shiftMaxXEdgeTo(maxX() + delta);
+ }
+
void shiftYEdgeBy(float delta)
{
move(0, delta);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes