DescriptionIntroduce honorEditingBoundaryAtOrBeforeOf() to avoid referencing constructing object
This patch introduces |honorEditingBoundaryAtOrBeforeOf()| from
|VisiblePosition::honorEditingBoundaryAtOrBefore()| to avoid constructing object
reference during |VisiblePositon| construction for making |VisiblePositon| in
composed tree for selection for web component.
Here is current calling sequence:
- VisibilePosition ctor
- VisiblePositon init
- isSameLine (in VisibleUnits.cpp) - called with *this, being constructed
- startOfLine (in VisibleUnits.cpp)
- VisbilePosition::honorEditingBoundaryAtOrBefore
To avoid constructing object reference, we'll make |isSameLine()| to take
|PositionWithAffinity| instead of |VisiblePosition|.
This is the first step make |VisiblePostion| to handle a position in composed
tree. Following patches will come:
- Templatize honorEditingBoundaryAtOrBeforeOf()
- Templatize inSameLine
- Introduce VisiblePosition::canonicalize(), as http://crrev.com/1106433002
VisiblePositon within composed tree
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=197451
Patch Set 1 #
Total comments: 4
Patch Set 2 : 2015-06-19T13:20:32 Mark |static| #Messages
Total messages: 15 (4 generated)
|