Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Issue 2950053002: Make Position::BeforeNode() to take const Node& instead of Node* (Closed)

Created:
3 years, 6 months ago by yosin_UTC9
Modified:
3 years, 6 months ago
Reviewers:
tkent
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make Position::BeforeNode() to take const Node& instead of Node* This patch makes |Position::BeforeNode()| to take |const Node&| instead of |Node*| since |Node| parameter can not be nullptr for improving code health. This patch also changes |Position| constructor with |PositionAnchorType| to take |const Node*| to reduce using |const_cast<Node*>()|. This patch is a preparation of make |Position| to hold |const Node&|[1] [1] http://crbug.com/735327 Position should hold const Node instead of Node BUG=734849 TEST=n/a; no behavior changes Review-Url: https://codereview.chromium.org/2950053002 Cr-Commit-Position: refs/heads/master@{#481342} Committed: https://chromium.googlesource.com/chromium/src/+/f4c484ebaecb7e0e8b7135838b3e29f56cfe04fb

Patch Set 1 : 2017-06-21T17:56:36 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -80 lines) Patch
M third_party/WebKit/Source/core/dom/Range.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EditingUtilities.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/Position.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/Position.cpp View 4 chunks +11 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/editing/PositionIterator.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/PositionIteratorTest.cpp View 12 chunks +12 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/editing/PositionTest.cpp View 3 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp View 5 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionController.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionControllerTest.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionModifier.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/VisiblePosition.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleSelection.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleSelectionTest.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleUnitsParagraph.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleUnitsTest.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/ApplyBlockElementCommand.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/BreakBlockquoteCommand.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/commands/InsertListCommand.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/serializers/Serialization.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/TextControlElement.cpp View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (13 generated)
yosin_UTC9
PTAL Including core/dom, core/editing, and core/html Almost machinally s/:BeforeNode(/:BeforeNode(*/
3 years, 6 months ago (2017-06-21 09:32:52 UTC) #6
tkent
lgtm
3 years, 6 months ago (2017-06-21 22:47:06 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2950053002/1
3 years, 6 months ago (2017-06-21 22:47:25 UTC) #13
commit-bot: I haz the power
3 years, 6 months ago (2017-06-21 22:53:51 UTC) #17
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/f4c484ebaecb7e0e8b7135838b3e...

Powered by Google App Engine
This is Rietveld 408576698