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

Issue 2723133004: Get rid of redundant member variable SelectionEditor::m_logicalRange (Closed)

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

Description

Make FrameSeelction::firstRange to return proper range This patch makes |FrameSeelction::firstRange()| to return proper range instead of the range specified by |FrameSelection::setSelectedRange()|. Before this patch, |FrameSelection::firstRange()| returns the range we called "logical range" introduced by patch[1], which mitigated some situation but it is incomplete. Patch[2] introduced complete solution and compatible with the specification[3]. This patch is follow-up of patch[2] to remove "logical range" from Blink since cached |Range| supersedes "logical range". [1] crrev.com/196553003: Let FrameSelection remember the last Range set by Range.addRange() [2] crrev.com/2653523003: Make DOMSelection cache Range [3] https://www.w3.org/TR/selection-api/ BUG=693557 TEST=webkit_unit_tests --gtest_filter=FrameSelectionTest.FirstRange Review-Url: https://codereview.chromium.org/2723133004 Cr-Commit-Position: refs/heads/master@{#454831} Committed: https://chromium.googlesource.com/chromium/src/+/67adef739b13e794850c228f3677dd75614958c1

Patch Set 1 : 2017-03-02T18:01:04 #

Total comments: 3

Patch Set 2 : 2017-03-03T19:30:02 #

Total comments: 1

Patch Set 3 : 2017-03-06T13:02:21 rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -36 lines) Patch
M third_party/WebKit/Source/core/editing/FrameSelection.cpp View 2 chunks +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp View 1 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionEditor.h View 2 chunks +0 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/editing/SelectionEditor.cpp View 1 2 4 chunks +0 lines, -20 lines 0 comments Download

Messages

Total messages: 32 (18 generated)
yosin_UTC9
PTAL
3 years, 9 months ago (2017-03-02 10:18:41 UTC) #5
Xiaocheng
I still don't understand why this patch is "no behavior changes"... Could you clarify why ...
3 years, 9 months ago (2017-03-02 20:34:24 UTC) #9
yoichio
https://codereview.chromium.org/2723133004/diff/1/third_party/WebKit/Source/core/editing/SelectionEditor.cpp File third_party/WebKit/Source/core/editing/SelectionEditor.cpp (left): https://codereview.chromium.org/2723133004/diff/1/third_party/WebKit/Source/core/editing/SelectionEditor.cpp#oldcode370 third_party/WebKit/Source/core/editing/SelectionEditor.cpp:370: return m_logicalRange->cloneRange(); Could you proof logically m_logicalRange == firstRangeOf(computeVisibleSelectionInDOMTree()) ...
3 years, 9 months ago (2017-03-03 01:54:20 UTC) #10
yosin_UTC9
On 2017/03/02 at 20:34:24, xiaochengh wrote: > I still don't understand why this patch is ...
3 years, 9 months ago (2017-03-03 02:27:17 UTC) #11
Xiaocheng
On 2017/03/03 at 02:27:17, yosin wrote: > On 2017/03/02 at 20:34:24, xiaochengh wrote: > > ...
3 years, 9 months ago (2017-03-03 03:06:09 UTC) #12
yosin_UTC9
On 2017/03/03 at 03:06:09, xiaochengh wrote: > On 2017/03/03 at 02:27:17, yosin wrote: > > ...
3 years, 9 months ago (2017-03-03 04:27:31 UTC) #13
yosin_UTC9
PTAL Add test for checking return value of FrameSelection::firstRange(), which is range of current VisibleSelection. ...
3 years, 9 months ago (2017-03-03 10:35:15 UTC) #16
yosin_UTC9
https://codereview.chromium.org/2723133004/diff/20001/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp File third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp (right): https://codereview.chromium.org/2723133004/diff/20001/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp#newcode70 third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp:70: EXPECT_EQ(Position(sample->nextSibling(), 0), range->startPosition()) Before this patch: range->startPosition() == "0123456890@3 ...
3 years, 9 months ago (2017-03-03 10:36:18 UTC) #17
Xiaocheng
So the current behavior is actually buggy... Please update the patch description to emphasize that, ...
3 years, 9 months ago (2017-03-03 17:23:05 UTC) #18
yoichio
lgtm
3 years, 9 months ago (2017-03-06 01:56:00 UTC) #19
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/2723133004/20001
3 years, 9 months ago (2017-03-06 03:22:38 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/164954) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 9 months ago (2017-03-06 03:24:32 UTC) #24
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/2723133004/40001
3 years, 9 months ago (2017-03-06 04:03:30 UTC) #29
commit-bot: I haz the power
3 years, 9 months ago (2017-03-06 05:35:12 UTC) #32
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/67adef739b13e794850c228f3677...

Powered by Google App Engine
This is Rietveld 408576698