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

Issue 2354893002: Introduce VisiblePosition::isValid (Closed)

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

Description

Introduce VisiblePosition::isValid In general, functions taking VisiblePosition parameters must be called in clean layout and before any DOM mutation. This patch introduces VisiblePosition::isValid to check this. This patch is a preparation for pruning createVisiblePositionDeprecated. BUG=647219 Committed: https://crrev.com/b18b9565248f6074c188ee3eb3e50528ccc89ed4 Cr-Commit-Position: refs/heads/master@{#420024}

Patch Set 1 #

Patch Set 2 : Revise tests #

Patch Set 3 : Fix compile error... #

Patch Set 4 : Further fix compile... #

Total comments: 10

Patch Set 5 : Add style change unit test, which currently fails... #

Patch Set 6 : Use Document::styleVersion #

Patch Set 7 : Remove TODO from unit test.. #

Total comments: 4

Patch Set 8 : 201609211817 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -8 lines) Patch
M third_party/WebKit/Source/core/editing/FrameSelection.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisiblePosition.h View 1 2 3 4 5 6 7 2 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisiblePosition.cpp View 1 2 3 4 5 2 chunks +21 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisiblePositionTest.cpp View 1 2 3 4 5 6 2 chunks +65 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleUnits.cpp View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 44 (31 generated)
Xiaocheng
PTAL.
4 years, 3 months ago (2016-09-20 13:40:03 UTC) #17
yosin_UTC9
https://codereview.chromium.org/2354893002/diff/60001/third_party/WebKit/Source/core/editing/VisiblePosition.cpp File third_party/WebKit/Source/core/editing/VisiblePosition.cpp (right): https://codereview.chromium.org/2354893002/diff/60001/third_party/WebKit/Source/core/editing/VisiblePosition.cpp#newcode49 third_party/WebKit/Source/core/editing/VisiblePosition.cpp:49: : m_domTreeVersion(0) We also need to track |Document::styleTreeVersion()|, e.g. ...
4 years, 3 months ago (2016-09-20 13:55:52 UTC) #18
Xiaocheng
https://codereview.chromium.org/2354893002/diff/60001/third_party/WebKit/Source/core/editing/VisiblePosition.cpp File third_party/WebKit/Source/core/editing/VisiblePosition.cpp (right): https://codereview.chromium.org/2354893002/diff/60001/third_party/WebKit/Source/core/editing/VisiblePosition.cpp#newcode49 third_party/WebKit/Source/core/editing/VisiblePosition.cpp:49: : m_domTreeVersion(0) On 2016/09/20 at 13:55:51, Yosi_UTC9 wrote: > ...
4 years, 3 months ago (2016-09-21 06:31:49 UTC) #23
yosin_UTC9
On 2016/09/21 at 06:31:49, xiaochengh wrote: > https://codereview.chromium.org/2354893002/diff/60001/third_party/WebKit/Source/core/editing/VisiblePosition.cpp > File third_party/WebKit/Source/core/editing/VisiblePosition.cpp (right): > > https://codereview.chromium.org/2354893002/diff/60001/third_party/WebKit/Source/core/editing/VisiblePosition.cpp#newcode49 ...
4 years, 3 months ago (2016-09-21 07:37:50 UTC) #24
Xiaocheng
On 2016/09/21 at 07:37:50, yosin wrote: > On 2016/09/21 at 06:31:49, xiaochengh wrote: > > ...
4 years, 3 months ago (2016-09-21 08:27:44 UTC) #29
yosin_UTC9
lgtm w/ small nits Thanks for this patch! This is the first step toward deprecating ...
4 years, 3 months ago (2016-09-21 08:48:42 UTC) #30
Xiaocheng
https://codereview.chromium.org/2354893002/diff/120001/third_party/WebKit/Source/core/editing/VisiblePosition.h File third_party/WebKit/Source/core/editing/VisiblePosition.h (right): https://codereview.chromium.org/2354893002/diff/120001/third_party/WebKit/Source/core/editing/VisiblePosition.h#newcode85 third_party/WebKit/Source/core/editing/VisiblePosition.h:85: bool isNull() const { return m_positionWithAffinity.isNull(); } On 2016/09/21 ...
4 years, 3 months ago (2016-09-21 09:04:24 UTC) #31
yosin_UTC9
On 2016/09/21 at 09:04:24, xiaochengh wrote: > https://codereview.chromium.org/2354893002/diff/120001/third_party/WebKit/Source/core/editing/VisiblePosition.h > File third_party/WebKit/Source/core/editing/VisiblePosition.h (right): > > https://codereview.chromium.org/2354893002/diff/120001/third_party/WebKit/Source/core/editing/VisiblePosition.h#newcode85 ...
4 years, 3 months ago (2016-09-21 09:10:01 UTC) #32
Xiaocheng
On 2016/09/21 at 09:10:01, yosin wrote: > On 2016/09/21 at 09:04:24, xiaochengh wrote: > > ...
4 years, 3 months ago (2016-09-21 09:24:44 UTC) #35
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/2354893002/140001
4 years, 3 months ago (2016-09-21 10:41:05 UTC) #40
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 3 months ago (2016-09-21 10:45:53 UTC) #41
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/b18b9565248f6074c188ee3eb3e50528ccc89ed4 Cr-Commit-Position: refs/heads/master@{#420024}
4 years, 3 months ago (2016-09-21 10:49:20 UTC) #43
ymalik
4 years, 3 months ago (2016-09-21 16:01:54 UTC) #44
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in
https://codereview.chromium.org/2357143003/ by ymalik@chromium.org.

The reason for reverting is: I suspect that this is breaking the Webkit Mac10.11
builder
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.11%20(db...
crbug.com/648990).

Powered by Google App Engine
This is Rietveld 408576698