New issue
Advanced search Search tips

Issue 785687 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocking:
issue 789390



Sign in to add a comment

Fragment box for SPAN in mixed-BiDi should be correct

Project Member Reported by yosin@chromium.org, Nov 16 2017

Issue description

Following HTML produces wrong fragment box for SPAN.

Input:
<p dir=rtl><span>12 345 6789</span></p>

Fragment Tree:
  Box offset:0,104 size:784x13
    LineBox offset:641,0 size:143x13
      Text offset:0,0 size:52x13 start: 7 end: 11 "6789"
      Box offset:52,0 size:65x13 layout object = LayoutInline
        Text offset:0,0 size:13x13 start: 6 end: 7 " "
        Text offset:13,0 size:39x13 start: 3 end: 6 "345"
        Text offset:52,0 size:13x13 start: 2 end: 3 " "
      Text offset:117,0 size:26x13 start: 0 end: 2 "12"

Box for SPAN(LayoutInline) should contain boxes for "12 345 6789".


 

Comment 1 by yosin@chromium.org, Nov 16 2017

Blocking: 591099

Comment 2 by yosin@chromium.org, Nov 16 2017

Summary: Fragment box for SPAN in mixed-BiDi should be correct (was: Fragment box for SPAN in RTL should be correct)

Comment 3 by yosin@chromium.org, Nov 29 2017

Blocking: 789390

Comment 4 by yosin@chromium.org, Nov 29 2017

Blocking: -591099

Comment 5 by kojii@chromium.org, Nov 30 2017

Cc: -kojii@chromium.org
Owner: kojii@chromium.org
Status: Assigned (was: Available)

Comment 6 by kojii@chromium.org, Nov 30 2017

Labels: -Type-Bug Type-Task
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0b01cf577c95d5a700f63bff44c36be0312147b4

commit 0b01cf577c95d5a700f63bff44c36be0312147b4
Author: Koji Ishii <kojii@chromium.org>
Date: Tue Dec 19 09:12:01 2017

[LayoutNG] Bidi reorder after fragments were produced

This patch changes to run bidi reordering after fragments were
produced.

Before this patch, bidi reorder runs against NGInlineItemResult.
NGInlineItemResult has order-dependent items such as open/close,
which made computing inline boxes harder.

With this change, inline offsets of fragments are not known
until later stages. The logic for inline out-of-flow objects
is delayed until inline offsets are computed.

There are a few work to be worked on in following patches.
* There are rooms to optimize for LTR.
* Inline box fragmentation is not implemented yet.
* There are some incorrectness to compute inline margins/borders/
  paddings for RTL.

Existing tests pass, but not many tests turn to pass due to above.

Bug: 636993,  785687 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I19cef971cd0e494999cfb9e58531766c47adec68
Reviewed-on: https://chromium-review.googlesource.com/827043
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524977}
[modify] https://crrev.com/0b01cf577c95d5a700f63bff44c36be0312147b4/third_party/WebKit/Source/core/layout/LayoutInlineTest.cpp
[modify] https://crrev.com/0b01cf577c95d5a700f63bff44c36be0312147b4/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/0b01cf577c95d5a700f63bff44c36be0312147b4/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.h
[modify] https://crrev.com/0b01cf577c95d5a700f63bff44c36be0312147b4/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.h
[modify] https://crrev.com/0b01cf577c95d5a700f63bff44c36be0312147b4/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/0b01cf577c95d5a700f63bff44c36be0312147b4/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.h
[modify] https://crrev.com/0b01cf577c95d5a700f63bff44c36be0312147b4/third_party/WebKit/Source/core/layout/ng/inline/ng_line_box_fragment_builder.cc
[modify] https://crrev.com/0b01cf577c95d5a700f63bff44c36be0312147b4/third_party/WebKit/Source/core/layout/ng/inline/ng_line_box_fragment_builder.h
[modify] https://crrev.com/0b01cf577c95d5a700f63bff44c36be0312147b4/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc

Comment 8 by kojii@chromium.org, Dec 19 2017

Status: Fixed (was: Assigned)

Sign in to add a comment