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

Issue 2161373002: Make FrameCaret to retrieve caret position from SelectionEditor (Closed)

Created:
4 years, 5 months ago by yosin_UTC9
Modified:
4 years, 5 months ago
Reviewers:
yoichio
CC:
blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make FrameCaret to retrieve caret position from SelectionEditor This patch makes |FrameCaret| to use caret position from |SelectionEditor| instead of holding caret position in |FrameCaret| to get rid of code of maintaining caret position between |FrameCaret| and |SelectionEditor| synchronize for improving code health. The root cause of crbug.com/628520 is missing synchronization code in |FrameSelection::updateIfNeeded()|. This patch is simpler than adding synchronization code in |FrameSelection::updateIfNeeded()|. BUG=628520 TEST=run_webkit_unit_tests --gtest_filter=FrameSelectionTest.updateIfNeededAndFrameCaret Committed: https://crrev.com/ec7e0ef4bfdb8f0cd0c9a45ed9d45755d9a3c684 Cr-Commit-Position: refs/heads/master@{#406792}

Patch Set 1 : 2016-07-20T13:32:26 #

Total comments: 2

Patch Set 2 : 2016-07-20T18:26:24 #

Total comments: 6

Patch Set 3 : 2016-07-21T11:26:04 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -45 lines) Patch
M third_party/WebKit/Source/core/editing/FrameCaret.h View 2 chunks +11 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameCaret.cpp View 11 chunks +27 lines, -26 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelection.cpp View 3 chunks +4 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp View 1 2 3 chunks +28 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (16 generated)
yosin_UTC9
PTAL
4 years, 5 months ago (2016-07-20 08:27:44 UTC) #7
yoichio
https://codereview.chromium.org/2161373002/diff/1/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp File third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp (right): https://codereview.chromium.org/2161373002/diff/1/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp#newcode287 third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp:287: setSelection(VisibleSelection(Position(sample, 0))); Confirm selection().start() and caretPosition().position() is not null ...
4 years, 5 months ago (2016-07-20 09:10:06 UTC) #8
yosin_UTC9
PTAL Update test case. https://codereview.chromium.org/2161373002/diff/1/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp File third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp (right): https://codereview.chromium.org/2161373002/diff/1/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp#newcode287 third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp:287: setSelection(VisibleSelection(Position(sample, 0))); On 2016/07/20 at ...
4 years, 5 months ago (2016-07-20 09:27:33 UTC) #11
yoichio
https://codereview.chromium.org/2161373002/diff/20001/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp File third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp (right): https://codereview.chromium.org/2161373002/diff/20001/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp#newcode288 third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp:288: EXPECT_EQ(Position(document().body(), 0), selection().start()); Add EXPECT_EQ( selection().start()), caretPosition().position())). https://codereview.chromium.org/2161373002/diff/20001/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp#newcode292 third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp:292: ...
4 years, 5 months ago (2016-07-21 01:51:57 UTC) #14
yosin_UTC9
PTAL Update a test case to add EXPEC_EQ(selection().start(), caretPosition().position()); https://codereview.chromium.org/2161373002/diff/20001/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp File third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp (right): https://codereview.chromium.org/2161373002/diff/20001/third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp#newcode288 third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp:288: ...
4 years, 5 months ago (2016-07-21 02:27:42 UTC) #17
yoichio
lgtm
4 years, 5 months ago (2016-07-21 04:52:46 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/2161373002/40001
4 years, 5 months ago (2016-07-21 05:37:25 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 5 months ago (2016-07-21 07:07:58 UTC) #23
commit-bot: I haz the power
4 years, 5 months ago (2016-07-21 07:10:46 UTC) #25
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ec7e0ef4bfdb8f0cd0c9a45ed9d45755d9a3c684
Cr-Commit-Position: refs/heads/master@{#406792}

Powered by Google App Engine
This is Rietveld 408576698