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

Issue 2949763002: Introduce Position constructor with const Node& (Closed)

Created:
3 years, 6 months ago by yosin_UTC9
Modified:
3 years, 6 months ago
Reviewers:
yoichio, Xiaocheng
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce Position constructor taking const Node& This patch introduces |Position| constructor taking |const Node&| to avoid to use |const_cast<Node*>()| for improving code health. This patch also changes |Position| constructor taking |Node*| to |const Node*| to avoid |const_cast| in |const Node&| |Position| constructor. BUG=734849 TEST=n/a; no behavior changes Review-Url: https://codereview.chromium.org/2949763002 Cr-Commit-Position: refs/heads/master@{#481128} Committed: https://chromium.googlesource.com/chromium/src/+/638c26b1f1ba5238cbf4d72075477ab38b15376f

Patch Set 1 : 2017-06-20T13:43:23 #

Total comments: 2

Patch Set 2 : 2017-06-21T13:23:13 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -17 lines) Patch
M third_party/WebKit/Source/core/editing/PlainTextRange.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/editing/Position.h View 1 2 chunks +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/Position.cpp View 1 2 chunks +11 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionEditor.cpp View 2 chunks +5 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListImpl.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (12 generated)
yosin_UTC9
PTAL
3 years, 6 months ago (2017-06-20 06:53:16 UTC) #5
Xiaocheng
https://codereview.chromium.org/2949763002/diff/1/third_party/WebKit/Source/core/editing/Position.cpp File third_party/WebKit/Source/core/editing/Position.cpp (right): https://codereview.chromium.org/2949763002/diff/1/third_party/WebKit/Source/core/editing/Position.cpp#newcode118 third_party/WebKit/Source/core/editing/Position.cpp:118: : anchor_node_(const_cast<Node*>(anchor_node)), I'm not a fan of this... It ...
3 years, 6 months ago (2017-06-20 17:58:10 UTC) #8
yosin_UTC9
PTAL Add TODO about [1]. [1] 735327 ⚐ Position should hold const Node instead of ...
3 years, 6 months ago (2017-06-21 04:27:02 UTC) #11
Xiaocheng
lgtm
3 years, 6 months ago (2017-06-21 04:39:40 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/2949763002/20001
3 years, 6 months ago (2017-06-21 04:53:38 UTC) #15
commit-bot: I haz the power
3 years, 6 months ago (2017-06-21 06:45:38 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/638c26b1f1ba5238cbf4d7207547...

Powered by Google App Engine
This is Rietveld 408576698