New issue
Advanced search Search tips

Issue 647219 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 648949

Blocking:
issue 590369



Sign in to add a comment

createVisiblePosition() should be called with clean layout

Project Member Reported by xiaoche...@chromium.org, Sep 15 2016

Issue description

Currently, createVisiblePosition() updates layout by itself, messing up the rendering pipeline.

We should hoist the layout update calls from createVisiblePosition() and let the callers ensure clean layout.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 16 2016

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

commit 31805260d90d814face4ed1735a6ff2755692f6d
Author: xiaochengh <xiaochengh@chromium.org>
Date: Fri Sep 16 01:24:16 2016

Mark current createVisiblePosition overloads deprecated

This patch renames createVisiblePosition() (all overloads) to
createVisiblePositionDeprecated() to discourage creating a VisiblePosition
in dirty layout and waiting for layout update lazily. This patch also
introduces new createVisiblePosition() which assumes clean layout.

This patch is a preparation for hoisting the layout update call from the old
createVisiblePosition(). In follow up patches, the callers should ensure
clean layout by themselves and call the new createVisiblePosition() instead.

This patch is a mechanical substitution
's/createVisiblePosition(/createVisiblePositionDeprecated(/g', followed
by the following changes:
- Introduce the new createVisiblePosition() in VisiblePosition.h/cpp.
- Revert the substitution in modules/accessibility/AXLayoutObject.cpp,
  since callers there already ensure clean layout

BUG= 647219 

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

[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/dom/Range.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/DOMSelection.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/DragCaretController.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/Editor.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/FrameCaret.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/GranularityStrategyTest.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/PendingSelection.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/PlainTextRange.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/RelocatablePositionTest.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/SelectionModifier.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/VisiblePosition.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/VisiblePosition.h
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/VisiblePositionTest.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/VisibleSelection.h
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/commands/MoveSelectionCommand.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingParagraph.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/html/HTMLTextFormControlElementTest.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/layout/HitTestResult.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/core/testing/Internals.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/web/WebSurroundingText.cpp
[modify] https://crrev.com/31805260d90d814face4ed1735a6ff2755692f6d/third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Project Member

Comment 2 by bugdroid1@chromium.org, Sep 16 2016

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

commit 325c64a962cb5c007368ef431dfa863c26c7847b
Author: xiaochengh <xiaochengh@chromium.org>
Date: Fri Sep 16 09:19:28 2016

Prune createVisiblePositionDeprecated from unit tests

BUG= 647219 

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

[modify] https://crrev.com/325c64a962cb5c007368ef431dfa863c26c7847b/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp
[modify] https://crrev.com/325c64a962cb5c007368ef431dfa863c26c7847b/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp
[modify] https://crrev.com/325c64a962cb5c007368ef431dfa863c26c7847b/third_party/WebKit/Source/core/editing/GranularityStrategyTest.cpp
[modify] https://crrev.com/325c64a962cb5c007368ef431dfa863c26c7847b/third_party/WebKit/Source/core/editing/RelocatablePositionTest.cpp
[modify] https://crrev.com/325c64a962cb5c007368ef431dfa863c26c7847b/third_party/WebKit/Source/core/editing/VisiblePositionTest.cpp
[modify] https://crrev.com/325c64a962cb5c007368ef431dfa863c26c7847b/third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp
[modify] https://crrev.com/325c64a962cb5c007368ef431dfa863c26c7847b/third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp
[modify] https://crrev.com/325c64a962cb5c007368ef431dfa863c26c7847b/third_party/WebKit/Source/core/html/HTMLTextFormControlElementTest.cpp
[modify] https://crrev.com/325c64a962cb5c007368ef431dfa863c26c7847b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 20 2016

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

commit 467515a671ce9a7cadafee4ddcc57b0a804e5d60
Author: xiaochengh <xiaochengh@chromium.org>
Date: Tue Sep 20 02:54:28 2016

Prune some unnecessary calls to createVisiblePositionDeprecated

This patch prunes createVisiblePositionDeprecated from the following files
because callers there have already ensured clean layout:
- TextIterator.cpp
- PendingSelection.cpp
- PlainTextRange.cpp
- SelectionModifier.cpp
- serializers/StyledMarkupSerializer.cpp
- SpellChecker.cpp
- TextCheckingParagraph.cpp
- LocalFrame.cpp

BUG= 647219 

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

[modify] https://crrev.com/467515a671ce9a7cadafee4ddcc57b0a804e5d60/third_party/WebKit/Source/core/editing/PendingSelection.cpp
[modify] https://crrev.com/467515a671ce9a7cadafee4ddcc57b0a804e5d60/third_party/WebKit/Source/core/editing/PlainTextRange.cpp
[modify] https://crrev.com/467515a671ce9a7cadafee4ddcc57b0a804e5d60/third_party/WebKit/Source/core/editing/SelectionModifier.cpp
[modify] https://crrev.com/467515a671ce9a7cadafee4ddcc57b0a804e5d60/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
[modify] https://crrev.com/467515a671ce9a7cadafee4ddcc57b0a804e5d60/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp
[modify] https://crrev.com/467515a671ce9a7cadafee4ddcc57b0a804e5d60/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
[modify] https://crrev.com/467515a671ce9a7cadafee4ddcc57b0a804e5d60/third_party/WebKit/Source/core/editing/spellcheck/TextCheckingParagraph.cpp
[modify] https://crrev.com/467515a671ce9a7cadafee4ddcc57b0a804e5d60/third_party/WebKit/Source/core/frame/LocalFrame.cpp

Project Member

Comment 4 by bugdroid1@chromium.org, Sep 20 2016

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

commit 04abd8d88e17a3644c7f60be294fb78daa87cf17
Author: xiaochengh <xiaochengh@chromium.org>
Date: Tue Sep 20 03:10:13 2016

Prune createVisiblePositionDeprecated from HTMLTextFormControlElement

This patch prunes createVisiblePositionDeprecated from
HTMLTextFormControlElement::visiblePositionForIndex.

It also finds several loopholes that may end up calling visiblePositionForIndex
with dirty layout, and adds layout update calls there.

BUG= 647219 

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

[modify] https://crrev.com/04abd8d88e17a3644c7f60be294fb78daa87cf17/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.cpp
[modify] https://crrev.com/04abd8d88e17a3644c7f60be294fb78daa87cf17/third_party/WebKit/Source/core/testing/Internals.cpp
[modify] https://crrev.com/04abd8d88e17a3644c7f60be294fb78daa87cf17/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Project Member

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

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

commit 88a3c048159bb78cb16a46327e837029f9a3d580
Author: xiaochengh <xiaochengh@chromium.org>
Date: Tue Sep 20 08:10:05 2016

Prune CreateVisiblePositionDeprecated from DragCaretController

DragCaretController::setCaretPosition is called either with a null
position (from DragCaretController::clear), or after a hit test.
In either case, we don't need to update layout before creating a
VisiblePosition from the passed Position.

BUG= 647219 

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

[modify] https://crrev.com/88a3c048159bb78cb16a46327e837029f9a3d580/third_party/WebKit/Source/core/editing/DragCaretController.cpp

Project Member

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

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

commit 93494a607b9c3effeaf2a8b00a23e16804f80806
Author: xiaochengh <xiaochengh@chromium.org>
Date: Tue Sep 20 09:37:14 2016

Prune CreateVisiblePositionDeprecate from HitTestResult

This patch makes HitTestResult::isMisspelled() call createVisiblePosition()
instead of createVisiblePositionDeprecated(), since isMisspelled() is already
called with clean layout.

BUG= 647219 

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

[modify] https://crrev.com/93494a607b9c3effeaf2a8b00a23e16804f80806/third_party/WebKit/Source/core/layout/HitTestResult.cpp

Project Member

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

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

commit 0a91d0e81b21800a4c603fb46db2b7648c11ffda
Author: xiaochengh <xiaochengh@chromium.org>
Date: Tue Sep 20 10:06:18 2016

Prune CreateVisiblePositionDeprecated from Editor::canDeleteRange

Editor::canDeleteRange tries to create VisiblePositions when called with
a collapsed range, but the function is only called with a non-collapsed
range. This patch simply removes the dead code for handling collapsed
range and get rid of the creation of VisiblePositions.

BUG= 647219 

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

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

Project Member

Comment 10 by bugdroid1@chromium.org, Sep 20 2016

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

commit 0f4f1f5cb173cdc9cfb05b408e1cc4b2161d8f26
Author: xiaochengh <xiaochengh@chromium.org>
Date: Tue Sep 20 14:02:10 2016

Prune CreateVisiblePositionDeprecated from FrameCaret::absoluteCaretBounds

BUG= 647219 

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

[modify] https://crrev.com/0f4f1f5cb173cdc9cfb05b408e1cc4b2161d8f26/third_party/WebKit/Source/core/editing/FrameCaret.cpp

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 21 2016

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

commit f42cd8c43eac573dab21b9599aaa095c3a4f9745
Author: xiaochengh <xiaochengh@chromium.org>
Date: Wed Sep 21 03:53:40 2016

Prune CreateVisiblePositionDeprecated from SelectionController

BUG= 647219 

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

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

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 21 2016

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

commit a57bb757c45e94590a19cd5353f15664a8db560e
Author: xiaochengh <xiaochengh@chromium.org>
Date: Wed Sep 21 09:06:29 2016

Prune CreateVisiblePositionDeprecated from FrameSelection

BUG= 647219 

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

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

Project Member

Comment 13 by bugdroid1@chromium.org, Sep 21 2016

Blockedon: 648949
Project Member

Comment 15 by bugdroid1@chromium.org, Sep 21 2016

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

commit 64704e7062fad45e7fcb17f307a4904fc81f11fa
Author: xiaochengh <xiaochengh@chromium.org>
Date: Wed Sep 21 14:39:05 2016

Prune CreateVisiblePositionDeprecated from most of VisibleUnits

BUG= 647219 

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

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

Project Member

Comment 16 by bugdroid1@chromium.org, Sep 21 2016

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

commit dbf5803bdb2f7077426fe5cbe353bd7adfe091fb
Author: xiaochengh <xiaochengh@chromium.org>
Date: Wed Sep 21 14:40:50 2016

Prune CreateVisiblePositionDeprecated from VisibleSelection.cpp

BUG= 647219 

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

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

Project Member

Comment 18 by bugdroid1@chromium.org, Sep 26 2016

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

commit 0db24bb3a3073a9296b05d5bfc592727db2f94c4
Author: xiaochengh <xiaochengh@chromium.org>
Date: Mon Sep 26 02:09:38 2016

Prune CreateVisiblePositionDeprecated from VisibleSelection::visibleBase/Extent

Caller of these two functions have already ensured clean layout, so this
patch safely prunes CreateVisiblePositionDeprecated from them.

BUG= 647219 

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

[modify] https://crrev.com/0db24bb3a3073a9296b05d5bfc592727db2f94c4/third_party/WebKit/Source/core/editing/VisibleSelection.h

Project Member

Comment 19 by bugdroid1@chromium.org, Sep 27 2016

Project Member

Comment 20 by bugdroid1@chromium.org, Sep 27 2016

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

commit 80505b6a662126b962b8893046d0e68e5893c37f
Author: xiaochengh <xiaochengh@chromium.org>
Date: Tue Sep 27 01:03:36 2016

Prune some CreateVisiblePositionDeprecated calls from EditingUtilities

This patch prunes CreateVisiblePositionDeprecated from the following functions
in EditingUtilities because they are already called with clean layout:
- firstEditableVisiblePositionAfterPositionInRoot (both versions)
- lastEditableVisiblePositionAfterPositionInRoot (both versions)
- enclosingEmptyListItem
- visiblePositionForIndex

BUG= 647219 

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

[modify] https://crrev.com/80505b6a662126b962b8893046d0e68e5893c37f/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/80505b6a662126b962b8893046d0e68e5893c37f/third_party/WebKit/Source/core/editing/EditingUtilities.h

Project Member

Comment 21 by bugdroid1@chromium.org, Sep 28 2016

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

commit 57eca1337e14e60d21b126d828c6c5e2845cd620
Author: xiaochengh <xiaochengh@chromium.org>
Date: Wed Sep 28 01:17:15 2016

Mark calls of visible{Start,End} with dirty layout deprecated

This patch marks the current VisibleSelection::visible{Start,End}
deprecated because they updates layout synchronously, and introduces
the new desired versions that requires clean layout.

This patch also ensures that call of these two functions from outside
editing commands are done with clean layout, and make the calls in
editing commands switch to the deprecated versions.

BUG= 647219 

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

[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/VisibleSelection.h
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
[modify] https://crrev.com/57eca1337e14e60d21b126d828c6c5e2845cd620/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp

Project Member

Comment 22 by bugdroid1@chromium.org, Sep 28 2016

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

commit ae17e4f7001f6523d0e426028d842f436199fe0f
Author: xiaochengh <xiaochengh@chromium.org>
Date: Wed Sep 28 04:23:34 2016

Prune createVisiblePositionDeprecated from endOfParagraphAlgorithm

The call of createVisiblePositionDeprecated in endOfParagraphAlgorithm
should have been pruned in previous patches but was missed. This patch
does it.

BUG= 647219 

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

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

Project Member

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

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

commit f68abcbb358214261742479653a6ef534b7837b0
Author: xiaochengh <xiaochengh@chromium.org>
Date: Thu Oct 06 02:13:55 2016

Prune deprecated editing functions from ApplyBlockElementCommand and its subclasses

This patch prunes the following deprecated functions from ApplyBlockElementCommand
and its subclasses by ensuring clean layout and valid arguments at each call site:
- createVisiblePositionDeprecated
- createVisibleSelectionDeprecated
- VisibleSelection::visible{Start,End}Deprecated
- nextPositionOfDeprecated
- paragraph related deprecated functions

BUG= 647219 , 651373 

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

[modify] https://crrev.com/f68abcbb358214261742479653a6ef534b7837b0/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
[modify] https://crrev.com/f68abcbb358214261742479653a6ef534b7837b0/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp
[modify] https://crrev.com/f68abcbb358214261742479653a6ef534b7837b0/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp

Project Member

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

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

commit 33e97547aa6173ea92f3d7241434f06d73e94e75
Author: xiaochengh <xiaochengh@chromium.org>
Date: Thu Oct 06 05:21:17 2016

Prune deprecated functions from ApplyStyleCommand

This patch prunes the following deprecated functions from ApplyStyleCommand by
ensuring clean layout and valid input parameters:
- createVisiblePositionDeprecated
- createVisibleSelectionDeprecated
- startOfParagraphDeprecated
- endOfParagraphDeprecated

BUG= 647219 , 651373 

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

[modify] https://crrev.com/33e97547aa6173ea92f3d7241434f06d73e94e75/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp

Project Member

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

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

commit be74a4d63bc93ec1b099a2b975a4321c96ac19a1
Author: xiaochengh <xiaochengh@chromium.org>
Date: Thu Oct 06 15:03:27 2016

Prune deprecated functions from DeleteSelectionCommand

BUG= 647219 , 651373 

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

[modify] https://crrev.com/be74a4d63bc93ec1b099a2b975a4321c96ac19a1/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp

Project Member

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

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

commit 00789267c5d338a9d2151c950fbd8bf9f47ba92b
Author: xiaochengh <xiaochengh@chromium.org>
Date: Thu Oct 06 15:04:14 2016

Prune deprecated functions from BreakBlockquoteCommand

BUG= 647219 , 651373 

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

[modify] https://crrev.com/00789267c5d338a9d2151c950fbd8bf9f47ba92b/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp

Project Member

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

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

commit d1947c7fd01731ba28e72137e99d9cf78c7ab0b6
Author: xiaochengh <xiaochengh@chromium.org>
Date: Fri Oct 07 09:19:23 2016

Prune deprecated functions from InsertListCommand

BUG= 647219 ,648949, 651373 

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

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

Project Member

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

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

commit 530e41279924e07a77a1164a6e1cf20e28cd63c3
Author: xiaochengh <xiaochengh@chromium.org>
Date: Fri Oct 07 09:29:45 2016

Prune deprecated functions from InsertLinebreakCommand

BUG= 647219 , 651373 

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

[modify] https://crrev.com/530e41279924e07a77a1164a6e1cf20e28cd63c3/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp

Project Member

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

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

commit 908c1a145ab363b72a7053d5de31bde47939dc81
Author: xiaochengh <xiaochengh@chromium.org>
Date: Fri Oct 07 10:06:55 2016

Prune deprecated functions from ReplaceSelectionCommand

BUG= 647219 , 651373 

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

[modify] https://crrev.com/908c1a145ab363b72a7053d5de31bde47939dc81/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp

Project Member

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

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

commit 4f2142d653eeabe6a8c67f36a3c913868577c26d
Author: xiaochengh <xiaochengh@chromium.org>
Date: Tue Oct 11 08:28:37 2016

Prune deprecated functions from InsertListCommand

BUG= 647219 , 651373 

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

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

Project Member

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

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

commit 498e9e19dffeb563c02167e40da7a4424eaba02e
Author: xiaochengh <xiaochengh@chromium.org>
Date: Tue Oct 11 08:32:06 2016

Prune deprecated functions from InsertTextCommand

BUG= 647219 ,648949, 651373 

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

[modify] https://crrev.com/498e9e19dffeb563c02167e40da7a4424eaba02e/third_party/WebKit/Source/core/editing/commands/InsertTextCommand.cpp

Project Member

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

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

commit 41252e6258555c44a7ac50c202de3379f7620f75
Author: xiaochengh <xiaochengh@chromium.org>
Date: Tue Oct 11 09:15:32 2016

Prune all but one deprecated functions from InsertParagraphSeparatorCommand

BUG= 647219 , 651373 

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

[modify] https://crrev.com/41252e6258555c44a7ac50c202de3379f7620f75/third_party/WebKit/Source/core/editing/commands/InsertParagraphSeparatorCommand.cpp

Project Member

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

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

commit cc8c3088a0fb49c131d9a6e472d8020946f1a161
Author: xiaochengh <xiaochengh@chromium.org>
Date: Wed Oct 12 02:16:30 2016

Prune most of the deprecated functions from CompositeEditCommand

BUG= 647219 , 651373 

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

[modify] https://crrev.com/cc8c3088a0fb49c131d9a6e472d8020946f1a161/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp

Project Member

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

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

commit c7a2dfb0e4118e118fdbd2bd566aa3fa77a7d665
Author: xiaochengh <xiaochengh@chromium.org>
Date: Wed Oct 12 14:03:10 2016

Prune deprecated functions from VisibleSelection and VisibleUnits

This patch prunes all deprecated functions from VisibleSelection and
VisibleUnits because they have no callers any more.

The following functions are removed:
- VisibleSelection::visible{Start,End}Deprecated
- createVisibleSelectionDeprecated (all overloads)
- paragraph-related deprecated functions (in VisibleUnits)
- {previous,next}PositionOf (in VisibleUnits)

BUG= 647219 ,648949, 651373 

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

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

Project Member

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

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

commit 563e8dd782f2c6ba461bde1d15591063d6a9ee62
Author: xiaochengh <xiaochengh@chromium.org>
Date: Thu Oct 13 06:32:02 2016

Ensure clean layout for all (but deprecated) functions creating VisiblePositions

This patch ensures clean layout when calling the following functions:
- VisiblePosition::beforeNode
- VisiblePosition::afterNode
- VisiblePosition::firstPositionInNode
- VisiblePosition::lastPositionInNode
- VisiblePosition::inParentBeforeNode
- VisiblePosition::inParentAfterNode

The layout update calls in these functions become unnecessary and are removed.

BUG= 647219 

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

[modify] https://crrev.com/563e8dd782f2c6ba461bde1d15591063d6a9ee62/third_party/WebKit/Source/core/editing/VisiblePosition.cpp
[modify] https://crrev.com/563e8dd782f2c6ba461bde1d15591063d6a9ee62/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/563e8dd782f2c6ba461bde1d15591063d6a9ee62/third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp
[modify] https://crrev.com/563e8dd782f2c6ba461bde1d15591063d6a9ee62/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp

Project Member

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

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

commit be2e6e1eb24a7f7a5be000c8b7afda118cb85b4b
Author: xiaochengh <xiaochengh@chromium.org>
Date: Mon Oct 17 11:14:06 2016

Prune createVisiblePositionDeprecated

This patch updates layout for the remaining callers of
createVisiblePositionDeprecated, so that now all VisiblePositions are
created in clean layout.

createVisiblePositionDeprecated no longer has any call site, and hence,
is removed.

BUG= 647219 

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

[modify] https://crrev.com/be2e6e1eb24a7f7a5be000c8b7afda118cb85b4b/third_party/WebKit/Source/core/dom/Range.cpp
[modify] https://crrev.com/be2e6e1eb24a7f7a5be000c8b7afda118cb85b4b/third_party/WebKit/Source/core/editing/FrameCaret.cpp
[modify] https://crrev.com/be2e6e1eb24a7f7a5be000c8b7afda118cb85b4b/third_party/WebKit/Source/core/editing/VisiblePosition.cpp
[modify] https://crrev.com/be2e6e1eb24a7f7a5be000c8b7afda118cb85b4b/third_party/WebKit/Source/core/editing/VisiblePosition.h

Status: Fixed (was: Started)
Project Member

Comment 39 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f68abcbb358214261742479653a6ef534b7837b0

commit f68abcbb358214261742479653a6ef534b7837b0
Author: xiaochengh <xiaochengh@chromium.org>
Date: Thu Oct 06 02:13:55 2016

Prune deprecated editing functions from ApplyBlockElementCommand and its subclasses

This patch prunes the following deprecated functions from ApplyBlockElementCommand
and its subclasses by ensuring clean layout and valid arguments at each call site:
- createVisiblePositionDeprecated
- createVisibleSelectionDeprecated
- VisibleSelection::visible{Start,End}Deprecated
- nextPositionOfDeprecated
- paragraph related deprecated functions

BUG= 647219 , 651373 

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

[modify] https://crrev.com/f68abcbb358214261742479653a6ef534b7837b0/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
[modify] https://crrev.com/f68abcbb358214261742479653a6ef534b7837b0/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp
[modify] https://crrev.com/f68abcbb358214261742479653a6ef534b7837b0/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp

Project Member

Comment 40 by bugdroid1@chromium.org, Oct 27 2016

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

commit 33e97547aa6173ea92f3d7241434f06d73e94e75
Author: xiaochengh <xiaochengh@chromium.org>
Date: Thu Oct 06 05:21:17 2016

Prune deprecated functions from ApplyStyleCommand

This patch prunes the following deprecated functions from ApplyStyleCommand by
ensuring clean layout and valid input parameters:
- createVisiblePositionDeprecated
- createVisibleSelectionDeprecated
- startOfParagraphDeprecated
- endOfParagraphDeprecated

BUG= 647219 , 651373 

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

[modify] https://crrev.com/33e97547aa6173ea92f3d7241434f06d73e94e75/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp

Project Member

Comment 41 by bugdroid1@chromium.org, Oct 27 2016

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

commit be74a4d63bc93ec1b099a2b975a4321c96ac19a1
Author: xiaochengh <xiaochengh@chromium.org>
Date: Thu Oct 06 15:03:27 2016

Prune deprecated functions from DeleteSelectionCommand

BUG= 647219 , 651373 

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

[modify] https://crrev.com/be74a4d63bc93ec1b099a2b975a4321c96ac19a1/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp

Project Member

Comment 42 by bugdroid1@chromium.org, Oct 27 2016

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

commit 00789267c5d338a9d2151c950fbd8bf9f47ba92b
Author: xiaochengh <xiaochengh@chromium.org>
Date: Thu Oct 06 15:04:14 2016

Prune deprecated functions from BreakBlockquoteCommand

BUG= 647219 , 651373 

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

[modify] https://crrev.com/00789267c5d338a9d2151c950fbd8bf9f47ba92b/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp

Comment 43 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840

Sign in to add a comment