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

Issue 1041463003: Remove methods of TextIterator that take Range objects (Closed)

Created:
5 years, 8 months ago by hajimehoshi
Modified:
5 years, 8 months ago
Reviewers:
haraken
CC:
blink-reviews, blink-reviews-html_chromium.org, je_julie(Not used), aboxhall, blink-reviews-style_chromium.org, blink-reviews-events_chromium.org, sof, eae+blinkwatch, nektarios, blink-reviews-dom_chromium.org, dglazkov+blink, dmazzoni, groby+blinkspell_chromium.org, rwlbuis, yosin_UTC9
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Remove methods of TextIterator that take Range objects This patch removes some methods of TextIterator which take Range objects. A Range object assumes that two positions are in the same DOM tree and this doesn't match 'selection for WebComponents' which will allow positions in different DOM trees. To use TextIterator in both the DOM tree and the composed tree, we need to eliminate methods which take Range objects. Now TextIterator works on a DOM tree. After commiting this patch, we are going to templatize TextIterator to accept another traversal strategy (ComposedTreeTraversal). This patch is result of collaboration work with yosin@chromium.org for selection of web components. We are going to add some features to this class for the composed tree. BUG=275851 TEST=n/a; No behavior changes. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192746

Patch Set 1 #

Total comments: 3

Patch Set 2 : Remove null checks for positions #

Patch Set 3 : Fix WebSubstringUtil.mm #

Patch Set 4 : Add assertions #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -70 lines) Patch
M Source/core/dom/DocumentMarkerController.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/editing/ApplyStyleCommand.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/editing/PlainTextRange.cpp View 2 chunks +4 lines, -3 lines 0 comments Download
M Source/core/editing/TextCheckingHelper.cpp View 5 chunks +5 lines, -5 lines 0 comments Download
M Source/core/editing/VisibleUnits.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/editing/htmlediting.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/editing/iterators/CharacterIterator.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/editing/iterators/TextIterator.h View 2 chunks +0 lines, -2 lines 0 comments Download
M Source/core/editing/iterators/TextIterator.cpp View 1 2 3 4 chunks +3 lines, -45 lines 0 comments Download
M Source/core/editing/iterators/TextIteratorTest.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLTextFormControlElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/page/EventHandler.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/accessibility/AXLayoutObject.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/web/WebLocalFrameImpl.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/web/mac/WebSubstringUtil.mm View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 21 (9 generated)
hajimehoshi
PTAL
5 years, 8 months ago (2015-03-30 06:29:12 UTC) #2
haraken
LGTM https://codereview.chromium.org/1041463003/diff/1/Source/core/editing/iterators/TextIterator.cpp File Source/core/editing/iterators/TextIterator.cpp (right): https://codereview.chromium.org/1041463003/diff/1/Source/core/editing/iterators/TextIterator.cpp#newcode108 Source/core/editing/iterators/TextIterator.cpp:108: if (start.isNull() || end.isNull()) Why do we need ...
5 years, 8 months ago (2015-03-30 07:34:28 UTC) #3
hajimehoshi
Thank you! https://codereview.chromium.org/1041463003/diff/1/Source/core/editing/iterators/TextIterator.cpp File Source/core/editing/iterators/TextIterator.cpp (right): https://codereview.chromium.org/1041463003/diff/1/Source/core/editing/iterators/TextIterator.cpp#newcode108 Source/core/editing/iterators/TextIterator.cpp:108: if (start.isNull() || end.isNull()) On 2015/03/30 07:34:28, ...
5 years, 8 months ago (2015-03-30 07:40:56 UTC) #4
hajimehoshi
On 2015/03/30 07:40:56, hajimehoshi wrote: > Thank you! > > https://codereview.chromium.org/1041463003/diff/1/Source/core/editing/iterators/TextIterator.cpp > File Source/core/editing/iterators/TextIterator.cpp (right): ...
5 years, 8 months ago (2015-03-30 07:41:32 UTC) #5
hajimehoshi
Let me check what tests fail and if I can fix those.
5 years, 8 months ago (2015-03-30 07:44:36 UTC) #6
hajimehoshi
https://codereview.chromium.org/1041463003/diff/1/Source/core/editing/iterators/TextIterator.cpp File Source/core/editing/iterators/TextIterator.cpp (right): https://codereview.chromium.org/1041463003/diff/1/Source/core/editing/iterators/TextIterator.cpp#newcode108 Source/core/editing/iterators/TextIterator.cpp:108: if (start.isNull() || end.isNull()) On 2015/03/30 07:40:56, hajimehoshi wrote: ...
5 years, 8 months ago (2015-03-30 07:51:15 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1041463003/20001
5 years, 8 months ago (2015-03-30 07:51:31 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_compile_dbg on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/mac_blink_compile_dbg/builds/40044)
5 years, 8 months ago (2015-03-30 08:04:41 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1041463003/40001
5 years, 8 months ago (2015-03-30 08:11:12 UTC) #15
haraken
It would be a good idea to add ASSERT(!start.isNull()) and ASSERT(!start.isNull()).
5 years, 8 months ago (2015-03-30 08:47:31 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1041463003/60001
5 years, 8 months ago (2015-03-30 08:59:31 UTC) #20
commit-bot: I haz the power
5 years, 8 months ago (2015-03-30 10:10:47 UTC) #21
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=192746

Powered by Google App Engine
This is Rietveld 408576698