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

Issue 2875253002: Introduce Position::IsEquivalent() (Closed)

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

Description

Introduce Position::IsEquivalent() This patch introduces |Position::IsEquivalent()| to check whether two positions are in same position regardless anchor type, e.g. |Position(node, 0)| and |Position::FirstPositionInNode(node)|. denote a position before first child of |node|. This patch is a preparation of patch[1]. [1] http://crrev.com/2875933004: Utilize Position::IsEquivalent() in {Up,Down}streamIgnoringEditingBoundaries() BUG=716093, 719343 TEST=run_webkit_unit_tests --gtest_filter=PositionTest.IsEquivalent Review-Url: https://codereview.chromium.org/2875253002 Cr-Commit-Position: refs/heads/master@{#471689} Committed: https://chromium.googlesource.com/chromium/src/+/4aee85c54527cbd0857b07d6dc4699465f55a18f

Patch Set 1 : 2017-05-12T16:40:51 #

Patch Set 2 : 2017-05-12T17:24:00 #

Total comments: 4

Patch Set 3 : 2017-05-15T13:06:34 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -0 lines) Patch
M third_party/WebKit/Source/core/editing/Position.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/Position.cpp View 1 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/PositionTest.cpp View 1 2 1 chunk +27 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 28 (16 generated)
yosin_UTC9
PTAL This patch is a preparation of fixing Release-Blocker bug.
3 years, 7 months ago (2017-05-12 09:25:25 UTC) #10
hugoh_UTC2
https://codereview.chromium.org/2875253002/diff/20001/third_party/WebKit/Source/core/editing/PositionTest.cpp File third_party/WebKit/Source/core/editing/PositionTest.cpp (right): https://codereview.chromium.org/2875253002/diff/20001/third_party/WebKit/Source/core/editing/PositionTest.cpp#newcode14 third_party/WebKit/Source/core/editing/PositionTest.cpp:14: SetBodyContent("<a id=sample>0<b>1</b>2</b>"); <b>2</b> ? Missing </a> ?
3 years, 7 months ago (2017-05-12 14:12:14 UTC) #12
yoichio
https://codereview.chromium.org/2875253002/diff/20001/third_party/WebKit/Source/core/editing/Position.cpp File third_party/WebKit/Source/core/editing/Position.cpp (right): https://codereview.chromium.org/2875253002/diff/20001/third_party/WebKit/Source/core/editing/Position.cpp#newcode359 third_party/WebKit/Source/core/editing/Position.cpp:359: return other.IsNull(); nlgtm because Nan != Nan generally.
3 years, 7 months ago (2017-05-15 01:43:05 UTC) #13
yosin_UTC9
PTAL https://codereview.chromium.org/2875253002/diff/20001/third_party/WebKit/Source/core/editing/Position.cpp File third_party/WebKit/Source/core/editing/Position.cpp (right): https://codereview.chromium.org/2875253002/diff/20001/third_party/WebKit/Source/core/editing/Position.cpp#newcode359 third_party/WebKit/Source/core/editing/Position.cpp:359: return other.IsNull(); On 2017/05/15 at 01:43:05, yoichio wrote: ...
3 years, 7 months ago (2017-05-15 04:08:15 UTC) #16
yoichio
> > nlgtm because Nan != Nan generally. > > IsNull() doesn't mean NaN. > ...
3 years, 7 months ago (2017-05-15 04:17:29 UTC) #17
yosin_UTC9
On 2017/05/15 at 04:17:29, yoichio wrote: > > > nlgtm because Nan != Nan generally. ...
3 years, 7 months ago (2017-05-15 05:10:22 UTC) #18
yoichio
lgtm
3 years, 7 months ago (2017-05-15 05:16:41 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/2875253002/40001
3 years, 7 months ago (2017-05-15 05:28:11 UTC) #22
yoichio
I think types introducing |compare()| should live in the sanctuary. Since generally |==| operator is ...
3 years, 7 months ago (2017-05-15 05:35:14 UTC) #23
yosin_UTC9
On 2017/05/15 at 05:35:14, yoichio wrote: > I think types introducing |compare()| should live in ...
3 years, 7 months ago (2017-05-15 06:45:55 UTC) #24
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/4aee85c54527cbd0857b07d6dc4699465f55a18f
3 years, 7 months ago (2017-05-15 07:35:24 UTC) #27
yoichio
3 years, 7 months ago (2017-05-15 09:09:24 UTC) #28
Message was sent while issue was closed.
Filed:
https://bugs.chromium.org/p/chromium/issues/detail?id=722234

Powered by Google App Engine
This is Rietveld 408576698