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

Issue 1191283002: Make VisiblePosition::init to not use being constructed object (Closed)

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

Description

Make VisiblePosition::init not to use being constructed object Before this patch, |VisiblePosition::init()|, which is called by constructor, used constructing object with |inSameLine()|. This pattern prevents us to make |VisiblePostion| to work with composed tree. This patch mitigates this issue by making |inSameLine()| and functions used by |inSameLine| to take |PositionWithAffinity| instead of |VisiblePosition|. Since |VisiblePosition::init()| calls |inSameLine()| with |this| pointer, all functions called |inSameLine()| can't uses |VisiblePosition|. This is reason why this patch changes following functions at once: - inSameLine - honorEditingBoundaryAtOrBeforeOf - startOfLine This patch is result of collaboration work with hajimehoshi@chromium.org for selection of web components. After this patch, we are going to implement another strategies for the composed tree. We've already prepared that at http://crrev.com/1106433002. BUG=275851 TEST=n/a; No behavior changes. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197558

Patch Set 1 #

Patch Set 2 : 2015-06-19T18:45:18 Copy missing logic from all-in-one #

Patch Set 3 : 2015-06-22T15:06:30 Change for float-list-changed-before-layout-crash.html #

Total comments: 2

Patch Set 4 : 2015-06-22T15:52:58 Make PositionWithAffinity::operator==() to check null position #

Total comments: 2

Patch Set 5 : 2015-06-22T16:23:26 Add a comment to PositionWIthAffinity::operator==() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -26 lines) Patch
M Source/core/editing/PositionWithAffinity.h View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M Source/core/editing/PositionWithAffinity.cpp View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M Source/core/editing/VisiblePosition.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/editing/VisiblePosition.cpp View 1 2 3 chunks +23 lines, -9 lines 0 comments Download
M Source/core/editing/VisibleUnits.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/editing/VisibleUnits.cpp View 1 2 4 chunks +36 lines, -17 lines 0 comments Download

Messages

Total messages: 14 (5 generated)
yosin_UTC9
PTAL
5 years, 6 months ago (2015-06-19 09:06:53 UTC) #2
yosin_UTC9
Looking for layout test failure... :-<
5 years, 6 months ago (2015-06-19 11:52:14 UTC) #3
yosin_UTC9
PTAL
5 years, 6 months ago (2015-06-22 06:11:07 UTC) #6
tkent
https://codereview.chromium.org/1191283002/diff/40001/Source/core/editing/PositionWithAffinity.cpp File Source/core/editing/PositionWithAffinity.cpp (right): https://codereview.chromium.org/1191283002/diff/40001/Source/core/editing/PositionWithAffinity.cpp#newcode31 Source/core/editing/PositionWithAffinity.cpp:31: return m_affinity == other.m_affinity && m_position == other.m_position; So, ...
5 years, 6 months ago (2015-06-22 06:24:55 UTC) #7
yosin_UTC9
PTAL https://codereview.chromium.org/1191283002/diff/40001/Source/core/editing/PositionWithAffinity.cpp File Source/core/editing/PositionWithAffinity.cpp (right): https://codereview.chromium.org/1191283002/diff/40001/Source/core/editing/PositionWithAffinity.cpp#newcode31 Source/core/editing/PositionWithAffinity.cpp:31: return m_affinity == other.m_affinity && m_position == other.m_position; ...
5 years, 6 months ago (2015-06-22 06:55:08 UTC) #8
tkent
lgtm https://codereview.chromium.org/1191283002/diff/60001/Source/core/editing/PositionWithAffinity.cpp File Source/core/editing/PositionWithAffinity.cpp (right): https://codereview.chromium.org/1191283002/diff/60001/Source/core/editing/PositionWithAffinity.cpp#newcode31 Source/core/editing/PositionWithAffinity.cpp:31: if (isNull()) Please document this in PositionWithAffinity.h.
5 years, 6 months ago (2015-06-22 07:04:59 UTC) #9
yosin_UTC9
Thanks! Committing... https://codereview.chromium.org/1191283002/diff/60001/Source/core/editing/PositionWithAffinity.cpp File Source/core/editing/PositionWithAffinity.cpp (right): https://codereview.chromium.org/1191283002/diff/60001/Source/core/editing/PositionWithAffinity.cpp#newcode31 Source/core/editing/PositionWithAffinity.cpp:31: if (isNull()) On 2015/06/22 07:04:59, tkent wrote: ...
5 years, 6 months ago (2015-06-22 07:25:35 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1191283002/80001
5 years, 6 months ago (2015-06-22 07:25:53 UTC) #13
commit-bot: I haz the power
5 years, 6 months ago (2015-06-22 08:44:02 UTC) #14
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197558

Powered by Google App Engine
This is Rietveld 408576698