Title: [270990] trunk/Source/WebCore
- Revision
- 270990
- Author
- [email protected]
- Date
- 2020-12-18 14:27:31 -0800 (Fri, 18 Dec 2020)
Log Message
Line snapping fails when the content is taller than the page.
https://bugs.webkit.org/show_bug.cgi?id=220020
<rdar://problem/68761119>
Reviewed by Antti Koivisto.
When the snapped position of the current line falls off of the page, we call lineSnapAdjustment() recursively to figure out the snapped position on the next page.
We usually find the final position on the next page mostly slightly below the logical top.
However when the line is taller than the page itself, it does not fit the next page or any of the following pages (assuming uniform page height).
Let the line overflow when the pages can't accommodate it.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::lineSnapAdjustment const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (270989 => 270990)
--- trunk/Source/WebCore/ChangeLog 2020-12-18 22:17:56 UTC (rev 270989)
+++ trunk/Source/WebCore/ChangeLog 2020-12-18 22:27:31 UTC (rev 270990)
@@ -1,3 +1,20 @@
+2020-12-18 Zalan Bujtas <[email protected]>
+
+ Line snapping fails when the content is taller than the page.
+ https://bugs.webkit.org/show_bug.cgi?id=220020
+ <rdar://problem/68761119>
+
+ Reviewed by Antti Koivisto.
+
+ When the snapped position of the current line falls off of the page, we call lineSnapAdjustment() recursively to figure out the snapped position on the next page.
+ We usually find the final position on the next page mostly slightly below the logical top.
+ However when the line is taller than the page itself, it does not fit the next page or any of the following pages (assuming uniform page height).
+
+ Let the line overflow when the pages can't accommodate it.
+
+ * rendering/RootInlineBox.cpp:
+ (WebCore::RootInlineBox::lineSnapAdjustment const):
+
2020-12-18 Dean Jackson <[email protected]>
Use EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE now it is in the build
Modified: trunk/Source/WebCore/rendering/RootInlineBox.cpp (270989 => 270990)
--- trunk/Source/WebCore/rendering/RootInlineBox.cpp 2020-12-18 22:17:56 UTC (rev 270989)
+++ trunk/Source/WebCore/rendering/RootInlineBox.cpp 2020-12-18 22:27:31 UTC (rev 270990)
@@ -416,7 +416,11 @@
if (newPageLogicalTop == pageLogicalTop)
return result;
- // Put ourselves at the top of the next page to force a snap onto the new grid established by that page.
+ auto pageLogicalHeight = blockFlow().pageLogicalHeightForOffset(lineBoxBottom() + result);
+ // Put ourselves at the top of the next page to force a snap onto the new grid established by that page unless
+ // the line is taller than the page. In such cases let's just leave the line overflow.
+ if (pageLogicalHeight < lineBoxBottom() + result)
+ return result;
return lineSnapAdjustment(newPageLogicalTop - (blockOffset + lineBoxTop()));
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes