New issue
Advanced search Search tips

Issue 766448 link

Starred by 3 users

Issue metadata

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

Blocked on:
issue 735327



Sign in to add a comment

Sanitize parameters in core/editing

Project Member Reported by yosin@chromium.org, Sep 19 2017

Issue description

To improve source code readability of core/editing, I would like to
sanitize or cleanup function parameters, see EditingUtilizies.h and
VisibleUnits.h.

To reduce confusion we should change parameters to take:
 - |const Node&| instead of |Node*|, |const Node*|; constness and avoid null check
 - Avoid default parameter
 - Overload; some function has too many overloads

 

Comment 1 by yosin@chromium.org, Sep 19 2017

Blockedon: 735327
Cc: ice...@yandex-team.ru

Comment 2 by yosin@chromium.org, Sep 19 2017

Description: Show this description
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 27 2017

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

commit b417c5bb5478d2350eac26bea2fd0699ff129916
Author: Andrey Kraynov <iceman@yandex-team.ru>
Date: Wed Sep 27 05:30:04 2017

Change function {Previous,Next}GraphemeBoundaryOf() to use |const Node&|

The original version can't handle a nullptr, so it can be changed to
take a reference.

Bug: 766448
Change-Id: Ifd9c3dc3e8cb3504cc0590120f540c8afbd4b319
Reviewed-on: https://chromium-review.googlesource.com/673383
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504586}
[modify] https://crrev.com/b417c5bb5478d2350eac26bea2fd0699ff129916/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/b417c5bb5478d2350eac26bea2fd0699ff129916/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/b417c5bb5478d2350eac26bea2fd0699ff129916/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp
[modify] https://crrev.com/b417c5bb5478d2350eac26bea2fd0699ff129916/third_party/WebKit/Source/core/editing/PositionIterator.cpp
[modify] https://crrev.com/b417c5bb5478d2350eac26bea2fd0699ff129916/third_party/WebKit/Source/core/editing/SelectionModifierCharacter.cpp
[modify] https://crrev.com/b417c5bb5478d2350eac26bea2fd0699ff129916/third_party/WebKit/Source/core/editing/VisibleUnits.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 30 2017

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

commit 67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae
Author: Andrey Kraynov <iceman@yandex-team.ru>
Date: Sat Sep 30 23:32:38 2017

Deprecate FirstPositionInOrBeforeNode() and LastPositionInOrAfterNode()

This is a first step of moving all call sites of these functions
to use |const Node&| instead of |Node*| as a parameter.

This is mostly a mechanical patch, produced by following commands:
$ git grep -l 'FirstPositionInOrBeforeNode(' | xargs \
    sed -i 's/FirstPositionInOrBeforeNode(/FirstPositionInOrBeforeNodeDeprecated(/g'

$ git grep -l 'LastPositionInOrAfterNode(' | xargs \
    sed -i 's/LastPositionInOrAfterNode(/LastPositionInOrAfterNodeDeprecated(/g'

$ git cl format

Added braces as required by the linter for some lines.
No changes in behavior.

Bug: 766448
Change-Id: Ie7f51547a6a20340f0943ccd14f223286c608ee7
Reviewed-on: https://chromium-review.googlesource.com/690476
Commit-Queue: Andrey Kraynov <iceman@yandex-team.ru>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505476}
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/EditingStyleUtilities.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/FrameSelection.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/Position.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/Position.h
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/PositionIterator.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/SelectionController.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/VisibleUnitsParagraph.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/html/TextControlElement.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/layout/LayoutBox.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/core/layout/LayoutObject.cpp
[modify] https://crrev.com/67ddb72f78ac6e5574c9c1157d4f63157bbcc7ae/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Project Member

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

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

commit 133f8a01a62064f56a320ff82d262e17e25639c5
Author: Andrey Kraynov <iceman@yandex-team.ru>
Date: Mon Oct 02 08:01:47 2017

Introduce const-ref {First,Last}PositionInOr{Before,After}Node functions

Add |const Node&| implementation of these functions that were deprecated
earlier, but do not use it yet.

Bug: 766448
Change-Id: I9d9e18068486b394ad96e81e9871f9cb9dea8868
Reviewed-on: https://chromium-review.googlesource.com/694302
Commit-Queue: Andrey Kraynov <iceman@yandex-team.ru>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505556}
[modify] https://crrev.com/133f8a01a62064f56a320ff82d262e17e25639c5/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/133f8a01a62064f56a320ff82d262e17e25639c5/third_party/WebKit/Source/core/editing/Position.cpp
[modify] https://crrev.com/133f8a01a62064f56a320ff82d262e17e25639c5/third_party/WebKit/Source/core/editing/Position.h

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 3 2017

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

commit 267536e0bde1b27be59a66654efe84c7be87076b
Author: Andrey Kraynov <iceman@yandex-team.ru>
Date: Tue Oct 03 01:30:30 2017

Change call sites in EditingUtilities.cpp to use |const Node&|

Do not use deprecated functions with |Node*| where possible in
EditingUtilities.cpp code.
Node pointers at all places must not be null due to explcit checks.

No changes in behavior.

Bug: 766448
Change-Id: I4da3e1d95d5bc322c21dfadd53b9542884531dc3
Reviewed-on: https://chromium-review.googlesource.com/696083
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505910}
[modify] https://crrev.com/267536e0bde1b27be59a66654efe84c7be87076b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Project Member

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

Project Member

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

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

commit 4e957c6925104625b5da281c7d6b97c707f2d226
Author: Andrey Kraynov <iceman@yandex-team.ru>
Date: Thu Oct 05 12:19:17 2017

Change editing/commands/ code to use |const Node&| instead of |Node*|

Use const-ref versions of FirstPositionInOrBeforeNode and
LastPositionInOrAfterNode functions instead of deprecated ones.
Most changes are quite trivial replacements for call sites where
|Node*| can't be a nullptr.

No changes in behavior.

Bug: 766448
Change-Id: I10ae5adeb1b5dc38e6bf06005a7478870e2f140f
Reviewed-on: https://chromium-review.googlesource.com/700678
Commit-Queue: Andrey Kraynov <iceman@yandex-team.ru>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506703}
[modify] https://crrev.com/4e957c6925104625b5da281c7d6b97c707f2d226/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
[modify] https://crrev.com/4e957c6925104625b5da281c7d6b97c707f2d226/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.h
[modify] https://crrev.com/4e957c6925104625b5da281c7d6b97c707f2d226/third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp
[modify] https://crrev.com/4e957c6925104625b5da281c7d6b97c707f2d226/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
[modify] https://crrev.com/4e957c6925104625b5da281c7d6b97c707f2d226/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
[modify] https://crrev.com/4e957c6925104625b5da281c7d6b97c707f2d226/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp
[modify] https://crrev.com/4e957c6925104625b5da281c7d6b97c707f2d226/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
[modify] https://crrev.com/4e957c6925104625b5da281c7d6b97c707f2d226/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 11 2017

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

commit 8761f44be1014352009d6c32bdedc0250fbbd6a8
Author: Andrey Kraynov <iceman@yandex-team.ru>
Date: Wed Oct 11 14:50:37 2017

Replace calls of deprecated functions FirstPositionInOrBeforeNode

Use |const Node&| versions instead of deprecated ones.
This is mostly a trivial replacement.

No changes in behavior.

Bug: 766448
Change-Id: I183be54d0b2b33faaf77d57ddb03a39baa2f2264
Reviewed-on: https://chromium-review.googlesource.com/704643
Commit-Queue: Andrey Kraynov <iceman@yandex-team.ru>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507981}
[modify] https://crrev.com/8761f44be1014352009d6c32bdedc0250fbbd6a8/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/8761f44be1014352009d6c32bdedc0250fbbd6a8/third_party/WebKit/Source/core/editing/EditingStyleUtilities.cpp
[modify] https://crrev.com/8761f44be1014352009d6c32bdedc0250fbbd6a8/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/8761f44be1014352009d6c32bdedc0250fbbd6a8/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
[modify] https://crrev.com/8761f44be1014352009d6c32bdedc0250fbbd6a8/third_party/WebKit/Source/core/frame/LocalFrame.cpp
[modify] https://crrev.com/8761f44be1014352009d6c32bdedc0250fbbd6a8/third_party/WebKit/Source/core/html/forms/TextControlElement.cpp
[modify] https://crrev.com/8761f44be1014352009d6c32bdedc0250fbbd6a8/third_party/WebKit/Source/core/layout/LayoutBox.cpp
[modify] https://crrev.com/8761f44be1014352009d6c32bdedc0250fbbd6a8/third_party/WebKit/Source/core/layout/LayoutObject.cpp
[modify] https://crrev.com/8761f44be1014352009d6c32bdedc0250fbbd6a8/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Project Member

Comment 11 by bugdroid1@chromium.org, Nov 14 2017

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

commit 988b43d3c131f73b07db7186b8a01de7be568076
Author: Andrey Kraynov <iceman@yandex-team.ru>
Date: Tue Nov 14 12:25:06 2017

Replace calls of deprecated functions FirstPositionInOrBeforeNode

Use |const Node&| versions instead of deprecated ones.
Explicitly check for nullptr node value if we can't be sure about it.

No changes in behavior.

Bug: 766448
Change-Id: Id0a625da0d7d70f1d9f97a1fc1cf17ccddf1a2ec
Reviewed-on: https://chromium-review.googlesource.com/763632
Commit-Queue: Andrey Kraynov <iceman@yandex-team.ru>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516275}
[modify] https://crrev.com/988b43d3c131f73b07db7186b8a01de7be568076/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/988b43d3c131f73b07db7186b8a01de7be568076/third_party/WebKit/Source/core/editing/SelectionModifier.cpp
[modify] https://crrev.com/988b43d3c131f73b07db7186b8a01de7be568076/third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp
[modify] https://crrev.com/988b43d3c131f73b07db7186b8a01de7be568076/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
[modify] https://crrev.com/988b43d3c131f73b07db7186b8a01de7be568076/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
[modify] https://crrev.com/988b43d3c131f73b07db7186b8a01de7be568076/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 15 2017

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

commit 3accfc0b420fd982759568435f2683061b883d0f
Author: Andrey Kraynov <iceman@yandex-team.ru>
Date: Wed Nov 15 08:02:03 2017

Remove deprecated versions of {First,Last}PositionInOrBeforeNode()

Deprecated functions should not be used anywhere, so can be removed completely.
All call sites should use |const Node&| versions.
No changes in behavior.

Bug: 766448
Change-Id: I259eb183d37262419de338a5678ba907b9008681
Reviewed-on: https://chromium-review.googlesource.com/768676
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Andrey Kraynov <iceman@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#516633}
[modify] https://crrev.com/3accfc0b420fd982759568435f2683061b883d0f/third_party/WebKit/Source/core/editing/EditingUtilities.h
[modify] https://crrev.com/3accfc0b420fd982759568435f2683061b883d0f/third_party/WebKit/Source/core/editing/Position.cpp
[modify] https://crrev.com/3accfc0b420fd982759568435f2683061b883d0f/third_party/WebKit/Source/core/editing/Position.h
[modify] https://crrev.com/3accfc0b420fd982759568435f2683061b883d0f/third_party/WebKit/Source/core/layout/LayoutBox.cpp

Project Member

Comment 13 by bugdroid1@chromium.org, Nov 21 2017

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

commit 8a2b818ef66de678a6e09fa94238592616f4b501
Author: Andrey Kraynov <iceman@yandex-team.ru>
Date: Tue Nov 21 09:24:44 2017

Make NodeTraversal::HighestAncestorOrSelf function to take |const Node&|

This change makes HighestAncestorOrSelf consistent with the usages of other
traversal functions that take |const Node&|.
Also this helps to propagate constness for Node objects where possible.

Bug: 766448
Change-Id: If09e01f559c511b0888c749772b03c5f290b7db7
Reviewed-on: https://chromium-review.googlesource.com/776853
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518190}
[modify] https://crrev.com/8a2b818ef66de678a6e09fa94238592616f4b501/third_party/WebKit/Source/core/dom/NodeTraversal.h

Project Member

Comment 14 by bugdroid1@chromium.org, Nov 22 2017

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

commit d2d6ee9c44327d3f4518dbc904f8c7d4aa4128af
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Wed Nov 22 00:35:41 2017

Sanitize function parameters when calculating InlineBoxPosition for text

This patch changes a parameter type of the following two functions from
|LayoutObject*| to |const LayoutText*| because they are only called with
|const LayoutText*|:

- ComputeInlineBoxPositionForTextNode()
- SearchAheadForBetterMatch()

Bug: 766448
Change-Id: If964b56061a38b49bf95b1504fcf9804c0be8211
Reviewed-on: https://chromium-review.googlesource.com/783810
Reviewed-by: Ryan Landay <rlanday@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518474}
[modify] https://crrev.com/d2d6ee9c44327d3f4518dbc904f8c7d4aa4128af/third_party/WebKit/Source/core/editing/InlineBoxPosition.cpp

Project Member

Comment 15 by bugdroid1@chromium.org, Nov 23 2017

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

commit 8f335464a63d2401ebb137a605249a140f960e92
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Thu Nov 23 00:33:15 2017

Change HasRenderedNonAnonymousDescendantsWithHeight to take const Node*

Bug: 766448
Change-Id: I38169a93624b85c7efe033913e92f53791345d50
Reviewed-on: https://chromium-review.googlesource.com/786633
Reviewed-by: Ryan Landay <rlanday@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518814}
[modify] https://crrev.com/8f335464a63d2401ebb137a605249a140f960e92/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
[modify] https://crrev.com/8f335464a63d2401ebb137a605249a140f960e92/third_party/WebKit/Source/core/editing/VisibleUnits.h

Project Member

Comment 16 by bugdroid1@chromium.org, Nov 24 2017

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

commit a9a477c65c3648c6616bdb018f6a51d0b5163c85
Author: Andrey Kraynov <iceman@yandex-team.ru>
Date: Fri Nov 24 08:35:01 2017

Add const qualifier to EnclosingFormControlElement param and value.

It would be nice if EnclosingFormControlElement would work with
|const Node*| instead of just |Node*|.

No behavior changes.

Bug: 766448
Change-Id: Id97318869d0de32b5a737ecdb9b0ddbb79e40b04
Reviewed-on: https://chromium-review.googlesource.com/786013
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Commit-Queue: Andrey Kraynov <iceman@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#519068}
[modify] https://crrev.com/a9a477c65c3648c6616bdb018f6a51d0b5163c85/third_party/WebKit/Source/core/html/forms/HTMLFormControlElement.cpp
[modify] https://crrev.com/a9a477c65c3648c6616bdb018f6a51d0b5163c85/third_party/WebKit/Source/core/html/forms/HTMLFormControlElement.h

Project Member

Comment 17 by bugdroid1@chromium.org, Nov 27 2017

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

commit 37310781c1f78f986d5707225af5a3ac1fac89bd
Author: Andrey Kraynov <iceman@yandex-team.ru>
Date: Mon Nov 27 10:29:58 2017

Pass only const Node objects for EditingUtilities functons.

This patch trivially add const qualifier to Node objects where possible.

No behavior changes.

Bug: 766448
Change-Id: I570101b8532611edf1dc6b39357c037c868df287
Reviewed-on: https://chromium-review.googlesource.com/786154
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Andrey Kraynov <iceman@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#519267}
[modify] https://crrev.com/37310781c1f78f986d5707225af5a3ac1fac89bd/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/37310781c1f78f986d5707225af5a3ac1fac89bd/third_party/WebKit/Source/core/editing/EditingUtilities.h

Project Member

Comment 18 by bugdroid1@chromium.org, Nov 27 2017

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

commit 0834204dac37378347794a3d3275cfc6fe11eb35
Author: Andrey Kraynov <iceman@yandex-team.ru>
Date: Mon Nov 27 22:34:55 2017

Add const for Node objects in editing/iterators/.

Code in iterators/ never calls any non-const methods and it is possible
to make all Node/LayoutObjects objects const.

No behavour changes.

Bug: 766448
Change-Id: I344643ab0d5cf30285ef20c93dc4692dd082f2be
Reviewed-on: https://chromium-review.googlesource.com/785696
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Andrey Kraynov <iceman@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#519430}
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/Position.cpp
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/Position.h
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/WebSubstringUtil.mm
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/BackwardsCharacterIterator.cpp
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/CharacterIterator.cpp
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/CharacterIterator.h
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/FullyClippedStateStack.cpp
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/FullyClippedStateStack.h
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.h
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/TextIterator.h
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.cpp
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextNodeHandler.h
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.cpp
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/iterators/TextIteratorTextState.h
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
[modify] https://crrev.com/0834204dac37378347794a3d3275cfc6fe11eb35/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h

Project Member

Comment 19 by bugdroid1@chromium.org, Nov 30 2017

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

commit a81a983bff83a24285f7a88e43acfac193d64dd2
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Thu Nov 30 07:33:38 2017

Change InlineBoxPosition and RenderedPosition to store const pointers

This patch changes the two classes to store const pointers since they
are just helper classes to inspect the appearance of relevant objects.

Bug: 766448
Change-Id: I078539ae191daccd29ca61d0777175367783d3b4
Reviewed-on: https://chromium-review.googlesource.com/797947
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@{#520468}
[modify] https://crrev.com/a81a983bff83a24285f7a88e43acfac193d64dd2/third_party/WebKit/Source/core/editing/InlineBoxPosition.h
[modify] https://crrev.com/a81a983bff83a24285f7a88e43acfac193d64dd2/third_party/WebKit/Source/core/editing/RenderedPosition.cpp
[modify] https://crrev.com/a81a983bff83a24285f7a88e43acfac193d64dd2/third_party/WebKit/Source/core/editing/RenderedPosition.h
[modify] https://crrev.com/a81a983bff83a24285f7a88e43acfac193d64dd2/third_party/WebKit/Source/core/editing/SelectionModifier.cpp
[modify] https://crrev.com/a81a983bff83a24285f7a88e43acfac193d64dd2/third_party/WebKit/Source/core/editing/SelectionModifierCharacter.cpp
[modify] https://crrev.com/a81a983bff83a24285f7a88e43acfac193d64dd2/third_party/WebKit/Source/core/editing/SelectionModifierWord.cpp
[modify] https://crrev.com/a81a983bff83a24285f7a88e43acfac193d64dd2/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
[modify] https://crrev.com/a81a983bff83a24285f7a88e43acfac193d64dd2/third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp

Project Member

Comment 21 by bugdroid1@chromium.org, Apr 5 2018

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

commit ea997a662b83cad2bcb193826c8814ec74bf96e2
Author: Xiaocheng Hu <xiaochengh@chromium.org>
Date: Thu Apr 05 05:00:13 2018

Make InlineBoxPosition constructor take const parameter

Since InlineBoxPosition holds |const InlineBox*| member,
this patch changes its constructor to take const InlineBox
parameter for better code health.

Bug: 766448
Change-Id: Id7f188c5f5c626dc72e4d2e1ec799d14383230ad
Reviewed-on: https://chromium-review.googlesource.com/997111
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548330}
[modify] https://crrev.com/ea997a662b83cad2bcb193826c8814ec74bf96e2/third_party/WebKit/Source/core/editing/InlineBoxPosition.h

Sign in to add a comment