New issue
Advanced search Search tips

Issue 793098 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocking:
issue 771398



Sign in to add a comment

Eliminate primary direction passing in ComputeInlineBoxPosition and sibling functions

Project Member Reported by xiaoche...@chromium.org, Dec 7 2017

Issue description

We want to break calls of ComputeInlineBoxPosition as follows:

Before breaking:

box_position = ComputeInlineBoxPosition(position);

After breaking:

adjusted = ComputeInlineAdjustedPosition(position);
// Alternative implementation for LayoutNG
box_position = ComputeInlineBoxPositionForInlineAdjustedPosition(adjusted);

However, to ensure no behavior change in the above refactoring, |position| and |adjusted| must have the same primary direction because ComputeInlineBoxPosition() passes the primary direction of |position| into ComputeInlineBoxPositionForInlineAdjustedPosition().

We should identify all callers of ComputeInlineBoxPositionForInlineAdjustedPosition using a wrong primary direction, do investigation and try to eliminate them.

Two known callers are SelectionModifier's LeftPositionOf() and RightPositionOf().
 
Blocking: 771398

Comment 2 by yosin@chromium.org, Dec 8 2017

Components: -Blink>Editing Blink>Editing>Selection
<div>abc|<div dir=rtl><bdo>DEF</bdo></div> for RightPositionOf() hits
this. Note: We don't need to have BDO element to reproduce.

In this case: 
ComputeInlinePosition("DEF"@0, LTR) => "DEF"@3
ComputeInlinePosition("DEF"@0, RTL) => "DEF"@0

See also discussion in http://crrev.com/c/813142

Comment 3 by yosin@chromium.org, Jan 10 2018

Labels: Pri-3
Status: Fixed (was: Available)

Sign in to add a comment