New issue
Advanced search Search tips

Issue 657237 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocked on:
issue 648949
issue 657256
issue 747795
issue 897983

Blocking:
issue 894651



Sign in to add a comment

Reduce usage of VisiblePosition and VisibleSelection

Project Member Reported by yosin@chromium.org, Oct 19 2016

Issue description

Since constructors of VisiblePosition and VisibleSelection require clean layout, these call sites following to update layout call.

To reduce number of update layout, we should reduce number of usage of VisiblePosition and VisibleSelection.

We can do:
- Revise implementation not use VP/VS
- Replace FrameSelection::setSelection(createVisibleSelection(S)) to FS::setSeleciton(S)
- Convert createVisibleSelection() other than taking SelectionTemplate to take SelectionTemplate.

Since constructors of VisiblePosition and VisibleSelection require clean layout, these call sites following to update layout call.

To reduce number of update layout, we should reduce number of usage of VisiblePosition and VisibleSelection.

We can do:
- Revise implementation not use VP/VS
- Replace FrameSelection::setSelection(createVisibleSelection(S)) to FS::setSeleciton(S)
- Convert createVisibleSelection() other than taking SelectionTemplate to take SelectionTemplate.


Rough cleanup ideas for VisiblePosition: http://bit.ly/2zdSHfR

List of VisiblePosition usage other than in editing commands (as of Oct 29 2018): http://bit.ly/2OaWAHH
 
Showing comments 5 - 104 of 104 Older
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 20 2016

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

commit 5f52b60a9d5f7618df1acd9319e4e04938fc38ab
Author: yosin <yosin@chromium.org>
Date: Thu Oct 20 05:42:10 2016

Introduce FrameSelection::moveCaretSelection() as replacement of moveTo()

This patch moves an implementation of |moveCaretSelection()| to |FrameSelection|
from |WebLocalFrameImpl| to make web layer thin and reduce number of usage
of |VisiblePositon| for improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://chromiumcodereview.appspot.com/2431153002
Cr-Commit-Position: refs/heads/master@{#426418}

[modify] https://crrev.com/5f52b60a9d5f7618df1acd9319e4e04938fc38ab/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/5f52b60a9d5f7618df1acd9319e4e04938fc38ab/third_party/WebKit/Source/core/editing/FrameSelection.h
[modify] https://crrev.com/5f52b60a9d5f7618df1acd9319e4e04938fc38ab/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
[modify] https://crrev.com/5f52b60a9d5f7618df1acd9319e4e04938fc38ab/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 20 2016

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

commit dfb8322ccb6687fa5fd64029e9746049c12e06e1
Author: yosin <yosin@chromium.org>
Date: Thu Oct 20 05:47:12 2016

Get rid of flat tree version of createVisibleSelection() taking two VisiblePositionInFlatTree

This patch gets rid of flat tree version of |createVisibleSelection()| taking
to |VisiblePositionInFlatTree|by replacing with |SelectionInFlatTree| version to
reduce number of overloads for improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://chromiumcodereview.appspot.com/2425623002
Cr-Commit-Position: refs/heads/master@{#426419}

[modify] https://crrev.com/dfb8322ccb6687fa5fd64029e9746049c12e06e1/third_party/WebKit/Source/core/editing/PendingSelection.cpp
[modify] https://crrev.com/dfb8322ccb6687fa5fd64029e9746049c12e06e1/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/dfb8322ccb6687fa5fd64029e9746049c12e06e1/third_party/WebKit/Source/core/editing/VisibleSelection.h

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 20 2016

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

commit 237aeceb8741da6701d858cd5adeb5efc6810a35
Author: yosin <yosin@chromium.org>
Date: Thu Oct 20 08:14:29 2016

Get rid of createVisibleSelection() to take EphemeralRange

This patch gets rid of |createVisibleSelection()| taking |EphemeralRange| by
replacing with |SelectionInDOMTree| version to reduce number of overloads for
improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://chromiumcodereview.appspot.com/2430253003
Cr-Commit-Position: refs/heads/master@{#426430}

[modify] https://crrev.com/237aeceb8741da6701d858cd5adeb5efc6810a35/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/237aeceb8741da6701d858cd5adeb5efc6810a35/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/237aeceb8741da6701d858cd5adeb5efc6810a35/third_party/WebKit/Source/core/editing/VisibleSelection.h
[modify] https://crrev.com/237aeceb8741da6701d858cd5adeb5efc6810a35/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
[modify] https://crrev.com/237aeceb8741da6701d858cd5adeb5efc6810a35/third_party/WebKit/Source/core/page/DragController.cpp
[modify] https://crrev.com/237aeceb8741da6701d858cd5adeb5efc6810a35/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
[modify] https://crrev.com/237aeceb8741da6701d858cd5adeb5efc6810a35/third_party/WebKit/Source/web/mac/WebSubstringUtil.mm

Project Member

Comment 8 by bugdroid1@chromium.org, Oct 20 2016

Project Member

Comment 9 by bugdroid1@chromium.org, Oct 20 2016

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

commit 95dd59cb1bf42824ce20e77c13b51b5d33dabef0
Author: yosin <yosin@chromium.org>
Date: Thu Oct 20 09:52:16 2016

Get rid of VisibleSelection::selectionFromContentsOfNode()

This patch gets rid of |VisibleSelection::selectionFromContentsOfNode()| with
introducing |SelectionTemplate<T>::selectAllChildren()| by using
|setSelection()| taking |SelectionTemplate<T>| to simplify |VisibleSelection|
class for improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://chromiumcodereview.appspot.com/2432173005
Cr-Commit-Position: refs/heads/master@{#426437}

[modify] https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp
[modify] https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0/third_party/WebKit/Source/core/editing/SelectionTemplate.h
[modify] https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0/third_party/WebKit/Source/core/editing/VisibleSelection.h
[modify] https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
[modify] https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp
[modify] https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
[modify] https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0/third_party/WebKit/Source/core/page/DragController.cpp
[modify] https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0/third_party/WebKit/Source/core/svg/UnsafeSVGAttributeSanitizationTest.cpp

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 21 2016

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

commit 9af5344ba29c36f6ec50fd75791c6a606a3309fc
Author: yosin <yosin@chromium.org>
Date: Fri Oct 21 01:51:28 2016

Get rid of createVisibleSelection() to take PositionWithAffinity

This patch gets rid of |createVisibleSelection()| taking |PositionWithAffinity| by
replacing with |SelectionInDOMTree| version to reduce number of overloads for
improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://chromiumcodereview.appspot.com/2428363004
Cr-Commit-Position: refs/heads/master@{#426684}

[modify] https://crrev.com/9af5344ba29c36f6ec50fd75791c6a606a3309fc/third_party/WebKit/Source/core/editing/DOMSelection.cpp
[modify] https://crrev.com/9af5344ba29c36f6ec50fd75791c6a606a3309fc/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/9af5344ba29c36f6ec50fd75791c6a606a3309fc/third_party/WebKit/Source/core/editing/VisibleSelection.h
[modify] https://crrev.com/9af5344ba29c36f6ec50fd75791c6a606a3309fc/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
[modify] https://crrev.com/9af5344ba29c36f6ec50fd75791c6a606a3309fc/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/9af5344ba29c36f6ec50fd75791c6a606a3309fc/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommandTest.cpp
[modify] https://crrev.com/9af5344ba29c36f6ec50fd75791c6a606a3309fc/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
[modify] https://crrev.com/9af5344ba29c36f6ec50fd75791c6a606a3309fc/third_party/WebKit/Source/core/page/DragController.cpp

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 24 2016

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

commit 91be04c48e4cc1ef958dc1ddbfc4cf34a8584842
Author: yosin <yosin@chromium.org>
Date: Mon Oct 24 09:25:28 2016

Get rid of flat tree version of createVisibleSelection() taking two VisiblePosition

This patch gets rid of flat tree version of |createVisibleSelection()| taking
two |VisiblePosition| by replacing with |SelectionInDOMTree| version to reduce
number of overloads for improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2437873008
Cr-Commit-Position: refs/heads/master@{#427031}

[modify] https://crrev.com/91be04c48e4cc1ef958dc1ddbfc4cf34a8584842/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/91be04c48e4cc1ef958dc1ddbfc4cf34a8584842/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/91be04c48e4cc1ef958dc1ddbfc4cf34a8584842/third_party/WebKit/Source/core/editing/GranularityStrategy.cpp
[modify] https://crrev.com/91be04c48e4cc1ef958dc1ddbfc4cf34a8584842/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/91be04c48e4cc1ef958dc1ddbfc4cf34a8584842/third_party/WebKit/Source/core/editing/VisibleSelection.h
[modify] https://crrev.com/91be04c48e4cc1ef958dc1ddbfc4cf34a8584842/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
[modify] https://crrev.com/91be04c48e4cc1ef958dc1ddbfc4cf34a8584842/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/91be04c48e4cc1ef958dc1ddbfc4cf34a8584842/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
[modify] https://crrev.com/91be04c48e4cc1ef958dc1ddbfc4cf34a8584842/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
[modify] https://crrev.com/91be04c48e4cc1ef958dc1ddbfc4cf34a8584842/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp
[modify] https://crrev.com/91be04c48e4cc1ef958dc1ddbfc4cf34a8584842/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Project Member

Comment 12 by bugdroid1@chromium.org, Oct 25 2016

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

commit 7fffd89947118c4719ccfb7afceae7ca66d93f5b
Author: yosin <yosin@chromium.org>
Date: Tue Oct 25 05:20:59 2016

Get rid of flat tree version of createVisibleSelection() taking one ePosition

This patch gets rid of flat tree version of |createVisibleSelection()| taking
one |Position| by replacing with |SelectionInDOMTree| version to reduce number
of overloads for improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2442673002
Cr-Commit-Position: refs/heads/master@{#427280}

[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/VisibleSelection.h
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
[modify] https://crrev.com/7fffd89947118c4719ccfb7afceae7ca66d93f5b/third_party/WebKit/Source/web/WebViewImpl.cpp

Project Member

Comment 13 by bugdroid1@chromium.org, Oct 26 2016

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

commit 02a3e9549a9be351eb995a6e69ef949d60674900
Author: yosin <yosin@chromium.org>
Date: Wed Oct 26 08:17:42 2016

Get rid of createVisibleSelection() taking two Position

This patch gets rid of flat tree version of |createVisibleSelection()| taking
two |Position| by replacing with |SelectionInDOMTree| version to reduce number
of overloads for improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2451613003
Cr-Commit-Position: refs/heads/master@{#427633}

[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/DOMSelection.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/GranularityStrategyTest.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/SelectionAdjusterTest.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/VisibleSelection.h
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/commands/CreateLinkCommand.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/commands/InsertListCommandTest.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
[modify] https://crrev.com/02a3e9549a9be351eb995a6e69ef949d60674900/third_party/WebKit/Source/core/page/DragController.cpp

Project Member

Comment 14 by bugdroid1@chromium.org, Oct 26 2016

Project Member

Comment 15 by bugdroid1@chromium.org, Oct 28 2016

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

commit e3d2a5b25ef09f4c8458db05080e604efae9c1aa
Author: yosin <yosin@chromium.org>
Date: Fri Oct 28 07:19:30 2016

Utilize EditCommand::setEndingSelection() taking SelectionInDOMTree

This patch changes call sites of |EditCommand::setEndingSelection()| passing
|VisibleSelection| to |SeelctionInDOMTree| to reduce usage of |VisibleSelection|
and reduce update layout tree and as a preparation of introducing
|SelecitonForUndoStep|, http://crrev.com/2457523004, for farther reduce of
update layout calls.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2450213002
Cr-Commit-Position: refs/heads/master@{#428305}

[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/CreateLinkCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/EditCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/EditCommand.h
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 28 2016

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

commit e3d2a5b25ef09f4c8458db05080e604efae9c1aa
Author: yosin <yosin@chromium.org>
Date: Fri Oct 28 07:19:30 2016

Utilize EditCommand::setEndingSelection() taking SelectionInDOMTree

This patch changes call sites of |EditCommand::setEndingSelection()| passing
|VisibleSelection| to |SeelctionInDOMTree| to reduce usage of |VisibleSelection|
and reduce update layout tree and as a preparation of introducing
|SelecitonForUndoStep|, http://crrev.com/2457523004, for farther reduce of
update layout calls.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2450213002
Cr-Commit-Position: refs/heads/master@{#428305}

[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/CreateLinkCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/EditCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/EditCommand.h
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
[modify] https://crrev.com/e3d2a5b25ef09f4c8458db05080e604efae9c1aa/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp

Project Member

Comment 17 by bugdroid1@chromium.org, Oct 31 2016

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

commit 1ab21eb247b8c05daf26de66bfb63a323c738866
Author: yosin <yosin@chromium.org>
Date: Mon Oct 31 06:28:12 2016

Utilize FrameSelection::setSelection() taking SelectionInDOMTree/SelectionInFlatTree

This patch changes |FrameSelection:setSelection()| taking |VisibleSelection| and
|VisibleSelectionInFlatTRee| to use |SelectionIn{DOM,Flat}Tree| to reduce
usage of |VisibleSelection{,InFlatTree}| for improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2457613004
Cr-Commit-Position: refs/heads/master@{#428660}

[modify] https://crrev.com/1ab21eb247b8c05daf26de66bfb63a323c738866/third_party/WebKit/Source/core/editing/DOMSelection.cpp
[modify] https://crrev.com/1ab21eb247b8c05daf26de66bfb63a323c738866/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/1ab21eb247b8c05daf26de66bfb63a323c738866/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/1ab21eb247b8c05daf26de66bfb63a323c738866/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/1ab21eb247b8c05daf26de66bfb63a323c738866/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp

Project Member

Comment 18 by bugdroid1@chromium.org, Nov 10 2016

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

commit 0acae5b3190e46c4a2cb8920753005b0e5daa36b
Author: aelias <aelias@chromium.org>
Date: Thu Nov 10 21:22:58 2016

Revert of Utilize FrameSelection::setSelection() taking SelectionInDOMTree/SelectionInFlatTree (patchset #3 id:40001 of https://codereview.chromium.org/2457613004/ )

Reason for revert:
Caused http://b/32727536

Original issue's description:
> Utilize FrameSelection::setSelection() taking SelectionInDOMTree/SelectionInFlatTree
>
> This patch changes |FrameSelection:setSelection()| taking |VisibleSelection| and
> |VisibleSelectionInFlatTRee| to use |SelectionIn{DOM,Flat}Tree| to reduce
> usage of |VisibleSelection{,InFlatTree}| for improving code health.
>
> BUG=657237
> TEST=n/a; no behavior changes
>
> Committed: https://crrev.com/1ab21eb247b8c05daf26de66bfb63a323c738866
> Cr-Commit-Position: refs/heads/master@{#428660}

TBR=xiaochengh@chromium.org,yoichio@chromium.org,yosin@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=657237

Review-Url: https://codereview.chromium.org/2491763004
Cr-Commit-Position: refs/heads/master@{#431357}

[modify] https://crrev.com/0acae5b3190e46c4a2cb8920753005b0e5daa36b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
[modify] https://crrev.com/0acae5b3190e46c4a2cb8920753005b0e5daa36b/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/0acae5b3190e46c4a2cb8920753005b0e5daa36b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/0acae5b3190e46c4a2cb8920753005b0e5daa36b/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/0acae5b3190e46c4a2cb8920753005b0e5daa36b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp

Project Member

Comment 19 by bugdroid1@chromium.org, Nov 25 2016

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

commit 31a4628dfd8c8633077d89d9abb34638547ad699
Author: yosin <yosin@chromium.org>
Date: Fri Nov 25 07:44:43 2016

Utilize FrameSelection::setSelection() taking SelectionInDOMTree/SelectionInFlatTree

This patch changes |FrameSelection:setSelection()| taking |VisibleSelection| and
|VisibleSelectionInFlatTRee| to use |SelectionIn{DOM,Flat}Tree| to reduce
usage of |VisibleSelection{,InFlatTree}| for improving code health.

BUG=657237
TEST=n/a; no behavior changes

Committed: https://crrev.com/1ab21eb247b8c05daf26de66bfb63a323c738866
Review-Url: https://codereview.chromium.org/2457613004
Cr-Original-Commit-Position: refs/heads/master@{#428660}
Cr-Commit-Position: refs/heads/master@{#434447}

[modify] https://crrev.com/31a4628dfd8c8633077d89d9abb34638547ad699/third_party/WebKit/Source/core/editing/DOMSelection.cpp
[modify] https://crrev.com/31a4628dfd8c8633077d89d9abb34638547ad699/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/31a4628dfd8c8633077d89d9abb34638547ad699/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/31a4628dfd8c8633077d89d9abb34638547ad699/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/31a4628dfd8c8633077d89d9abb34638547ad699/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp

Project Member

Comment 20 by bugdroid1@chromium.org, Feb 27 2017

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

commit d57cc7528932df35ce4a7d56f7cfc9dc380e5a09
Author: xiaochengh <xiaochengh@chromium.org>
Date: Mon Feb 27 05:22:33 2017

Make Editor::respondToChangedContents take a Position

This patch makes the above mentioned function take a Position as its
parameter instead of a VisibleSelection. This is also a preparation of
removing layout update from Editor::applied/unapplied/reappliedEditing.

BUG=657237
TEST=n/a; no behavior change

Review-Url: https://codereview.chromium.org/2712243002
Cr-Commit-Position: refs/heads/master@{#453158}

[modify] https://crrev.com/d57cc7528932df35ce4a7d56f7cfc9dc380e5a09/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/d57cc7528932df35ce4a7d56f7cfc9dc380e5a09/third_party/WebKit/Source/core/editing/Editor.h

Project Member

Comment 21 by bugdroid1@chromium.org, Mar 1 2017

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

commit 9891ad7aa94964b5cee2cd7c73ee02fdd173fbbe
Author: xiaochengh <xiaochengh@chromium.org>
Date: Wed Mar 01 02:45:59 2017

Make Editor::changeSelectionAfterCommand take SelectionInDOMTree

Now that changing selection no longer requires layout, there is no
need to pass a canonicalized selection to changeSelectionAfterCommand
at the end of an editing command.

Hence, this patch makes the above mentioned function take a
SelectionInDOMTree instead.

BUG=657237
TEST=n/a; no behavior change

Review-Url: https://codereview.chromium.org/2720063002
Cr-Commit-Position: refs/heads/master@{#453795}

[modify] https://crrev.com/9891ad7aa94964b5cee2cd7c73ee02fdd173fbbe/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/9891ad7aa94964b5cee2cd7c73ee02fdd173fbbe/third_party/WebKit/Source/core/editing/Editor.h

Project Member

Comment 22 by bugdroid1@chromium.org, Mar 7 2017

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

commit 28984afb360fd50ff1c57e0e09ab7ef22b169073
Author: yosin <yosin@chromium.org>
Date: Tue Mar 07 17:58:10 2017

Get rid of FrameSelection::setSelection() taking VisibleSelection

This patch gets rid of |FrameSelection::setSelection()| taking
|VisibleSelection| to reduce usage of |VisibleSelection| for improving code
health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2736613003
Cr-Commit-Position: refs/heads/master@{#455128}

[modify] https://crrev.com/28984afb360fd50ff1c57e0e09ab7ef22b169073/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/28984afb360fd50ff1c57e0e09ab7ef22b169073/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/28984afb360fd50ff1c57e0e09ab7ef22b169073/third_party/WebKit/Source/core/editing/FrameSelection.h
[modify] https://crrev.com/28984afb360fd50ff1c57e0e09ab7ef22b169073/third_party/WebKit/Source/core/editing/GranularityStrategyTest.cpp
[modify] https://crrev.com/28984afb360fd50ff1c57e0e09ab7ef22b169073/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
[modify] https://crrev.com/28984afb360fd50ff1c57e0e09ab7ef22b169073/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
[modify] https://crrev.com/28984afb360fd50ff1c57e0e09ab7ef22b169073/third_party/WebKit/Source/core/page/DragController.cpp

Project Member

Comment 23 by bugdroid1@chromium.org, Mar 7 2017

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

commit f47de6fa1c432e87dc270ff96b1089e5983c2cf1
Author: yoichio <yoichio@chromium.org>
Date: Tue Mar 07 18:28:34 2017

Add VisibleUnits::startOfWordPosition

This is Position version of |startOfWord| which returns VisiblePosition.
Since returned Position should be already canonicalized with
|previousBoundary()|, we can replace them.

This is preparation for letting |startOfWord| and |endOfWord| return
 uncanonicalized Position.

BUG=657237, 697725 
TEST=No change in behavior.

Review-Url: https://codereview.chromium.org/2732863004
Cr-Commit-Position: refs/heads/master@{#455146}

[modify] https://crrev.com/f47de6fa1c432e87dc270ff96b1089e5983c2cf1/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
[modify] https://crrev.com/f47de6fa1c432e87dc270ff96b1089e5983c2cf1/third_party/WebKit/Source/core/editing/VisibleUnits.h

Project Member

Comment 24 by bugdroid1@chromium.org, Mar 8 2017

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

commit a69c7b5d863dacbb08bfaa04359e3bc0bb4470dc
Author: yosin <yosin@chromium.org>
Date: Wed Mar 08 03:19:47 2017

Make TypingCommand::insertText() to take SelectionInDOMTree instead of VisibleSelection

This patch makes |TypingCommand::insertText()| to take |SelectionInDOMTree|
instead of |VisibleSelection| to reduce usage of |VisibleSelection| for
improving code health.

BUG=657237
TEST=n/a

Review-Url: https://codereview.chromium.org/2733183002
Cr-Commit-Position: refs/heads/master@{#455368}

[modify] https://crrev.com/a69c7b5d863dacbb08bfaa04359e3bc0bb4470dc/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/a69c7b5d863dacbb08bfaa04359e3bc0bb4470dc/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
[modify] https://crrev.com/a69c7b5d863dacbb08bfaa04359e3bc0bb4470dc/third_party/WebKit/Source/core/editing/commands/TypingCommand.h

Project Member

Comment 25 by bugdroid1@chromium.org, Mar 8 2017

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

commit ebadc5308f4a935c6e0ddec6fbb466e202913e30
Author: yosin <yosin@chromium.org>
Date: Wed Mar 08 03:24:44 2017

Make InsertListCommand::selectionHasListOfType() to take Position objects instead of VisibleSelection

This patch makes |InsertListCommand::selectionHasListOfType()| to take two
Position objects for start and end instead of |VisibleSelection| since it uses
only start and end of selection to reduce usage of |VisibleSelection| for
improving code health.

BUG=657237
TEST=n/a

Review-Url: https://codereview.chromium.org/2731313003
Cr-Commit-Position: refs/heads/master@{#455371}

[modify] https://crrev.com/ebadc5308f4a935c6e0ddec6fbb466e202913e30/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
[modify] https://crrev.com/ebadc5308f4a935c6e0ddec6fbb466e202913e30/third_party/WebKit/Source/core/editing/commands/InsertListCommand.h

Project Member

Comment 26 by bugdroid1@chromium.org, Mar 9 2017

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

commit 86769268e85c0913ef8d86c46ff08baff599703e
Author: yosin <yosin@chromium.org>
Date: Thu Mar 09 07:21:50 2017

Make SelectionController::setNonDirectionalSelectionIfNeeded() to take SelectionInFlatTree

This patch makes |SelectionController::setNonDirectionalSelectionIfNeeded()|
to |SelectionInFlatTree| for reducing |VisibleSelection| usage for improving
code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2732963002
Cr-Commit-Position: refs/heads/master@{#455688}

[modify] https://crrev.com/86769268e85c0913ef8d86c46ff08baff599703e/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/86769268e85c0913ef8d86c46ff08baff599703e/third_party/WebKit/Source/core/editing/SelectionController.h
[modify] https://crrev.com/86769268e85c0913ef8d86c46ff08baff599703e/third_party/WebKit/Source/core/editing/SelectionControllerTest.cpp

Project Member

Comment 27 by bugdroid1@chromium.org, Mar 9 2017

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

commit 72f3c9b47d08185135faeab172c1130f34f1ca66
Author: yosin <yosin@chromium.org>
Date: Thu Mar 09 09:09:17 2017

Make SpellChecker::removeMarkers() to take EphemeralRange instead of VisibleSelection

This patch makes |SpellChecker::removeMarkers()| to take |EphemeralRange|
instead of |VisibleSelection| as preparation of reduce usage of
|VisibleSelection| for improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2740873003
Cr-Commit-Position: refs/heads/master@{#455705}

[modify] https://crrev.com/72f3c9b47d08185135faeab172c1130f34f1ca66/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
[modify] https://crrev.com/72f3c9b47d08185135faeab172c1130f34f1ca66/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h

Project Member

Comment 28 by bugdroid1@chromium.org, Mar 9 2017

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

commit ac02a40177745391adfae78a83b05b177113b3c9
Author: yosin <yosin@chromium.org>
Date: Thu Mar 09 09:15:35 2017

Make GranularityStrategy::updateExtent() to return SelectionInDOM instead of VisibleSelection

This patch makes |GranularityStrategy::updateExtent()| to return
|SelectionInDOM| instead of |VisibleSelection| to reduce usage of
|VisibleSelection| for improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2735143002
Cr-Commit-Position: refs/heads/master@{#455707}

[modify] https://crrev.com/ac02a40177745391adfae78a83b05b177113b3c9/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/ac02a40177745391adfae78a83b05b177113b3c9/third_party/WebKit/Source/core/editing/GranularityStrategy.cpp
[modify] https://crrev.com/ac02a40177745391adfae78a83b05b177113b3c9/third_party/WebKit/Source/core/editing/GranularityStrategy.h

Project Member

Comment 29 by bugdroid1@chromium.org, Mar 9 2017

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

commit b4fed54d2920ee4662f7e77049ff500f24fad905
Author: yosin <yosin@chromium.org>
Date: Thu Mar 09 11:16:33 2017

Make rootEditableElementOrTreeScopeRootNodeOf() to take Position instead of VisibleSelection

This patch makes |rootEditableElementOrTreeScopeRootNodeOf() | to take
|Position| instead of |VisibleSelection| as preparation of reduce usage of
|VisibleSelection| for improving code health.

This patch also replaces deprecated version of |computeVisibleSelection()|
in |InputMethodController::getSelectionOffsets()| since it is called in
after |computeVisibleSelectionDeprecated()|.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2742703002
Cr-Commit-Position: refs/heads/master@{#455711}

[modify] https://crrev.com/b4fed54d2920ee4662f7e77049ff500f24fad905/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/b4fed54d2920ee4662f7e77049ff500f24fad905/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/b4fed54d2920ee4662f7e77049ff500f24fad905/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/b4fed54d2920ee4662f7e77049ff500f24fad905/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp

Project Member

Comment 30 by bugdroid1@chromium.org, Mar 9 2017

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

commit 2dd2875dc248df6276c5a4aa61731e064fb14f84
Author: yosin <yosin@chromium.org>
Date: Thu Mar 09 11:17:53 2017

Move textDirectionForSelection in EditingStyleUtilities class to EditorCommand.cpp

This patch moves |textDirectionForSelection()| to |EditingStyleUtilities| class
to "EditorCommand.cpp" since it is used only in "EditorCommand.cpp" for
improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2734043004
Cr-Commit-Position: refs/heads/master@{#455712}

[modify] https://crrev.com/2dd2875dc248df6276c5a4aa61731e064fb14f84/third_party/WebKit/Source/core/editing/EditingStyleUtilities.cpp
[modify] https://crrev.com/2dd2875dc248df6276c5a4aa61731e064fb14f84/third_party/WebKit/Source/core/editing/EditingStyleUtilities.h
[modify] https://crrev.com/2dd2875dc248df6276c5a4aa61731e064fb14f84/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 31 by bugdroid1@chromium.org, Mar 10 2017

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

commit 18f9f5a5e63781235137f0b90636b5fd174cb64f
Author: yosin <yosin@chromium.org>
Date: Fri Mar 10 01:22:31 2017

Make adjustedSelectionStartForStyleComputation() to take Position instead of VisibleSeleciton

This patch makes |adjustedSelectionStartForStyleComputation()| to take
|Position| instead of |VisibleSeleciton| as a preparation of usage of
|VisibleSeleciton| for improving code health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2739023003
Cr-Commit-Position: refs/heads/master@{#455945}

[modify] https://crrev.com/18f9f5a5e63781235137f0b90636b5fd174cb64f/third_party/WebKit/Source/core/editing/EditingStyleUtilities.cpp
[modify] https://crrev.com/18f9f5a5e63781235137f0b90636b5fd174cb64f/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/18f9f5a5e63781235137f0b90636b5fd174cb64f/third_party/WebKit/Source/core/editing/EditingUtilities.h

Project Member

Comment 32 by bugdroid1@chromium.org, Jul 3 2017

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

commit d7a8c49ba1d99cfb63d63cf99840b99317366cdd
Author: yosin <yosin@chromium.org>
Date: Mon Jul 03 09:43:07 2017

Use PositionInFlatTreeWithAffinty for SelectionController::original_base_in_flat_tree_

This patch changes type of |SelectionController::original_base_in_flat_tree_|
to |PositionInFlatTreeWithAffinty| instead of |VisbilePositionInFlatTree|
to avoid redundant usage of |VisbilePositionInFlatTree| for improving code
health.

BUG=657237
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2971563002
Cr-Commit-Position: refs/heads/master@{#483971}

[modify] https://crrev.com/d7a8c49ba1d99cfb63d63cf99840b99317366cdd/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/d7a8c49ba1d99cfb63d63cf99840b99317366cdd/third_party/WebKit/Source/core/editing/SelectionController.h

Comment 33 by yosin@chromium.org, Jul 25 2017

Blockedon: 747795
Project Member

Comment 34 by bugdroid1@chromium.org, Jul 25 2017

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

commit 4d13c388da25c88cd81d46eb2909e246a7b55d55
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Tue Jul 25 08:40:34 2017

Get rid of VisibleSelectionTemplate::IsNonOrphanedRange()

This patch gets rid of |VisibleSelectionTemplate::IsNonOrphanedRange()|to
simplify |VisibleSelectionTemplate| as a preparation for reducing usage of
|VisibleSelection|(InDOMTree) for improving code health.

Bug: 657237
Change-Id: Id42ecd664cc6f76e1b5f377dcee4df007d34b2b4
Reviewed-on: https://chromium-review.googlesource.com/584210
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489256}
[modify] https://crrev.com/4d13c388da25c88cd81d46eb2909e246a7b55d55/third_party/WebKit/Source/core/editing/VisibleSelection.h
[modify] https://crrev.com/4d13c388da25c88cd81d46eb2909e246a7b55d55/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/4d13c388da25c88cd81d46eb2909e246a7b55d55/third_party/WebKit/Source/core/editing/commands/UnlinkCommand.cpp

Comment 35 by yosin@chromium.org, Jul 26 2017

Blockedon: 747795
Project Member

Comment 36 by bugdroid1@chromium.org, Jul 26 2017

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

commit ba6a13c8cfcfb0f206aac97a3068b6e98d0a6593
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Wed Jul 26 05:37:28 2017

Get rid of VisibleSelectionTemplate::HasEditableStyle()

This patch gets rid of |VisibleSelectionTemplate::HasEditableStyle()|to
simplify |VisibleSelectionTemplate| as a preparation for reducing usage of
|VisibleSelection| for improving code health.

Bug: 657237
Change-Id: Ieaac3f797d579fbe4bd10d756afdf97fcabdbbde
Reviewed-on: https://chromium-review.googlesource.com/584664
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489560}
[modify] https://crrev.com/ba6a13c8cfcfb0f206aac97a3068b6e98d0a6593/third_party/WebKit/Source/core/editing/FrameCaret.cpp
[modify] https://crrev.com/ba6a13c8cfcfb0f206aac97a3068b6e98d0a6593/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/ba6a13c8cfcfb0f206aac97a3068b6e98d0a6593/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/ba6a13c8cfcfb0f206aac97a3068b6e98d0a6593/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/ba6a13c8cfcfb0f206aac97a3068b6e98d0a6593/third_party/WebKit/Source/core/editing/VisibleSelection.h

Project Member

Comment 37 by bugdroid1@chromium.org, Jul 28 2017

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

commit 96b8cfa0076f4e1f6bc5238ca79e711882c4ed22
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Fri Jul 28 03:29:45 2017

Utilize RootEditableElementOf() in UndoStep.cpp

This patch changes |VisibleSelection::RootEditableElement()| with
|RootEditableElementOf()| as a preparation of getting rid of
|VisibleSelection::RootEditableElement()| for simplify |VisibleSelection|.

This patch is also a preparation of the patch[1].

Note: |RootElementElementOf(visible_selection.Start())| and 
|RootElementElementOf(visible_selection.Base())| are identical since
base and extent of visible selection are in same editable root
element as result of adjustment in |VisibleSelection::Validate()|.


[1] http://crrev.com/c/588874: Introduce SelectionForUndoStep

Bug: 657237,  747795 
Change-Id: Ifaa4d62c1e4e60687c760184f198313f89f86ccb
Reviewed-on: https://chromium-review.googlesource.com/588210
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490239}
[modify] https://crrev.com/96b8cfa0076f4e1f6bc5238ca79e711882c4ed22/third_party/WebKit/Source/core/editing/commands/UndoStep.cpp

Project Member

Comment 38 by bugdroid1@chromium.org, Jul 28 2017

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

commit 1847da3f5447cf281fbbaaa9ab72b8e922b9809c
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Fri Jul 28 05:27:21 2017

Refactor Editor::ApplyStyle() with early-return style

This patch changes |Editor::ApplyStyle()| to use early-return style to reduce
indentation for improving code readability.

This patch is also a preparation of getting rid of |GetSelectionType()| in
|VisibleSelectionTemplate|.

Bug: 657237
Change-Id: I108dbe0b328f9e5815832b3680a1b10d99bfc2f7
Reviewed-on: https://chromium-review.googlesource.com/590335
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490283}
[modify] https://crrev.com/1847da3f5447cf281fbbaaa9ab72b8e922b9809c/third_party/WebKit/Source/core/editing/Editor.cpp

Project Member

Comment 39 by bugdroid1@chromium.org, Jul 28 2017

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

commit 7b49e1e2f60f5981a7187397221f8b972ab43fbe
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Fri Jul 28 08:44:52 2017

Utilize CanEditRichly() in Editor::Paste()

This patch changes |Editor::Paste()| to use |CanEditRichly()| instead of
calling |VisibleSelection::IsContentRichlyEditable()| on |FrameSelection|
since |CanEditRichly()| does identical computation, for improving code health.

bool Editor::CanEditRichly() const {
  return GetFrame()
      .Selection()
      .ComputeVisibleSelectionInDOMTreeDeprecated()
      .IsContentRichlyEditable();
}

Bug: 657237
Change-Id: Ie94fc883c8e6b90b766353aebec31cc1037b03e6
Reviewed-on: https://chromium-review.googlesource.com/590346
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490324}
[modify] https://crrev.com/7b49e1e2f60f5981a7187397221f8b972ab43fbe/third_party/WebKit/Source/core/editing/Editor.cpp

Project Member

Comment 40 by bugdroid1@chromium.org, Jul 28 2017

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

commit 8b5c96123b992e826759c0aedded7606028c60de
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Fri Jul 28 09:55:45 2017

Use VisibleSelection::IsNone() instead of GetSelectionType() in FrameSelection::RevealSelection()

This patch changes |FrameSelection::RevealSelection()| to use |IsNone()| instead
of |GetSelectionType()| of |VisibleSelection| to simplify source code for
improving readability and a preparation of getting rid of |GetSelectionType()|.

Bug: 657237
Change-Id: I2d6ad6441731ce6d3da55eaf07e4932b5f8e37b5
Reviewed-on: https://chromium-review.googlesource.com/590343
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490342}
[modify] https://crrev.com/8b5c96123b992e826759c0aedded7606028c60de/third_party/WebKit/Source/core/editing/FrameSelection.cpp

Project Member

Comment 41 by bugdroid1@chromium.org, Jul 28 2017

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

commit 72a81edbb9f11466ecbefa6efcd4a4dac82dedbe
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Fri Jul 28 10:07:47 2017

Use VisibleSelection::IsRange() instead of GetSelectionType() in LocalFrameView::ComputeCompositedSelection()

This patch changes |LocalFrameView::ComputeCompositedSelection()| to use
|IsRange()| instead of |GetSelectionType()| of |VisibleSelection| as a
preparation of getting rid of |GetSelectionType()|.

Bug: 657237
Change-Id: I28d3ac203222c32625cb2a8e6254288236d469dc
Reviewed-on: https://chromium-review.googlesource.com/590344
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490345}
[modify] https://crrev.com/72a81edbb9f11466ecbefa6efcd4a4dac82dedbe/third_party/WebKit/Source/core/frame/LocalFrameView.cpp

Project Member

Comment 42 by bugdroid1@chromium.org, Jul 28 2017

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

commit 7121fdaa21dd8bd1775f5619a7167457f6f370a6
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Fri Jul 28 11:06:54 2017

Refactor FrameSelection::ComputeRectToScroll() with early-return style

This patch changes |FrameSelection::ComputeRectToScroll()| to use early-return
style to reduce indentation for improving code readability.

This patch is also a preparation of getting rid of |GetSelectionType()| in
|VisibleSelectionTemplate|.

Bug: 657237
Change-Id: I33a27d1fd67f67e8c9d853a2fce48325d1d7a6fb
Reviewed-on: https://chromium-review.googlesource.com/590870
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490358}
[modify] https://crrev.com/7121fdaa21dd8bd1775f5619a7167457f6f370a6/third_party/WebKit/Source/core/editing/FrameSelection.cpp

Project Member

Comment 43 by bugdroid1@chromium.org, Aug 1 2017

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

commit 64655b58fc3c4b43db5b408be91a985e31502497
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Tue Aug 01 07:40:02 2017

Make VisibleSelection base_ and extent_ to hold same position when selection is caret

This patch makes |base_| and |extent_| to hold same position when
|ComputeSelctionType()| returns |kCaretSelection| since there are no good
reasons to have different positions for caret selection for a preparation of
getting rid of |selection_type_| and improving code health.

Changes in |VisibleSelectionTest| are cases of caret selection have different
base and extent for broken visible position canonicalization on tree boundary
crossing, e.g. positions of distributed nodes are swapped. These test results
are snapshot of current behavior instead of meaningful results.

* ShadowCrossing: distributed node "one" to end of shadow root.
* ShadowNested: like ShadowCrossing but on nested shadow tree.

Note: Following patch will remove |selection_type_| and make |Validate()| as
static function taking |SelectionTempalte| and returning |EphemeralRange| and
selection direction for |base_is_first_|.


Bug: 657237
Change-Id: I57f85953e049f089e92c821ee7e24f418506f2f9
Reviewed-on: https://chromium-review.googlesource.com/590600
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490902}
[modify] https://crrev.com/64655b58fc3c4b43db5b408be91a985e31502497/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/64655b58fc3c4b43db5b408be91a985e31502497/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp

Project Member

Comment 44 by bugdroid1@chromium.org, Aug 1 2017

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

commit ea3b0403e3991f47dc826a2be162e0830119e4ee
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Tue Aug 01 09:34:42 2017

Replace GetSelectionType() == kCaretSelection to IsCaret()

This patch change |VisibleSelection::GetSelection() == kCaretSelection| in
"UnsafeSVGAttributeSanitizationTest.cpp" to |VisibleSelection::IsCaret()| for
a preparation of getting rid of |selection_type_| from
|VisibleSelectionTemplate|[1].

[1] http://crrev.com/c/579896: Get rid of
VisibleSelectionTemplate::selection_type_

Bug: 657237
Change-Id: I4bfbbf913626588e89aa03a0db63152bd34e76a9
Reviewed-on: https://chromium-review.googlesource.com/595311
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490926}
[modify] https://crrev.com/ea3b0403e3991f47dc826a2be162e0830119e4ee/third_party/WebKit/Source/core/svg/UnsafeSVGAttributeSanitizationTest.cpp

Project Member

Comment 45 by bugdroid1@chromium.org, Aug 2 2017

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

commit 45450b69e58c4232214e5dfd70c086ef721a0375
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Wed Aug 02 02:18:19 2017

Make ExpandSelectionToRespectUserSelectAll() to take SelectionInFlatTree

This patch changes |ExpandSelectionToRespectUserSelectAll()| to take
|SelectionInFlatTree| to reduce usage of |VisibleSelectionInFlatTree|.

Bug: 657237
Change-Id: Id4d884fda22208c5881d3124b476befffa43c43f
Reviewed-on: https://chromium-review.googlesource.com/595309
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491224}
[modify] https://crrev.com/45450b69e58c4232214e5dfd70c086ef721a0375/third_party/WebKit/Source/core/editing/SelectionController.cpp

Project Member

Comment 46 by bugdroid1@chromium.org, Aug 2 2017

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

commit ccd93bb9aa4a91272bddcd6f1756d438a5e8fc39
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Wed Aug 02 04:10:35 2017

Get rid of redundant member variable VisibleSelectionTemplate::selection_type_

This patch gets rid of redundant member variable |selection_type_| from
|VisibleSelectionTemplate| to simplify |VisibleSelectionTemplate| for improving
code health.

Bug: 657237
Change-Id: I9a45a73d719bc9aa6300fd59b982ec820dd1c0ea
Reviewed-on: https://chromium-review.googlesource.com/579896
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491265}
[modify] https://crrev.com/ccd93bb9aa4a91272bddcd6f1756d438a5e8fc39/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/ccd93bb9aa4a91272bddcd6f1756d438a5e8fc39/third_party/WebKit/Source/core/editing/VisibleSelection.h
[modify] https://crrev.com/ccd93bb9aa4a91272bddcd6f1756d438a5e8fc39/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp

Project Member

Comment 47 by bugdroid1@chromium.org, Aug 2 2017

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

commit ea2013aa3ab5183b04aae84c5f56f00ced086c24
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Wed Aug 02 10:13:02 2017

Make SelectionController::SelectClosestWordOrLinkFromMouseEvent() not to use VisibleSelection

This patch changes |SelectionControlle::SelectClosestWordOrLinkFromMouseEvent()|
to use |SelectionInFlatTree| instead of |VisibleSelection| since it is
redundant, for improving code health.

This is follow-up of the patch[1].

[1] http://crrev.com/c/595309: Make ExpandSelectionToRespectUserSelectAll() to
take SelectionInFlatTree

Bug: 657237
Change-Id: I4fb3c71c27f3b32322311724a99a44f61376b5ec
Reviewed-on: https://chromium-review.googlesource.com/597091
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491330}
[modify] https://crrev.com/ea2013aa3ab5183b04aae84c5f56f00ced086c24/third_party/WebKit/Source/core/editing/SelectionController.cpp

Project Member

Comment 48 by bugdroid1@chromium.org, Aug 3 2017

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

commit 617eb46b77426ea85bb56876eb94a054a268d16a
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Thu Aug 03 02:27:21 2017

Introduce AdjustSelectionWithTrailingWhitespace()

This patch introduces |AdjustSelectionWithTrailingWhitespace()| as replacement
of |VisibleSelectionInFlatTree::AppendTrailingWhitespace()| to simplify
|VisibleSelectionTemplate| for improving code health.

Bug: 657237
Change-Id: Iaf5e0157c42ac5a16647da9616fc3bc67c9420f9
Reviewed-on: https://chromium-review.googlesource.com/597557
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491619}
[modify] https://crrev.com/617eb46b77426ea85bb56876eb94a054a268d16a/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/617eb46b77426ea85bb56876eb94a054a268d16a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/617eb46b77426ea85bb56876eb94a054a268d16a/third_party/WebKit/Source/core/editing/VisibleSelection.h
[modify] https://crrev.com/617eb46b77426ea85bb56876eb94a054a268d16a/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp

Project Member

Comment 49 by bugdroid1@chromium.org, Aug 5 2017

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

commit 6a229c3ec428193ee646c9ae2296c17624b52be0
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Sat Aug 05 12:06:14 2017

Make ExtendSelectionAsDirectional() to take SelectionInFlatTree

This patch changes |ExtendSelectionAsDirectional()| in "SelectionController.cpp"
to take |SelectionInFlatTree| instead of |VisibleSelectionInFlatTree| to reduce
usage of |VisibleSelectionInFlatTree| for improving code health.

Bug: 657237
Change-Id: Ia02c49256c883dace170a138e9d9aa63e888ad73
Reviewed-on: https://chromium-review.googlesource.com/601572
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492237}
[modify] https://crrev.com/6a229c3ec428193ee646c9ae2296c17624b52be0/third_party/WebKit/Source/core/editing/SelectionController.cpp

Project Member

Comment 50 by bugdroid1@chromium.org, Aug 8 2017

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

commit 24b6ab3018d30fa2751a091bdf35440c35cbf78a
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Tue Aug 08 00:59:27 2017

Make ExtendSelectionAsNonDirectional() to take SelecitonInFlatTree

This patch changes |ExtendSelectionAsNonDirectional()| to take
|SelecitonInFlatTree| instead of |VisibleSelectionInFlatTree| to reduce usage of
|VisibleSelectionInFlatTree| for improving code health.

Bug: 657237
Change-Id: If4b09e2a7ffc322ffc5e15bba039f87e9594eded
Reviewed-on: https://chromium-review.googlesource.com/603227
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492481}
[modify] https://crrev.com/24b6ab3018d30fa2751a091bdf35440c35cbf78a/third_party/WebKit/Source/core/editing/SelectionController.cpp

Project Member

Comment 51 by bugdroid1@chromium.org, Aug 9 2017

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

commit 062ec82ee7535635e42ebf1d7d81dea85b496ef2
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Wed Aug 09 01:25:21 2017

Make Editor::SelectionForCommand() to return SelectionInDOMTree instead of VisibleSelection

This patch changes |Editor::SelectionForCommand()| to return
|SelectionInDOMTree| instead of |VisibleSelection| to reduce usage of
|VisibleSelection| for improving code health.

Bug: 657237
Change-Id: I14469617aabd15af2a27530201797c0d83618761
Reviewed-on: https://chromium-review.googlesource.com/602843
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492800}
[modify] https://crrev.com/062ec82ee7535635e42ebf1d7d81dea85b496ef2/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/062ec82ee7535635e42ebf1d7d81dea85b496ef2/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/062ec82ee7535635e42ebf1d7d81dea85b496ef2/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Project Member

Comment 52 by bugdroid1@chromium.org, Aug 17 2017

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

commit 8aa74e38ab9cbd0f3c5515852182d069ff6af2d4
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Thu Aug 17 01:41:14 2017

Make SelectionController::HandleMouseReleaseEvent() to call SelectionInFlatTree::Builder::Build() once

This patch makes |SelectionController::HandleMouseReleaseEvent()| to call
|SelectionInFlatTree::Builder::Build()| once as a preparation for the patch[1]
which restricts to call |Build()| once.

[1] http://crrev.com/c/609704: Introduce SelectionTemplate::Builder::
BuildAs{Backward,Forward}Selection()

Bug: 657237
Change-Id: Ifddefe8946e78424ae86a129dd9457748b148dc6
Reviewed-on: https://chromium-review.googlesource.com/616374
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495039}
[modify] https://crrev.com/8aa74e38ab9cbd0f3c5515852182d069ff6af2d4/third_party/WebKit/Source/core/editing/SelectionController.cpp

Project Member

Comment 53 by bugdroid1@chromium.org, Aug 21 2017

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

commit 61bf6bb8381cc605f43c342697d8e3d98158f91c
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Mon Aug 21 11:51:37 2017

Introduce SelectionTemplate::Builder::SetAs{Backward,Forward}Selection()

This patch introduces |SetAs{Backward,Forward}Selection()| in
|SelectionTemplate::Builder| to build |SelectionTemplate| with pre-computed
|IsBaseFirst()| value as a preparation for the patch[1].

This patch also changes |Build()| to check called once since we don't expect
to call it multiple times.

[1] http://crrev.com/c/609705 Introduce ComputeVisibleSelection() for
VisibleSelectionTemplate

Bug: 657237
Change-Id: Ib8e2f03503717df7009f927124f7cf8d95d113d9
Reviewed-on: https://chromium-review.googlesource.com/609704
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495916}
[modify] https://crrev.com/61bf6bb8381cc605f43c342697d8e3d98158f91c/third_party/WebKit/Source/core/editing/SelectionTemplate.cpp
[modify] https://crrev.com/61bf6bb8381cc605f43c342697d8e3d98158f91c/third_party/WebKit/Source/core/editing/SelectionTemplate.h
[modify] https://crrev.com/61bf6bb8381cc605f43c342697d8e3d98158f91c/third_party/WebKit/Source/core/editing/SelectionTemplateTest.cpp

Project Member

Comment 54 by bugdroid1@chromium.org, Aug 22 2017

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

commit e956859140dce7e0a944eaacca58cb3751407621
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Tue Aug 22 08:05:52 2017

Introduce ComputeVisibleSelection() for VisibleSelectionTemplate

This patch introduces |ComputeVisibleSelection()| for |VisibleSelectionTemplate|
as replacement of |Validate()| to avoid updating member variables for improving
code health.

Bug: 657237
Change-Id: I03a74eb1aa84f8c01c1dbc123ac5578393c13643
Reviewed-on: https://chromium-review.googlesource.com/609705
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496246}
[modify] https://crrev.com/e956859140dce7e0a944eaacca58cb3751407621/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/e956859140dce7e0a944eaacca58cb3751407621/third_party/WebKit/Source/core/editing/VisibleSelection.h

Labels: Pri-3
Description: Show this description
Project Member

Comment 57 by bugdroid1@chromium.org, Oct 4 2017

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

commit d381d2e942ca020a9d80677e3ee9be019f364156
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Wed Oct 04 09:40:39 2017

Get rid of redundant usage of VisiblePosition from WebFrameTest

This patch gets rid of redundant usage of |VisiblePosition| from
|ComputeOffset()| in "WebFrameTest.cpp" since |VisiblePosition| and
|LayoutObject::PositionForPoint()| are identical in test cases, for
improving code health.

Bug: 657237
Change-Id: I31764e221f611030ab91a36d104286f9bc00c7d9
Reviewed-on: https://chromium-review.googlesource.com/700217
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506348}
[modify] https://crrev.com/d381d2e942ca020a9d80677e3ee9be019f364156/third_party/WebKit/Source/core/exported/WebFrameTest.cpp

Project Member

Comment 58 by bugdroid1@chromium.org, Oct 4 2017

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

commit 6c10550dd9b066ad6aaffb3e08d40a22f4efa1b5
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Wed Oct 04 09:40:59 2017

Get rid of redundant include of "VisiblePosition.h" from "WebSurroundingText.cpp"

This patch gets rid of redundant include of "VisiblePosition.h" from
"WebSurroundingText.cpp" for improving code health.

Bug: 657237
Change-Id: I5bb543f9f36e8df6b0d973ac55b756aff5243776
Reviewed-on: https://chromium-review.googlesource.com/699977
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506349}
[modify] https://crrev.com/6c10550dd9b066ad6aaffb3e08d40a22f4efa1b5/third_party/WebKit/Source/core/exported/WebSurroundingText.cpp

Project Member

Comment 59 by bugdroid1@chromium.org, Oct 4 2017

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

commit 8089b7af0c02c1b8777e2959335e5f4d1a2a81b0
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Wed Oct 04 09:56:33 2017

Get rid of redundant include of "VisiblePosition.h" from "WebHitTestResult.cpp"

This patch gets rid of redundant include of "VisiblePosition.h" from
"WebHitTestResult.cpp" for improving code health.

Bug: 657237
Change-Id: I80b9c1a5f534706fa3d86df4b6c91758d9a02b49
Reviewed-on: https://chromium-review.googlesource.com/700355
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506353}
[modify] https://crrev.com/8089b7af0c02c1b8777e2959335e5f4d1a2a81b0/third_party/WebKit/Source/core/exported/WebHitTestResult.cpp

Project Member

Comment 60 by bugdroid1@chromium.org, Oct 4 2017

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

commit 8d5278293ca158a7bcf8d3a919a0082e36378cfc
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Wed Oct 04 10:42:56 2017

Get rid of unused function WebLocalFrame::SelectWordAroundPosition()

This patch gets rid of unused function |SelectWordAroundPosition()| from
|WebLocalFrame| class for improving code health.

Bug: 657237
Change-Id: I0f49f98fc786ea85e286208dd4942ca6ab7b8882
Reviewed-on: https://chromium-review.googlesource.com/700354
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506359}
[modify] https://crrev.com/8d5278293ca158a7bcf8d3a919a0082e36378cfc/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
[modify] https://crrev.com/8d5278293ca158a7bcf8d3a919a0082e36378cfc/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h

Project Member

Comment 61 by bugdroid1@chromium.org, Oct 5 2017

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

commit 78d5a96db71e91d1b645b267f30b02af3f6f8726
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Thu Oct 05 21:02:10 2017

Introduce FrameSelection::SelectWordAroundCaret()

This patch introduces |FrameSelection::SelectWordAroundCaret()| to move code
to "FrameSelection.cpp" from "WebLocalFrameImpl.cpp" as preparation of
removing usage of |VisiblePositon| and |VisibleSelection| outside "editing/"
for improving code health.


Bug: 657237
Change-Id: I75c92513e4fc577bb6336553256fdd69a594277d
Reviewed-on: https://chromium-review.googlesource.com/702214
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506852}
[modify] https://crrev.com/78d5a96db71e91d1b645b267f30b02af3f6f8726/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/78d5a96db71e91d1b645b267f30b02af3f6f8726/third_party/WebKit/Source/core/editing/FrameSelection.h
[modify] https://crrev.com/78d5a96db71e91d1b645b267f30b02af3f6f8726/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp

Project Member

Comment 62 by bugdroid1@chromium.org, Oct 5 2017

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

commit f6189a00e84990ae47401b5e86324219ff0bf595
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Thu Oct 05 21:46:52 2017

Introduce TextAffinity::kUpstreamIfPossible

This patch introduces |TextAffinity::kUpstreamIfPossible| as replacement of
|VP_UPSTREAM_IF_POSSIBLE| to avoid including "VisiblePositoin.h" for improving
compilation speed.

This patch also gets rid of redundant include directive of "VisiblePositoin.h"
from "LayoutSVGInlineText.cpp".

Bug: 657237
Change-Id: I685c49a0adc4b2827929447ca8f3e6a5c518c113
Reviewed-on: https://chromium-review.googlesource.com/701958
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506869}
[modify] https://crrev.com/f6189a00e84990ae47401b5e86324219ff0bf595/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/f6189a00e84990ae47401b5e86324219ff0bf595/third_party/WebKit/Source/core/editing/TextAffinity.h
[modify] https://crrev.com/f6189a00e84990ae47401b5e86324219ff0bf595/third_party/WebKit/Source/core/editing/VisiblePosition.h
[modify] https://crrev.com/f6189a00e84990ae47401b5e86324219ff0bf595/third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp
[modify] https://crrev.com/f6189a00e84990ae47401b5e86324219ff0bf595/third_party/WebKit/Source/core/editing/VisibleUnitsSentence.cpp
[modify] https://crrev.com/f6189a00e84990ae47401b5e86324219ff0bf595/third_party/WebKit/Source/core/editing/VisibleUnitsWord.cpp
[modify] https://crrev.com/f6189a00e84990ae47401b5e86324219ff0bf595/third_party/WebKit/Source/core/layout/LayoutText.cpp
[modify] https://crrev.com/f6189a00e84990ae47401b5e86324219ff0bf595/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp

Project Member

Comment 63 by bugdroid1@chromium.org, Oct 6 2017

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

commit cb8bb767def9ad1b489e9d13dabda6d63804d250
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Fri Oct 06 01:44:14 2017

Get rid of unused parameter TextAffinity from TrailingWhitespacePosition()

This patch gets rid of unused parameter |TextAffinity| from
|TrailingWhitespacePosition()| for improving code health.

This patch is a preparation of renaming |VP_DEFAULT_AFFINITY| to
|TextAffinity::kDefault|.

Bug: 657237
Change-Id: I0c354cbbbe09afc757d23c23db0c8df244c6b09a
Reviewed-on: https://chromium-review.googlesource.com/701904
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506943}
[modify] https://crrev.com/cb8bb767def9ad1b489e9d13dabda6d63804d250/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/cb8bb767def9ad1b489e9d13dabda6d63804d250/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/cb8bb767def9ad1b489e9d13dabda6d63804d250/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp

Project Member

Comment 64 by bugdroid1@chromium.org, Oct 6 2017

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

commit bc88a5030a9fcea3c327a949abbc7c11c3769685
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Fri Oct 06 01:47:50 2017

Get rid of redundant argument VP_DEFAULT_AFFINITY for CreateVisiblePosition()

This patch gets rid of redundant argument |VP_DEFAULT_AFFINITY| for
|CreateVisiblePosition()| for improving code health.

This patch is a preparation of renaming |VP_DEFAULT_AFFINITY| to
|TextAffinity::kDefault|.

Bug: 657237
Change-Id: I16e8af4d874afc5059c09f2401cb1f1dc9c98f67
Reviewed-on: https://chromium-review.googlesource.com/701902
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506945}
[modify] https://crrev.com/bc88a5030a9fcea3c327a949abbc7c11c3769685/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/bc88a5030a9fcea3c327a949abbc7c11c3769685/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/bc88a5030a9fcea3c327a949abbc7c11c3769685/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp

Project Member

Comment 65 by bugdroid1@chromium.org, Oct 6 2017

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

commit 803eee4b8808356d481aa30431e2234aced8b16e
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Fri Oct 06 11:07:19 2017

Introduce TextAffinity::kDefault as replacement of VP_DEFAULT_AFFINITY

This patch Introduces |TextAffinity::kDefault| as replacement of
|VP_DEFAULT_AFFINITY| to avoid including "VisiblePosition.h" which is larger
than "TextAffinity.h" to improve compilation speed and avoid to use redundant
CPP macro for improving code health.

Bug: 657237
Change-Id: I623e6990e3b196498e717a29bd4dd78681623bb7
Reviewed-on: https://chromium-review.googlesource.com/704494
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507029}
[modify] https://crrev.com/803eee4b8808356d481aa30431e2234aced8b16e/third_party/WebKit/Source/core/editing/TextAffinity.h
[modify] https://crrev.com/803eee4b8808356d481aa30431e2234aced8b16e/third_party/WebKit/Source/core/editing/VisiblePosition.h
[modify] https://crrev.com/803eee4b8808356d481aa30431e2234aced8b16e/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/803eee4b8808356d481aa30431e2234aced8b16e/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
[modify] https://crrev.com/803eee4b8808356d481aa30431e2234aced8b16e/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
[modify] https://crrev.com/803eee4b8808356d481aa30431e2234aced8b16e/third_party/WebKit/Source/core/layout/LayoutText.cpp

Project Member

Comment 66 by bugdroid1@chromium.org, Oct 26 2017

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

commit 96c3388a944da2d05b2fc5164507008068442c69
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Thu Oct 26 10:58:53 2017

Add PositionWithAffinity version of HonorEditingBoundaryAtOrAfter

This patch is a preparation for crrev.com/c/739001: Reduce creation of
VisiblePosition in [Logical]EndOfLine. It also helps creating NG version
of line-boundary finding functions, as we get less noise with fewer
VisiblePositions created.

Bug: 657237
Change-Id: Ida49ebc9030eb40a972dd6be5d5132e925e85b6e
Reviewed-on: https://chromium-review.googlesource.com/737940
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511786}
[modify] https://crrev.com/96c3388a944da2d05b2fc5164507008068442c69/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
[modify] https://crrev.com/96c3388a944da2d05b2fc5164507008068442c69/third_party/WebKit/Source/core/editing/VisibleUnits.h

Project Member

Comment 67 by bugdroid1@chromium.org, Oct 27 2017

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

commit 0ab8ec23c925c38f56593bd76abe80d501b1424d
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Fri Oct 27 05:58:36 2017

Reduce creation of VisiblePosition in [Logical]EndOfLine

This patch reduces the number of times we create VisiblePosition in
[LogicalEndOfLine] to one in the ideal case. (see patch comments for
non-ideal case)

It also paves the way to NG versions of [Logical]Start/EndOfLine, since
we have less noise due to VP creation.

Bug: 657237
Change-Id: I041248d8984ffec1ba67bdcf889491abb67acfbf
Reviewed-on: https://chromium-review.googlesource.com/739001
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512101}
[modify] https://crrev.com/0ab8ec23c925c38f56593bd76abe80d501b1424d/third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp

Project Member

Comment 68 by bugdroid1@chromium.org, Nov 2 2017

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

commit 0dfc692a6bb29867afc15c4f325d6d61a0b81104
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Thu Nov 02 01:39:53 2017

Get rid of redundant call of  VisibleSelection::VisibleEnd() in DirectionGranularityStrategy::UpdateExtent()

This patch gets rid of redundant call of |VisibleSelection::VisibleEnd()| in
|DirectionGranularityStrategy::UpdateExtent()| for improving code health.

Bug: 657237
Change-Id: I72058e2cfe69f3a8906090c1a2010622cc812f8b
Reviewed-on: https://chromium-review.googlesource.com/748982
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513364}
[modify] https://crrev.com/0dfc692a6bb29867afc15c4f325d6d61a0b81104/third_party/WebKit/Source/core/editing/GranularityStrategy.cpp

Project Member

Comment 69 by bugdroid1@chromium.org, Nov 7 2017

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

commit 961c501e46ea5ec6c9120190acfb7f304160583b
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Tue Nov 07 10:51:09 2017

Make SelectionModifier to hold SelectionInDOMTree as result

This patch changes |SelectionModifier| to hold |SelectionInDOMTree| as a result
instead of |VisibleSelection| to reduce usage of |VisibleSelection| for
improving code health.

Following patch will change |SelectionModifier::Selection().AsSelection()|
to use |SelectionInDOMTree| and call |CreateVisibleSelection()| in each
call site.

Bug: 657237
Change-Id: I1900e99f1035ce00d169e5eb17d90558b840abfd
Reviewed-on: https://chromium-review.googlesource.com/748744
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514441}
[modify] https://crrev.com/961c501e46ea5ec6c9120190acfb7f304160583b/third_party/WebKit/Source/core/editing/SelectionModifier.cpp
[modify] https://crrev.com/961c501e46ea5ec6c9120190acfb7f304160583b/third_party/WebKit/Source/core/editing/SelectionModifier.h

Project Member

Comment 70 by bugdroid1@chromium.org, Nov 10 2017

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

commit 75eeaf3bcdb8a5f679133c30036a221d9275bdc0
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Fri Nov 10 05:37:03 2017

Make SelectionModifier constructors to take SelectionInDOMTree

This patch makes |SelectionModifier| constructors to take |SelectionInDOMTree|
instead of |VisibleSelection| since constructors don't need to take
|VisibleSelection|, to reduce usage usage of |VisibleSelection| for improving
code health.

Bug: 657237
Change-Id: Ibe8989566d23530b13bd50d9365da2339051f571
Reviewed-on: https://chromium-review.googlesource.com/760062
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515455}
[modify] https://crrev.com/75eeaf3bcdb8a5f679133c30036a221d9275bdc0/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/75eeaf3bcdb8a5f679133c30036a221d9275bdc0/third_party/WebKit/Source/core/editing/SelectionModifier.cpp
[modify] https://crrev.com/75eeaf3bcdb8a5f679133c30036a221d9275bdc0/third_party/WebKit/Source/core/editing/SelectionModifier.h
[modify] https://crrev.com/75eeaf3bcdb8a5f679133c30036a221d9275bdc0/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
[modify] https://crrev.com/75eeaf3bcdb8a5f679133c30036a221d9275bdc0/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp

Labels: Type-Task
Project Member

Comment 72 by bugdroid1@chromium.org, Dec 22 2017

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

commit aeede1d2048652ed84b81e42040dc13176f8113b
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Fri Dec 22 18:55:49 2017

Remove usage of VisibleSelection from SurroundingTextTest

The tests has nothing to do with canonicalization, so this patch removes
the usage of VisibleSelection to keep the test cases simple.

Bug: 657237
Change-Id: Ib0d36734cface043d89118374e339c45938f945f
Reviewed-on: https://chromium-review.googlesource.com/843046
Reviewed-by: Ryan Landay <rlanday@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526032}
[modify] https://crrev.com/aeede1d2048652ed84b81e42040dc13176f8113b/third_party/WebKit/Source/core/editing/SurroundingTextTest.cpp

Project Member

Comment 73 by bugdroid1@chromium.org, Jan 22 2018

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

commit 322b35f3ecbc1772802d55980a9861f864f77c5c
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Mon Jan 22 07:21:51 2018

Change FrameSelection::MoveRangeSelection() to take IntPoint instead of VisiblePosition

This patch changes |FrameSelection::MoveRangeSelection()| to take |IntPoint|
instead of |VisiblePosition| to reduce usage of |VisiblePosition| out side of
editing for improving code helath.

Bug: 657237
Change-Id: If0811fa2dc4adecad82727aa42e3c1e2b2769269
Reviewed-on: https://chromium-review.googlesource.com/876707
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530821}
[modify] https://crrev.com/322b35f3ecbc1772802d55980a9861f864f77c5c/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/322b35f3ecbc1772802d55980a9861f864f77c5c/third_party/WebKit/Source/core/editing/FrameSelection.h
[modify] https://crrev.com/322b35f3ecbc1772802d55980a9861f864f77c5c/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
[modify] https://crrev.com/322b35f3ecbc1772802d55980a9861f864f77c5c/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp

Project Member

Comment 74 by bugdroid1@chromium.org, Jan 23 2018

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

commit ed723a829e80eb108a4c521aeaf5508ed56c43ae
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Tue Jan 23 03:36:18 2018

Introduce FrameSelection::SelectSubString() for SVGTextContentElement::selectSubString()

This patch introduces |FrameSelection::SelectSubString()| for
|SVGTextContentElement::selectSubString()| to reduce usage of |VisiblePosition|
outside editing for improving code health.

Bug: 657237
Change-Id: Ia50d4d88da5abcb5d9bafb25198f2c15399ea9f8
Reviewed-on: https://chromium-review.googlesource.com/876710
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531144}
[modify] https://crrev.com/ed723a829e80eb108a4c521aeaf5508ed56c43ae/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/ed723a829e80eb108a4c521aeaf5508ed56c43ae/third_party/WebKit/Source/core/editing/FrameSelection.h
[modify] https://crrev.com/ed723a829e80eb108a4c521aeaf5508ed56c43ae/third_party/WebKit/Source/core/svg/SVGTextContentElement.cpp

Project Member

Comment 75 by bugdroid1@chromium.org, Jan 23 2018

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

commit 65a0b03449a86045b24a55cffb07665ebe6d3dc4
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Tue Jan 23 03:36:52 2018

Introduce FrameSelection::CharacterIndexForPoint() for WebLocalFrameImpl

This patch introduces |FrameSelection::CharacterIndexForPoint()| for
|WebLocalFrameImpl| as a preparation of moving |LocalFrame::RangeForPoint()|
into "FrameSelection.cpp" to reduce usage of |VisiblePosition| out side
editing for improving code health.

Bug: 657237
Change-Id: Idea5ef3ea3806fcf4b7538093fd4540666b0efbe
Reviewed-on: https://chromium-review.googlesource.com/877207
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531145}
[modify] https://crrev.com/65a0b03449a86045b24a55cffb07665ebe6d3dc4/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/65a0b03449a86045b24a55cffb07665ebe6d3dc4/third_party/WebKit/Source/core/editing/FrameSelection.h
[modify] https://crrev.com/65a0b03449a86045b24a55cffb07665ebe6d3dc4/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp

Project Member

Comment 76 by bugdroid1@chromium.org, Jan 23 2018

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

commit 43b02f309ef49538984dbb2febeaa00206765e82
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Tue Jan 23 03:39:17 2018

Introduce CreateMarkupInRect() for WebLocalFrameImpl::ExtractSmartClipData()

This patch introduces |CreateMarkupInRect()| as a preparation of reducing
|VisiblePosition| usage from |WebLocalFrameImpl|.

Bug: 657237
Change-Id: I7bf362fbc283c0c14d33c2b8cfe823ad30e4ef1f
Reviewed-on: https://chromium-review.googlesource.com/877681
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531146}
[modify] https://crrev.com/43b02f309ef49538984dbb2febeaa00206765e82/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp

Project Member

Comment 77 by bugdroid1@chromium.org, Jan 23 2018

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

commit 5737b71b70df89da4b83759e4c77bf959cd2bdbe
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Tue Jan 23 23:58:54 2018

Move LocalFrame::RangeForPoint() to Editor class

This patch moves |LocalFrame::RangeForPoint()| to |Editor| class as member
function with removing unused #include directives in "LocalFrame.cpp" due by
this patch to reduce usage of |VisiblePosition| outside editing for improving
code health.

Bug: 657237
Change-Id: Ie7e94efbcb65cf3f272301555d5fe61888a81533
Reviewed-on: https://chromium-review.googlesource.com/880244
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531390}
[modify] https://crrev.com/5737b71b70df89da4b83759e4c77bf959cd2bdbe/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/5737b71b70df89da4b83759e4c77bf959cd2bdbe/third_party/WebKit/Source/core/editing/Editor.h
[modify] https://crrev.com/5737b71b70df89da4b83759e4c77bf959cd2bdbe/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/5737b71b70df89da4b83759e4c77bf959cd2bdbe/third_party/WebKit/Source/core/editing/WebSubstringUtil.mm
[modify] https://crrev.com/5737b71b70df89da4b83759e4c77bf959cd2bdbe/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/5737b71b70df89da4b83759e4c77bf959cd2bdbe/third_party/WebKit/Source/core/frame/LocalFrame.h

Project Member

Comment 78 by bugdroid1@chromium.org, Jul 30

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

commit d9cbbaa8ebb31c6ea39f966f13e8bc384e6a6fde
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Mon Jul 30 10:11:14 2018

Make SetSelectionToDragCaret() to take SelectionInDOMTree

This patch changes |SetSelectionToDragCaret()| to take |SelectionInDOMTree|
instead of |VisibleSelection&| since it uses |SelectionInDOMTree| and output
parameter isn't used in caller for improving code health.

This is 1/3 of series of patches:
 1. This patch
 2. http://crrev.com/c/1153070
 3. http://crrev.com/c/1153071

Bug: 657237
Change-Id: If01c9f465cbf5e5a940d1e9c30af8080a5496527
Reviewed-on: https://chromium-review.googlesource.com/1153069
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579002}
[modify] https://crrev.com/d9cbbaa8ebb31c6ea39f966f13e8bc384e6a6fde/third_party/blink/renderer/core/page/drag_controller.cc

Project Member

Comment 79 by bugdroid1@chromium.org, Oct 22

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

commit a258b1fa145e584e94d15daf4faf58debcd7c8bc
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Mon Oct 22 16:45:41 2018

Stop passing VisiblePosition to AbsoluteCaretBoundsOf()

This patch changes AbsoluteCaretBoundsOf() to take PositionWithAffinity
instead of VisiblePosition to decrease the usage of VisiblePosition.

It is also a preparation for bidi caret affinity.

Bug: 657237, 894651
Change-Id: Ic55c037c058c1fe666ba89cbee502f7d0a74754b
Reviewed-on: https://chromium-review.googlesource.com/c/1292726
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601613}
[modify] https://crrev.com/a258b1fa145e584e94d15daf4faf58debcd7c8bc/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc
[modify] https://crrev.com/a258b1fa145e584e94d15daf4faf58debcd7c8bc/third_party/blink/renderer/core/editing/frame_selection.cc
[modify] https://crrev.com/a258b1fa145e584e94d15daf4faf58debcd7c8bc/third_party/blink/renderer/core/editing/local_caret_rect.cc
[modify] https://crrev.com/a258b1fa145e584e94d15daf4faf58debcd7c8bc/third_party/blink/renderer/core/editing/local_caret_rect.h
[modify] https://crrev.com/a258b1fa145e584e94d15daf4faf58debcd7c8bc/third_party/blink/renderer/core/editing/local_caret_rect_test.cc
[modify] https://crrev.com/a258b1fa145e584e94d15daf4faf58debcd7c8bc/third_party/blink/renderer/core/editing/selection_modifier.cc

Blockedon: 897983
Project Member

Comment 81 by bugdroid1@chromium.org, Oct 24

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

commit 42d5ffab27f6b14ab8e52b86d4bc47611ceed9ab
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Wed Oct 24 15:04:22 2018

Remove VisiblePositionForViewportPoint()

WebLocalFrameImpl::VisiblePositionForViewportPoint() is unused, remove it.
Reduce usage of VisiblePosition also.

Bug: 657237
Change-Id: I9a6588c856a68ad88975771cab206e7e19a29fd7
Reviewed-on: https://chromium-review.googlesource.com/c/1297850
Commit-Queue: David Bokan <bokan@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602340}
[modify] https://crrev.com/42d5ffab27f6b14ab8e52b86d4bc47611ceed9ab/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
[modify] https://crrev.com/42d5ffab27f6b14ab8e52b86d4bc47611ceed9ab/third_party/blink/renderer/core/frame/web_local_frame_impl.h

Project Member

Comment 82 by bugdroid1@chromium.org, Oct 26

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

commit 577cf26c55bba5d38b7371ec0f6e57b27ddb40c9
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Fri Oct 26 17:49:03 2018

Stop creating VisiblePosition in ColdModeSpellCheckRequester

The class creates VisiblePosition to be passed to EndOfSentence(), but
EndOfSentence() doesn't require input position to be canonical.
ColdModeSpellCheckRequester doesn't require the EndOfSentence() output
to be canonical, either.

Hence, this patch changes ColdModeSpellCheckRequester to use the non-
canonical variant of EndOfSentence().

Bug: 657237
Change-Id: I96df36bb49c150f12ba037729221b8bcdaa9c09a
Reviewed-on: https://chromium-review.googlesource.com/c/1298482
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603139}
[modify] https://crrev.com/577cf26c55bba5d38b7371ec0f6e57b27ddb40c9/third_party/blink/renderer/core/editing/spellcheck/cold_mode_spell_check_requester.cc
[modify] https://crrev.com/577cf26c55bba5d38b7371ec0f6e57b27ddb40c9/third_party/blink/renderer/core/editing/visible_units.h

Project Member

Comment 83 by bugdroid1@chromium.org, Oct 26

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

commit e6156c7b24055cb9227be33fb144aadee0a5733f
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Fri Oct 26 19:29:07 2018

Don't create VisiblePosition and VisibleSelection in FrameSelection::SelectFrameElementInParentIfFullySelected()

This patch refactors the function's selection setting and validation
part, so that:

- It stops the problematic pattern of creating VisibleSelection before
  focusing parent frame, which may invalidate the VS

- It no longer creates VisiblePosition and VisibleSelection for creating
  the selection. This is because for a frame owner element, the range
  [before_node, after_node] is already a canonicalized range, on which
  creating VP or VS is unnecessary.

Bug: 657237,  897983 
Change-Id: I5b046047071a4af7454cc1bfef52a457fe49d9c2
Reviewed-on: https://chromium-review.googlesource.com/c/1298179
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603169}
[modify] https://crrev.com/e6156c7b24055cb9227be33fb144aadee0a5733f/third_party/blink/renderer/core/editing/frame_selection.cc

Description: Show this description
Blocking: 894651
We may still want to eliminate VP creation from hit test results, but probably with a more case-by-case approach.
Project Member

Comment 87 by bugdroid1@chromium.org, Oct 31

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

commit 4b43eb8bbb053a14501e526cc37289d6327b777d
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Wed Oct 31 01:42:00 2018

Stop creating VisiblePosition in VisiblePositionOfHitTestResult()

This patch clears a call site of CreateVisiblePosition() in
VisiblePositionOfHitTestResult(), since canonicalization on hit test result
is unnecessary. Rename VisiblePositionOfHitTestResult() to
PositionWithAffinityOfHitTestResult().

Bug: 657237
Change-Id: I2e88ac02e7b8c3afb307c4fe1033cc21d9f20161
Reviewed-on: https://chromium-review.googlesource.com/c/1297227
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Cr-Commit-Position: refs/heads/master@{#604105}
[modify] https://crrev.com/4b43eb8bbb053a14501e526cc37289d6327b777d/third_party/blink/renderer/core/editing/selection_controller.cc

Project Member

Comment 88 by bugdroid1@chromium.org, Oct 31

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

commit 686d2e68ef98ba1969b1d56693e6553eadbe7455
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Wed Oct 31 04:23:08 2018

Stop using VisiblePosition in SkipToStart/EndOfEditingBoundary

This patch stops passing VisiblePosition to the functions, and hoists
creation of VisiblePosition to the callers, to decrease the usage of
VisiblePosition.

This is a preparation for a VP-free version of Previous/NextPositionOf()

Bug: 657237
Change-Id: I46fe45f9c28458e1dbffddf26b106372ff433fd1
Reviewed-on: https://chromium-review.googlesource.com/c/1309142
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604146}
[modify] https://crrev.com/686d2e68ef98ba1969b1d56693e6553eadbe7455/third_party/blink/renderer/core/editing/visible_units.cc

Project Member

Comment 89 by bugdroid1@chromium.org, Nov 1

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

commit 8a94b70e3a730f6a824653d3a36a7a60b05192d3
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Thu Nov 01 03:02:08 2018

Stop creating VisiblePosition in VisiblePositionForContentsPoint()

This patch moves CreateVisiblePosition() out of
VisiblePositionForContentsPoint() to the callers.
Rename VisiblePositionForContentsPoint() to
PositionForContentsPointRespectingEditingBoundary().

Bug: 657237
Change-Id: I00c60a783c35d5e5a59b9163eb3e42b7e9fa2b38
Reviewed-on: https://chromium-review.googlesource.com/c/1307315
Commit-Queue: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604500}
[modify] https://crrev.com/8a94b70e3a730f6a824653d3a36a7a60b05192d3/third_party/blink/renderer/core/editing/frame_selection.cc
[modify] https://crrev.com/8a94b70e3a730f6a824653d3a36a7a60b05192d3/third_party/blink/renderer/core/editing/granularity_strategy.cc
[modify] https://crrev.com/8a94b70e3a730f6a824653d3a36a7a60b05192d3/third_party/blink/renderer/core/editing/granularity_strategy_test.cc
[modify] https://crrev.com/8a94b70e3a730f6a824653d3a36a7a60b05192d3/third_party/blink/renderer/core/editing/visible_units.cc
[modify] https://crrev.com/8a94b70e3a730f6a824653d3a36a7a60b05192d3/third_party/blink/renderer/core/editing/visible_units.h
[modify] https://crrev.com/8a94b70e3a730f6a824653d3a36a7a60b05192d3/third_party/blink/renderer/core/frame/web_local_frame_impl.cc

Project Member

Comment 90 by bugdroid1@chromium.org, Nov 2

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

commit d4727fc8a6b1360e39869aa3e657e025de86dc7d
Author: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Date: Fri Nov 02 03:10:06 2018

Stop using VisiblePosition in VisiblePosition{Before/After}Node

This patch stops passing VisiblePosition to the functions, and hoists
creation of VisiblePosition to the callers, to decrease the usage of
VisiblePosition.

Bug: 657237
Change-Id: I52a6a34e240aa0180d2459c262b2db919fab4674
Reviewed-on: https://chromium-review.googlesource.com/c/1309568
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Zhuoyu Qian <zhuoyu.qian@samsung.com>
Cr-Commit-Position: refs/heads/master@{#604830}
[modify] https://crrev.com/d4727fc8a6b1360e39869aa3e657e025de86dc7d/third_party/blink/renderer/core/editing/commands/composite_edit_command.cc
[modify] https://crrev.com/d4727fc8a6b1360e39869aa3e657e025de86dc7d/third_party/blink/renderer/core/editing/commands/insert_list_command.cc
[modify] https://crrev.com/d4727fc8a6b1360e39869aa3e657e025de86dc7d/third_party/blink/renderer/core/editing/editing_utilities.cc
[modify] https://crrev.com/d4727fc8a6b1360e39869aa3e657e025de86dc7d/third_party/blink/renderer/core/editing/editing_utilities.h
[modify] https://crrev.com/d4727fc8a6b1360e39869aa3e657e025de86dc7d/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc

Project Member

Comment 91 by bugdroid1@chromium.org, Nov 2

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

commit 28c5a3cf590bad18175f6fadfe2efb6499b69889
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Fri Nov 02 03:37:00 2018

Expose noncanonical versions of Previous/NextWordPosition

This patch exposes noncanonical versions of Previous/NextWordPosition to
reduce usage of VisiblePosition.

Bug: 657237
Change-Id: I0815b0c0bf4de34427432ca8f6aa769c356c6385
Reviewed-on: https://chromium-review.googlesource.com/c/1313876
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604832}
[modify] https://crrev.com/28c5a3cf590bad18175f6fadfe2efb6499b69889/third_party/blink/renderer/core/editing/visible_units.h
[modify] https://crrev.com/28c5a3cf590bad18175f6fadfe2efb6499b69889/third_party/blink/renderer/core/editing/visible_units_word_test.cc

Project Member

Comment 92 by bugdroid1@chromium.org, Nov 2

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

commit 7d0f84d178b08002effb98146e352b44c835b7e9
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Fri Nov 02 03:43:47 2018

Stop using VisiblePosition in HotModeSpellCheckRequester

This patch changes HotModeSpellCheckRequester to use uncanonical versions
of PreviousWordPosition and EndOfWord to reduce usage of VisiblePosition.

Bug: 657237
Change-Id: I26428ede826bc63ee76af02ace14a8bf43d69e25
Reviewed-on: https://chromium-review.googlesource.com/c/1313839
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604834}
[modify] https://crrev.com/7d0f84d178b08002effb98146e352b44c835b7e9/third_party/blink/renderer/core/editing/spellcheck/hot_mode_spell_check_requester.cc
[modify] https://crrev.com/7d0f84d178b08002effb98146e352b44c835b7e9/third_party/blink/renderer/core/editing/visible_units.h

Project Member

Comment 93 by bugdroid1@chromium.org, Nov 5

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

commit ff62446dbb294806d2b41ff913964ce5feae1e73
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Mon Nov 05 04:50:29 2018

Stop using canonical versions of Previous/NextWordPosition() in SelectionModifier

This patch changes SelectionModifier to use non-canonical versions of
Previous/NextWordPosition() to reduce usage of VisiblePosition().

Now that the canonical versions are no longer used, they are also
removed by this patch.

Bug: 657237
Change-Id: Ifa908bfb6bda948e78d4afc8171be55343eaa0ea
Reviewed-on: https://chromium-review.googlesource.com/c/1315930
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605249}
[modify] https://crrev.com/ff62446dbb294806d2b41ff913964ce5feae1e73/third_party/blink/renderer/core/editing/selection_modifier.cc
[modify] https://crrev.com/ff62446dbb294806d2b41ff913964ce5feae1e73/third_party/blink/renderer/core/editing/selection_modifier.h
[modify] https://crrev.com/ff62446dbb294806d2b41ff913964ce5feae1e73/third_party/blink/renderer/core/editing/visible_units.h
[modify] https://crrev.com/ff62446dbb294806d2b41ff913964ce5feae1e73/third_party/blink/renderer/core/editing/visible_units_word.cc

Project Member

Comment 94 by bugdroid1@chromium.org, Nov 14

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

commit 74349a2c813101f8459e176467ee9001a47e1af1
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Wed Nov 14 04:39:43 2018

Use uncanonicalized StartOfWordPosition() in visible selection start adjuster

This patch hoists the creation of VisiblePosition from StartOfWord
to its caller ComputeStartRespectingGranularityAlgorithm to reduce
the usage of VisiblePosition.

Bug: 657237
Change-Id: If1489b363717d751f6e0d8ebc323f6e80045c8af
Reviewed-on: https://chromium-review.googlesource.com/c/1330760
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607907}
[modify] https://crrev.com/74349a2c813101f8459e176467ee9001a47e1af1/third_party/blink/renderer/core/editing/selection_adjuster.cc

Project Member

Comment 95 by bugdroid1@chromium.org, Nov 14

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

commit 1ac52e7568811dd697d71e4c6286299ce5538f0d
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Wed Nov 14 18:04:42 2018

Use uncanonicalized EndOfWordPosition() in visible selection end adjuster

This patch hoists the creation of VisiblePosition from EndOfWord
to its caller ComputeEndRespectingGranularityAlgorithm() to reduce
the usage VisiblePosition.

Bug: 657237
Change-Id: I29cc408d35ecc30db4aa635f5ad4bed88c0032c5
Reviewed-on: https://chromium-review.googlesource.com/c/1330789
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608026}
[modify] https://crrev.com/1ac52e7568811dd697d71e4c6286299ce5538f0d/third_party/blink/renderer/core/editing/selection_adjuster.cc

Project Member

Comment 96 by bugdroid1@chromium.org, Nov 14

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

commit 2ddd786854125de5ea99b7878970502b0cd60cd1
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Wed Nov 14 18:57:17 2018

Stop using VisiblePosition in GranularityStrategy's NextWordBound

This patch changes the function to use VisiblePosition-free versions
of Start/EndOfWord, and hoists the creation of VisiblePosition to
callers to reduce the usage of VisiblePosition.

Bug: 657237
Change-Id: I8565ab3fa839b79c3e464c8622fc7a75161cc621
Reviewed-on: https://chromium-review.googlesource.com/c/1330755
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608066}
[modify] https://crrev.com/2ddd786854125de5ea99b7878970502b0cd60cd1/third_party/blink/renderer/core/editing/granularity_strategy.cc

Project Member

Comment 97 by bugdroid1@chromium.org, Nov 14

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

commit 404ec3769c6cd8537cbab7757a27e78309a32b64
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Wed Nov 14 19:44:11 2018

Stop using VisiblePosition in FrameSelection::SelectWordAroundCaret

This patch changes FrameSelection::SelectWordAroundCaret to use
VisiblePosition-free versions of word boundary algorithms to reduce
usage of VisiblePosition.

Bug: 657237
Change-Id: I1605f77a86332fa20caa7966454fbf1307c10cea
Reviewed-on: https://chromium-review.googlesource.com/c/1330752
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608089}
[modify] https://crrev.com/404ec3769c6cd8537cbab7757a27e78309a32b64/third_party/blink/renderer/core/editing/frame_selection.cc

Project Member

Comment 98 by bugdroid1@chromium.org, Nov 16

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

commit 390c941fbef118bccc2d1f10890da374d05243dc
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Fri Nov 16 17:59:43 2018

Stop ExpandRange/EndToSentenceBoundary from using VisiblePosition

This patch stops the two functions from using VisiblePosition by switch
to the VP-free versions of Start/EndOfSentence(). Hence, this patch
reduces the usage of legacy VisiblePosition.

Bug: 657237
Change-Id: I933a020f9bd6643ba1b2cd5111b8be18b2f49086
Reviewed-on: https://chromium-review.googlesource.com/c/1337816
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608849}
[modify] https://crrev.com/390c941fbef118bccc2d1f10890da374d05243dc/third_party/blink/renderer/core/editing/visible_units.h
[modify] https://crrev.com/390c941fbef118bccc2d1f10890da374d05243dc/third_party/blink/renderer/core/editing/visible_units_sentence.cc

Project Member

Comment 99 by bugdroid1@chromium.org, Nov 16

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

commit d1a83017062423e6b8ddf97c347f785533ef0ead
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Fri Nov 16 18:11:58 2018

Stop using VisiblePosition in DocumentMarkerController

This patch changes DocumentMarkerController to use VisiblePosition-
free versions of Start/EndOfWord, to reduce usage of VisiblePosition.

Bug: 657237
Change-Id: I344c98c9163ddc06f338e309a6b3e372d5fc2dda
Reviewed-on: https://chromium-review.googlesource.com/c/1330747
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608854}
[modify] https://crrev.com/d1a83017062423e6b8ddf97c347f785533ef0ead/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc

Project Member

Comment 100 by bugdroid1@chromium.org, Nov 16

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

commit 775938b69eae4414466e57012269f427eafa6da0
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Fri Nov 16 18:13:40 2018

Change Range::expand() to VisiblePosition-free functions for word and sentence

This patch changes Range::expand() to call VP-free version of word and
sentence start/end functions, by hoisting the creation of VP from
the functions into itself. In this way we reduce the usage of functions
relying on VP.

Bug: 657237
Change-Id: I56ea3cb88972144887eba7701cfdc3628bdbf67b
Reviewed-on: https://chromium-review.googlesource.com/c/1338719
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608855}
[modify] https://crrev.com/775938b69eae4414466e57012269f427eafa6da0/third_party/blink/renderer/core/dom/range.cc

Project Member

Comment 101 by bugdroid1@chromium.org, Nov 16

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

commit 8226b54cafba04bfef7be0855f678553c718f800
Author: Ella Ge <eirage@chromium.org>
Date: Fri Nov 16 21:27:57 2018

Revert "Change Range::expand() to VisiblePosition-free functions for word and sentence"

This reverts commit 775938b69eae4414466e57012269f427eafa6da0.

Reason for revert: need to revert this to revert r608849

Original change's description:
> Change Range::expand() to VisiblePosition-free functions for word and sentence
> 
> This patch changes Range::expand() to call VP-free version of word and
> sentence start/end functions, by hoisting the creation of VP from
> the functions into itself. In this way we reduce the usage of functions
> relying on VP.
> 
> Bug: 657237
> Change-Id: I56ea3cb88972144887eba7701cfdc3628bdbf67b
> Reviewed-on: https://chromium-review.googlesource.com/c/1338719
> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
> Reviewed-by: Kent Tamura <tkent@chromium.org>
> Reviewed-by: Yoichi Osato <yoichio@chromium.org>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#608855}

TBR=yosin@chromium.org,tkent@chromium.org,yoichio@chromium.org,xiaochengh@chromium.org

Bug: 657237, 906174
Change-Id: I46b8df3cfd8ed7f7636f9ef1dabfa350168cb820
Reviewed-on: https://chromium-review.googlesource.com/c/1340906
Reviewed-by: Ella Ge <eirage@chromium.org>
Commit-Queue: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608957}
[modify] https://crrev.com/8226b54cafba04bfef7be0855f678553c718f800/third_party/blink/renderer/core/dom/range.cc

Project Member

Comment 102 by bugdroid1@chromium.org, Nov 16

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

commit d8854b56f4315c513ffe6e6846091069c3273ff7
Author: Ella Ge <eirage@chromium.org>
Date: Fri Nov 16 21:50:18 2018

Revert "Stop ExpandRange/EndToSentenceBoundary from using VisiblePosition"

This reverts commit 390c941fbef118bccc2d1f10890da374d05243dc.

Reason for revert: causing layout test failure crbug.com/906174

Original change's description:
> Stop ExpandRange/EndToSentenceBoundary from using VisiblePosition
> 
> This patch stops the two functions from using VisiblePosition by switch
> to the VP-free versions of Start/EndOfSentence(). Hence, this patch
> reduces the usage of legacy VisiblePosition.
> 
> Bug: 657237
> Change-Id: I933a020f9bd6643ba1b2cd5111b8be18b2f49086
> Reviewed-on: https://chromium-review.googlesource.com/c/1337816
> Reviewed-by: Yoichi Osato <yoichio@chromium.org>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#608849}

TBR=yosin@chromium.org,yoichio@chromium.org,xiaochengh@chromium.org

Bug: 657237, 906174
Change-Id: I915e9d68f16a11344b0160db4c5702113380273a
Reviewed-on: https://chromium-review.googlesource.com/c/1340899
Commit-Queue: Ella Ge <eirage@chromium.org>
Reviewed-by: Ella Ge <eirage@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608963}
[modify] https://crrev.com/d8854b56f4315c513ffe6e6846091069c3273ff7/third_party/blink/renderer/core/editing/visible_units.h
[modify] https://crrev.com/d8854b56f4315c513ffe6e6846091069c3273ff7/third_party/blink/renderer/core/editing/visible_units_sentence.cc

Project Member

Comment 103 by bugdroid1@chromium.org, Nov 16

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

commit f83a74fe7d416d148926f43257a0816e700d4ccf
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Fri Nov 16 23:35:07 2018

Reland "Stop ExpandRange/EndToSentenceBoundary from using VisiblePosition"

This reverts commit d8854b56f4315c513ffe6e6846091069c3273ff7.

Reason for revert: The original use-after-free is caused by storing part
of a temporary object into a reference:

const Position& sentence_end =
      EndOfSentence(range.EndPosition()).GetPosition();

This is fixed after changing the reference into a real instance.

Original change's description:
> Revert "Stop ExpandRange/EndToSentenceBoundary from using VisiblePosition"
>
> This reverts commit 390c941fbef118bccc2d1f10890da374d05243dc.
>
> Reason for revert: causing layout test failure crbug.com/906174
>
> Original change's description:
> > Stop ExpandRange/EndToSentenceBoundary from using VisiblePosition
> >
> > This patch stops the two functions from using VisiblePosition by switch
> > to the VP-free versions of Start/EndOfSentence(). Hence, this patch
> > reduces the usage of legacy VisiblePosition.
> >
> > Bug: 657237
> > Change-Id: I933a020f9bd6643ba1b2cd5111b8be18b2f49086
> > Reviewed-on: https://chromium-review.googlesource.com/c/1337816
> > Reviewed-by: Yoichi Osato <yoichio@chromium.org>
> > Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> > Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#608849}
>
> TBR=yosin@chromium.org,yoichio@chromium.org,xiaochengh@chromium.org
>
> Bug: 657237, 906174
> Change-Id: I915e9d68f16a11344b0160db4c5702113380273a
> Reviewed-on: https://chromium-review.googlesource.com/c/1340899
> Commit-Queue: Ella Ge <eirage@chromium.org>
> Reviewed-by: Ella Ge <eirage@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#608963}

TBR=yosin@chromium.org,yoichio@chromium.org,xiaochengh@chromium.org,eirage@chromium.org

Change-Id: Ib4832ab51086777c926f4188936f31391a87f019
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 657237, 906174
Reviewed-on: https://chromium-review.googlesource.com/c/1340833
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609023}
[modify] https://crrev.com/f83a74fe7d416d148926f43257a0816e700d4ccf/third_party/blink/renderer/core/editing/visible_units.h
[modify] https://crrev.com/f83a74fe7d416d148926f43257a0816e700d4ccf/third_party/blink/renderer/core/editing/visible_units_sentence.cc

Project Member

Comment 104 by bugdroid1@chromium.org, Nov 17

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

commit 5f0ee342bd78d027773d62097d3f01000f1774e8
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Sat Nov 17 00:20:50 2018

Reland "Change Range::expand() to VisiblePosition-free functions for word and sentence"

This reverts commit 8226b54cafba04bfef7be0855f678553c718f800.

Reason for revert: The original bug is fixed.

Original change's description:
> Revert "Change Range::expand() to VisiblePosition-free functions for word and sentence"
> 
> This reverts commit 775938b69eae4414466e57012269f427eafa6da0.
> 
> Reason for revert: need to revert this to revert r608849
> 
> Original change's description:
> > Change Range::expand() to VisiblePosition-free functions for word and sentence
> > 
> > This patch changes Range::expand() to call VP-free version of word and
> > sentence start/end functions, by hoisting the creation of VP from
> > the functions into itself. In this way we reduce the usage of functions
> > relying on VP.
> > 
> > Bug: 657237
> > Change-Id: I56ea3cb88972144887eba7701cfdc3628bdbf67b
> > Reviewed-on: https://chromium-review.googlesource.com/c/1338719
> > Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
> > Reviewed-by: Kent Tamura <tkent@chromium.org>
> > Reviewed-by: Yoichi Osato <yoichio@chromium.org>
> > Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#608855}
> 
> TBR=yosin@chromium.org,tkent@chromium.org,yoichio@chromium.org,xiaochengh@chromium.org
> 
> Bug: 657237, 906174
> Change-Id: I46b8df3cfd8ed7f7636f9ef1dabfa350168cb820
> Reviewed-on: https://chromium-review.googlesource.com/c/1340906
> Reviewed-by: Ella Ge <eirage@chromium.org>
> Commit-Queue: Ella Ge <eirage@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#608957}

TBR=yosin@chromium.org,tkent@chromium.org,yoichio@chromium.org,xiaochengh@chromium.org,eirage@chromium.org

Change-Id: Iad61aa1c53fc7225f9795a1aa0e5ff9cc0704bc2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 657237, 906174
Reviewed-on: https://chromium-review.googlesource.com/c/1340837
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609043}
[modify] https://crrev.com/5f0ee342bd78d027773d62097d3f01000f1774e8/third_party/blink/renderer/core/dom/range.cc

Showing comments 5 - 104 of 104 Older

Sign in to add a comment