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

Issue 2123893002: Introduce class RelocatablePosition (Closed)

Created:
4 years, 5 months ago by Xiaocheng
Modified:
4 years, 5 months ago
Reviewers:
tkent, yosin_UTC9
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

Introduce class RelocatablePosition |RelocatablePosition| is a helper class for keeping track of a |Position| in a document upon DOM tree changes even if the given |Position|'s original anchor node is moved out of document. The class is implemented by using a temporary |Range| object to keep track of the |Position|, and disposing the |Range| when out of scope. |RelocatablePosition| will be used in editing code, for example: https://codereview.chromium.org/2127503002/ BUG=n/a TEST=webkit_unit_tests --gtest_filter=RelocatablePositionTest.position Committed: https://crrev.com/485ff73a6daeed372189a91ff19edb88ebea18b0 Cr-Commit-Position: refs/heads/master@{#403878}

Patch Set 1 #

Total comments: 6

Patch Set 2 : nits fixed #

Patch Set 3 : Add CORE_EXPORT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -0 lines) Patch
M third_party/WebKit/Source/core/core.gypi View 2 chunks +3 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/RelocatablePosition.h View 1 2 1 chunk +34 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/RelocatablePosition.cpp View 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/RelocatablePositionTest.cpp View 1 1 chunk +32 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 16 (7 generated)
Xiaocheng
PTAL.
4 years, 5 months ago (2016-07-06 07:43:38 UTC) #2
yosin_UTC9
lgtm w/ small nits https://codereview.chromium.org/2123893002/diff/1/third_party/WebKit/Source/core/editing/RelocatablePositionTest.cpp File third_party/WebKit/Source/core/editing/RelocatablePositionTest.cpp (right): https://codereview.chromium.org/2123893002/diff/1/third_party/WebKit/Source/core/editing/RelocatablePositionTest.cpp#newcode17 third_party/WebKit/Source/core/editing/RelocatablePositionTest.cpp:17: const char* bodyContent = "<b>foo</b><textarea>bar</textarea>"; ...
4 years, 5 months ago (2016-07-06 07:48:19 UTC) #3
tkent
lgtm
4 years, 5 months ago (2016-07-06 07:50:25 UTC) #4
Xiaocheng
Thanks for your review! https://codereview.chromium.org/2123893002/diff/1/third_party/WebKit/Source/core/editing/RelocatablePositionTest.cpp File third_party/WebKit/Source/core/editing/RelocatablePositionTest.cpp (right): https://codereview.chromium.org/2123893002/diff/1/third_party/WebKit/Source/core/editing/RelocatablePositionTest.cpp#newcode17 third_party/WebKit/Source/core/editing/RelocatablePositionTest.cpp:17: const char* bodyContent = "<b>foo</b><textarea>bar</textarea>"; ...
4 years, 5 months ago (2016-07-06 08:00:06 UTC) #6
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/2123893002/20001
4 years, 5 months ago (2016-07-06 08:00:16 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/92011)
4 years, 5 months ago (2016-07-06 08:27:20 UTC) #10
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/2123893002/40001
4 years, 5 months ago (2016-07-06 08:39:21 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 5 months ago (2016-07-06 09:58:49 UTC) #14
commit-bot: I haz the power
4 years, 5 months ago (2016-07-06 10:00:52 UTC) #16
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/485ff73a6daeed372189a91ff19edb88ebea18b0
Cr-Commit-Position: refs/heads/master@{#403878}

Powered by Google App Engine
This is Rietveld 408576698