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

Issue 2432173005: Get rid of VisibleSelection::selectionFromContentsOfNode() (Closed)

Created:
4 years, 2 months ago by yosin_UTC9
Modified:
4 years, 2 months ago
Reviewers:
tkent, yoichio, Xiaocheng
CC:
blink-reviews, blink-reviews-style_chromium.org, chromium-reviews, dcheng, krit, f(malita), fs, groby+blinkspell_chromium.org, gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, timvolodine
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0 Cr-Commit-Position: refs/heads/master@{#426437}

Patch Set 1 : 2016-10-19T15:27:12 #

Patch Set 2 : 2016-10-19T15:43:34 #

Patch Set 3 : 2016-10-20T13:46:03 #

Total comments: 2

Patch Set 4 : 2016-10-20T17:14:18 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -36 lines) Patch
M third_party/WebKit/Source/core/editing/FrameSelection.cpp View 1 2 3 1 chunk +1 line, -7 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionController.cpp View 1 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionTemplate.h View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionTemplate.cpp View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleSelection.h View 1 2 3 1 chunk +1 line, -6 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleSelection.cpp View 1 2 3 1 chunk +0 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/page/DragController.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/UnsafeSVGAttributeSanitizationTest.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 27 (20 generated)
yosin_UTC9
PTAL Not only core/editing but also - core/page/DragController.cpp - core/svg/UnsafeSVGAttributeSanitizationTest.cpp
4 years, 2 months ago (2016-10-20 07:44:12 UTC) #18
Xiaocheng
lgtm https://codereview.chromium.org/2432173005/diff/40001/third_party/WebKit/Source/core/editing/VisibleSelection.cpp File third_party/WebKit/Source/core/editing/VisibleSelection.cpp (left): https://codereview.chromium.org/2432173005/diff/40001/third_party/WebKit/Source/core/editing/VisibleSelection.cpp#oldcode213 third_party/WebKit/Source/core/editing/VisibleSelection.cpp:213: DCHECK(!Strategy::editingIgnoresContent(node)); Can we keep this DCHECK in SelectionTemplate::Builder::selectAllChildren?
4 years, 2 months ago (2016-10-20 07:51:03 UTC) #19
tkent
lgtm
4 years, 2 months ago (2016-10-20 08:07:54 UTC) #20
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/2432173005/60001
4 years, 2 months ago (2016-10-20 08:31:04 UTC) #23
yosin_UTC9
Thanks for reviewing! Add DCHECK() to SelectionTemplate<T>::selectAllChildren() https://codereview.chromium.org/2432173005/diff/40001/third_party/WebKit/Source/core/editing/VisibleSelection.cpp File third_party/WebKit/Source/core/editing/VisibleSelection.cpp (left): https://codereview.chromium.org/2432173005/diff/40001/third_party/WebKit/Source/core/editing/VisibleSelection.cpp#oldcode213 third_party/WebKit/Source/core/editing/VisibleSelection.cpp:213: DCHECK(!Strategy::editingIgnoresContent(node)); On ...
4 years, 2 months ago (2016-10-20 08:35:34 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-10-20 09:52:43 UTC) #25
commit-bot: I haz the power
4 years, 2 months ago (2016-10-21 13:16:52 UTC) #27
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/95dd59cb1bf42824ce20e77c13b51b5d33dabef0
Cr-Commit-Position: refs/heads/master@{#426437}

Powered by Google App Engine
This is Rietveld 408576698