Make TextOffsetMapping::InlineContents not to use LayoutRubyAsBlock as container
This patch changes |TextOffsetMapping::InlineContents| not to use |LayoutRubyAsBlock| as container to avoid invalid DOM range. In <ruby>abc<rt>XYZ</rt></ruby>, before this patch |InlineContents| use <ruby> as container and having range start with <rt>@0 and "abc"[3] because in layout tree, <rt> comes before "abc". After this patch, we make |LayoutNGRubyRun| and |LayoutNGRubyBase| as container but |LayoutNGRubyAsBlock|. Layout tree: LayoutNGRubyAsBlock {RUBY} at (0,0) size 784x27 LayoutNGRubyRun (anonymous) at (0,7) size 22x20 LayoutNGRubyText {RT} at (0,-10) size 22x12 LayoutText {#text} at (2,0) size 18x12 text run at (2,0) width 18: "XYZ" LayoutNGRubyBase (anonymous) at (0,0) size 22x20 LayoutText {#text} at (0,0) size 22x19 text run at (0,0) width 22: "abc" Bug: 1124584 Change-Id: Id4006630a87127a6af2d1a5044a07e253457f8bc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2460551 Commit-Queue: Kent Tamura <tkent@chromium.org> Auto-Submit: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#815433}
Showing
Please register or sign in to comment