Chromium Code Reviews
DescriptionMake VisiblePosition::init not to use being constructed object
Before this patch, |VisiblePosition::init()|, which is called by constructor,
used constructing object with |inSameLine()|. This pattern prevents us to
make |VisiblePostion| to work with composed tree.
This patch mitigates this issue by making |inSameLine()| and functions used
by |inSameLine| to take |PositionWithAffinity| instead of |VisiblePosition|.
Since |VisiblePosition::init()| calls |inSameLine()| with |this| pointer, all
functions called |inSameLine()| can't uses |VisiblePosition|. This is reason
why this patch changes following functions at once:
- inSameLine
- honorEditingBoundaryAtOrBeforeOf
- startOfLine
This patch is result of collaboration work with hajimehoshi@chromium.org
for selection of web components. After this patch, we are going to
implement another strategies for the composed tree. We've already
prepared that at http://crrev.com/1106433002.
BUG=275851
TEST=n/a; No behavior changes.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197558
Patch Set 1 #Patch Set 2 : 2015-06-19T18:45:18 Copy missing logic from all-in-one #Patch Set 3 : 2015-06-22T15:06:30 Change for float-list-changed-before-layout-crash.html #
Total comments: 2
Patch Set 4 : 2015-06-22T15:52:58 Make PositionWithAffinity::operator==() to check null position #
Total comments: 2
Patch Set 5 : 2015-06-22T16:23:26 Add a comment to PositionWIthAffinity::operator==() #
Messages
Total messages: 14 (5 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||