TextOffsetMapping::ComputeContainigBlock() should return block box containing inline content |
|||
Issue description
Following functions in TextOffsetMapping should return LayoutBlock containing
inline content:
- ComputeContainigBlock()
- NextBlockFor()
- PreviousBlockFor()
We should change:
- IsBlockForTextOffsetMapping()
- Change ComputeContaingBlock() to traverse both ancestors then descendants
Example:
ComputeContaingBlock(BODY@0) should return LayoutBlockFlow(P) contains "foo"
<div><p>foo</p><p>bar</p></div>
Layout tree:
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x576
LayoutBlockFlow {DIV} at (0,0) size 784x56
LayoutBlockFlow {P} at (0,0) size 784x20
LayoutText {#text} at (0,0) size 21x19
text run at (0,0) width 21: "foo"
LayoutBlockFlow {P} at (0,36) size 784x20
LayoutText {#text} at (0,0) size 20x19
text run at (0,0) width 20: "bar"
,
Apr 5 2018
Is it a change in design?
,
Apr 6 2018
>#c2 Is it a change in design? No. TextOffsetMapping should work only for block box contains inline content.
,
Apr 17 2018
If we want to enforce inline children for TextOffsetMapping's containing block, we should use LayoutBlockFlow instead of LayoutBlock as the containing block's type.
,
Apr 18 2018
,
May 10 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4c414662683ec6083af7de599683c7fc177dc5d6 commit 4c414662683ec6083af7de599683c7fc177dc5d6 Author: Yoshifumi Inoue <yosin@chromium.org> Date: Thu May 10 01:29:33 2018 Introduce TextMappingOffset::InlineContents class This patch introduces |TextMappingOffset::InlineContents| class to represent a run of inline layout objects with iterator as preparation of computing inline layout object run from |LayoutBlockFlow|. Bug: 829234 Change-Id: If2fc23545b3983c7798553460d1cf06d08dd337c Reviewed-on: https://chromium-review.googlesource.com/1018923 Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#557409} [modify] https://crrev.com/4c414662683ec6083af7de599683c7fc177dc5d6/third_party/blink/renderer/core/editing/text_offset_mapping.cc [modify] https://crrev.com/4c414662683ec6083af7de599683c7fc177dc5d6/third_party/blink/renderer/core/editing/text_offset_mapping.h [modify] https://crrev.com/4c414662683ec6083af7de599683c7fc177dc5d6/third_party/blink/renderer/core/editing/text_offset_mapping_test.cc [modify] https://crrev.com/4c414662683ec6083af7de599683c7fc177dc5d6/third_party/blink/renderer/core/editing/visible_units_word.cc
,
May 10 2018
,
May 14 2018
,
May 14 2018
The bug is marked as P3 or Feature. It should not be merged as M67 is in beta. Please contact the approriate milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||
►
Sign in to add a comment |
|||
Comment 1 by yosin@chromium.org
, Apr 5 2018