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

Issue 1000533004: Move implementation of Range::firstNode and Range::pastLastNode to Position (Closed)

Created:
5 years, 9 months ago by yosin_UTC9
Modified:
5 years, 7 months ago
Reviewers:
tkent, sof
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, sof, eae+blinkwatch, rwlbuis, hajimehoshi
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Move implementations of Range::firstNode and Range::pastLastNode to Position This patch move implementations of |Range::firstNode()| and |Range::pastLastNode()| to |Position| class to use them via |Position| object rather than creating |Range| object to use |TextIterator| class and |createMarkup()| function via |Position| rather than |Range| to avoid creating temporary |Range| objects, for |document.execCommand("copy"). This patch is a preparation of using composed tree for selection. BUG=275851 TEST=n/a; no behavior changes Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191892

Patch Set 1 : 2015-03-13T16:48:34 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -12 lines) Patch
M Source/core/dom/Position.h View 2 chunks +16 lines, -0 lines 0 comments Download
M Source/core/dom/Position.cpp View 2 chunks +36 lines, -0 lines 0 comments Download
M Source/core/dom/Range.cpp View 2 chunks +2 lines, -12 lines 1 comment Download

Messages

Total messages: 9 (4 generated)
yosin_UTC9
PTAL P.S. Linux bot failures aren't related to this patch.
5 years, 9 months ago (2015-03-13 09:21:56 UTC) #3
tkent
lgtm
5 years, 9 months ago (2015-03-13 09:34:11 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1000533004/20001
5 years, 9 months ago (2015-03-16 01:10:15 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:20001) as https://src.chromium.org/viewvc/blink?view=rev&revision=191892
5 years, 9 months ago (2015-03-16 04:20:54 UTC) #7
sof
5 years, 7 months ago (2015-05-05 08:23:23 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/1000533004/diff/20001/Source/core/dom/Range.cpp
File Source/core/dom/Range.cpp (right):

https://codereview.chromium.org/1000533004/diff/20001/Source/core/dom/Range.c...
Source/core/dom/Range.cpp:1417: return
startPosition().toOffsetInAnchor().nodeAsRangeFirstNode();
Is this a meaning-preserving transformation - what if the start node doesn't
have an anchor?

All uses of Range::firstNode() currently crash as a result - addressing via
https://codereview.chromium.org/1121633004/

Powered by Google App Engine
This is Rietveld 408576698