[text autosizing] ruby elements are not autosized |
|||
Issue descriptionTest case: https://output.jsbin.com/jugela/quiet All text is autosized except for the <ruby> element, which looks unpleasant.
,
Feb 3 2017
,
Feb 7 2017
Acording to <ruby>'s layout tree:
layoutRuby(block/inline)
layoutRubyRun(inline-block)
layoutRubyBase(block)
layoutInline(<rb>)
text
layoutRubyText(block, <rt>)
text
LayoutRubyRun is inline-block, and we will create a cluster for it. So autosize will be broken by this cluster.
Maybe we could use the similar design as inflateAutoTable:
when autosizing <ruby>:
1. skip inline-block objects(rubyrun)
2. use "DescendToInnerBlocks" behavior to autosize inner content
,
Feb 7 2017
more detail :) https://codereview.chromium.org/2683553002
,
Feb 7 2017
Thank you for working on this. :) The approach in #3 sounds ok to me.
,
Feb 16 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/082b073b26e5f408462e4fd1f229d7614ace4364 commit 082b073b26e5f408462e4fd1f229d7614ace4364 Author: cathiechen <cathiechen@tencent.com> Date: Thu Feb 16 08:30:37 2017 Fix not autosizing ruby elements issue. RubyRun is inline-block. When inflate ruby, skip rubyRun and inflate all rubyRun's inner blocks. BUG= 688561 Review-Url: https://codereview.chromium.org/2683553002 Cr-Commit-Position: refs/heads/master@{#450897} [modify] https://crrev.com/082b073b26e5f408462e4fd1f229d7614ace4364/third_party/WebKit/Source/core/layout/LayoutText.h [modify] https://crrev.com/082b073b26e5f408462e4fd1f229d7614ace4364/third_party/WebKit/Source/core/layout/TextAutosizer.cpp [modify] https://crrev.com/082b073b26e5f408462e4fd1f229d7614ace4364/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
,
Feb 21 2017
,
Mar 22 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by skobes@chromium.org
, Feb 3 2017