Commit 5cebb76f authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

RubyNG: Make ScrollableOverflow compatible with the legacy layout

Before this CL ScrollableOverflow in LayoutNG was always larger than the
line's bounding box.  It was not compatible with the legacy layout, and
it's helpless for <rt> positioning.  This CL makes ScrollableOveflow
compatible with the legacy layout.

Bug: 1069817
Change-Id: I876874966088a59fdc218a83342c1d0e4c68ee87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2225685
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774069}
parent 7d8c3c31
......@@ -71,15 +71,21 @@ NGLineHeightMetrics NGPhysicalLineBoxFragment::BaselineMetrics() const {
namespace {
// Include the inline-size of the line-box in the overflow.
// Do not update block offset and block size of |overflow|.
inline void AddInlineSizeToOverflow(const PhysicalRect& rect,
const WritingMode container_writing_mode,
PhysicalRect* overflow) {
PhysicalRect inline_rect;
inline_rect.offset = rect.offset;
if (IsHorizontalWritingMode(container_writing_mode))
if (IsHorizontalWritingMode(container_writing_mode)) {
inline_rect.size.width = rect.size.width;
else
inline_rect.offset.top = overflow->offset.top;
inline_rect.size.height = overflow->size.height;
} else {
inline_rect.size.height = rect.size.height;
inline_rect.offset.left = overflow->offset.left;
inline_rect.size.width = overflow->size.width;
}
overflow->UniteEvenIfEmpty(inline_rect);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment