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

Issue 1409073004: Return EphemeralRange from Editor::findRangeOfString.

Created:
5 years, 2 months ago by Andrey Kraynov
Modified:
5 years, 1 month ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, chromium-reviews, hayato
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Return EphemeralRange from Editor::findRangeOfString. It is possible to use EphemeralRange instead of allocating a Range object in Editor::find* functions. BUG=

Patch Set 1 #

Total comments: 15

Patch Set 2 : Use EphemeralRange in TextFinder class #

Patch Set 3 : Use assertion for nodes common ancestor #

Total comments: 8

Patch Set 4 : Extract text bounds collecting to a function #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -81 lines) Patch
M third_party/WebKit/Source/core/dom/Range.cpp View 1 2 3 2 chunks +8 lines, -38 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EditingUtilities.h View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EditingUtilities.cpp View 1 2 3 2 chunks +56 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/core/editing/Editor.h View 1 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/Editor.cpp View 1 2 3 3 chunks +59 lines, -39 lines 3 comments Download
M third_party/WebKit/Source/core/editing/EphemeralRange.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EphemeralRange.cpp View 1 2 3 2 chunks +25 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/TextFinder.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/TextFinder.cpp View 1 2 3 2 chunks +35 lines, -1 line 0 comments Download

Messages

Total messages: 16 (3 generated)
Andrey Kraynov
This is my attempt to use an EphemeralRange instead of Range objects in Editor find ...
5 years, 2 months ago (2015-10-21 11:20:40 UTC) #2
yosin_UTC9
On 2015/10/21 at 11:20:40, iceman wrote: > This is my attempt to use an EphemeralRange ...
5 years, 2 months ago (2015-10-22 02:26:43 UTC) #3
yosin_UTC9
Thanks for tackling this! My refactoring reaped low handing fruits. ;-P https://codereview.chromium.org/1409073004/diff/1/third_party/WebKit/Source/core/editing/Editor.cpp File third_party/WebKit/Source/core/editing/Editor.cpp (left): ...
5 years, 2 months ago (2015-10-22 02:28:28 UTC) #4
Andrey Kraynov
On 2015/10/22 02:26:43, Yosi_UTC9 wrote: > Let's delegate handling of tree crossing range to caller. ...
5 years, 2 months ago (2015-10-22 09:46:25 UTC) #5
Andrey Kraynov
Thank you for all these comments! I will rework this CL according to them. https://codereview.chromium.org/1409073004/diff/1/third_party/WebKit/Source/core/editing/Editor.cpp ...
5 years, 2 months ago (2015-10-22 09:53:20 UTC) #6
yosin_UTC9
https://codereview.chromium.org/1409073004/diff/1/third_party/WebKit/Source/core/editing/Editor.cpp File third_party/WebKit/Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/1409073004/diff/1/third_party/WebKit/Source/core/editing/Editor.cpp#newcode1193 third_party/WebKit/Source/core/editing/Editor.cpp:1193: while (endRootContainer->parentNode()) On 2015/10/22 at 09:53:20, Andrey Kraynov wrote: ...
5 years, 2 months ago (2015-10-23 01:52:50 UTC) #7
Andrey Kraynov
Hi! Now my CL compiles and webkit_unit_tests passed. I reverted some changes in Editor and ...
5 years, 1 month ago (2015-10-30 18:24:25 UTC) #8
yosin_UTC9
https://codereview.chromium.org/1409073004/diff/40001/third_party/WebKit/Source/core/editing/Editor.cpp File third_party/WebKit/Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/1409073004/diff/40001/third_party/WebKit/Source/core/editing/Editor.cpp#newcode1203 third_party/WebKit/Source/core/editing/Editor.cpp:1203: return (range.startPosition().compareTo(range.endPosition()) < 0); nit: Could you omit parenthesis ...
5 years, 1 month ago (2015-11-02 03:44:17 UTC) #9
Andrey Kraynov
Fix nits. I have extracted collecting of the text bounds into a function |collectTextBoundsInRange| and ...
5 years, 1 month ago (2015-11-02 14:06:57 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1409073004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1409073004/60001
5 years, 1 month ago (2015-11-04 06:21:16 UTC) #12
yosin_UTC9
Let's use two |Range| object for representing active match and having position in composed tree ...
5 years, 1 month ago (2015-11-04 07:11:06 UTC) #13
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/126042)
5 years, 1 month ago (2015-11-04 07:20:34 UTC) #15
Andrey Kraynov
5 years, 1 month ago (2015-11-04 11:42:54 UTC) #16
On 2015/11/04 07:11:06, Yosi_OOO_til_Oct_30 wrote:
> Let's use two |Range| object for representing active match and having position
> in composed tree version
> of DocumentMarkerController::addTextMatchMarker(), removeMarkers(), and
> setMarkesActive(), which traverse composed tree and map them to DOM tree
> positions. This doesn't need to generic, since document markers are
> associated to |Text| node.
> 
> If we choose this way, we don't need to solve  shadow boundary crossing
problem.

OK, I will continue working on this.
Thanks for you help with that CL!

Powered by Google App Engine
This is Rietveld 408576698