New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 691202 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocking:
issue 388681
issue 698661



Sign in to add a comment

updateMarkerRenderedRect() should use EphemeralRange

Project Member Reported by yosin@chromium.org, Feb 11 2017

Issue description

EphemeralRange is enough for usage in updateMarkerRenderedRect()
 

Comment 1 by yosin@chromium.org, Feb 11 2017

Status: Available (was: Untriaged)

Comment 2 by vya...@gmail.com, Feb 17 2017

hi ! I am new to Chromium development. Could you please give me some more pointers as to how should I go about the first bug.

From the description I looked out for the method and found it at : DocumentMarkerController.cpp

Not really sure what the next steps should be. 

Comment 3 Deleted

Comment 4 Deleted

Comment 5 Deleted

vyas45@: Thanks, and welcome! To fix this bug:

1. Search the code base to get familiar with the usage of the two classes Range and EphemeralRange. They are pretty similar classes, with basically the only difference that Range is maintained through DOM changes, while EphemeralRange is invalidated as soon as DOM is changed.

2. As suggested by yosin@'s comment, implement an EphemeralRange::boundingBox(), which should be an equivalent to Range::boundingBox.

3. In the function mentioned by this issue, change local variable |range| from a Range object to an EphemeralRange.

Comment 7 by vya...@gmail.com, Feb 18 2017

Thanks a lot for the detailed description ! Will get to it and update with a patch here. 

Regards,
Aniket 

Comment 8 by yosin@chromium.org, Mar 2 2017

Similar to 691198 which users Range::textQuads()
Blocking: 698661
Owner: hs1217....@samsung.com
Status: Started (was: Available)
i will take this issue.
Cc: rlanday@chromium.org
rlanday@ is refactoring DocumentMarkerController: http://crrev.com/2723663002

Though the two patches do not block each other, please note the code conflict and merge the other patch's change if it lands earlier.
i uploaded patch to resolve it. (https://codereview.chromium.org/2776103002/)
1_find_findme_before_chaged.png
58.8 KB View Download
2_changed_page.png
51.0 KB View Download
3_find_again_findme_at_2.png
52.5 KB View Download
Project Member

Comment 14 by bugdroid1@chromium.org, Apr 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d2680c72ae7adfa4a857432179666cb6b03e0781

commit d2680c72ae7adfa4a857432179666cb6b03e0781
Author: hs1217.lee <hs1217.lee@samsung.com>
Date: Thu Apr 13 10:26:23 2017

Make RenderedRectsForMarkers() to ignore disconnected nodes.

This patch changes DocumentMarkerController::RenderedRectsForMarkers()
to ignore disconnected nodes.
and it is first step to use EphemeralRange in updateMarkerRenderedRect().

we will progress three steps.
[1/3] Make RenderedRectsForMarkers() to ignore disconnected nodes.
[2/3] In-place change of Range::textRects() and boundingBox()
 to EphemeralRange version in "Range.cpp"
[3/3] Rewrite  updateMarkerRenderedRect() to use
 EphemeralRange instead of Range

BUG= 691202 

Review-Url: https://codereview.chromium.org/2776103002
Cr-Commit-Position: refs/heads/master@{#464368}

[modify] https://crrev.com/d2680c72ae7adfa4a857432179666cb6b03e0781/third_party/WebKit/LayoutTests/platform/mac-mac10.9/paint/invalidation/text-match-document-change-expected.png
[modify] https://crrev.com/d2680c72ae7adfa4a857432179666cb6b03e0781/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/disable-spinvalidation/paint/invalidation/text-match-document-change-expected.png
[modify] https://crrev.com/d2680c72ae7adfa4a857432179666cb6b03e0781/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/text-match-document-change-expected.png
[modify] https://crrev.com/d2680c72ae7adfa4a857432179666cb6b03e0781/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/text-match-document-change-expected.png
[modify] https://crrev.com/d2680c72ae7adfa4a857432179666cb6b03e0781/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp

Project Member

Comment 15 by bugdroid1@chromium.org, Apr 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c82bb4760bc368ce89d3e30abe617f995fe7c6b5

commit c82bb4760bc368ce89d3e30abe617f995fe7c6b5
Author: hs1217.lee <hs1217.lee@samsung.com>
Date: Mon Apr 17 08:52:59 2017

In-place change of Range::textRects() and boundingBox() to EphemeralRange.

In-place change of Range::textRects() and boundingBox()
to EphemeralRange version in "Range.cpp".
this patch is second step to use EphemeralRange in
updateMarkerRenderedRect().

we are progressing three steps.
[1/3] Make RenderedRectsForMarkers() to ignore disconnected nodes.
 (https://codereview.chromium.org/2776103002/)
[2/3] In-place change of Range::textRects() and boundingBox()
 to EphemeralRange version in "Range.cpp"
[3/3] Rewrite updateMarkerRenderedRect() to use EphemeralRange
 instead of Range

BUG= 691202 

Review-Url: https://codereview.chromium.org/2810313003
Cr-Commit-Position: refs/heads/master@{#464909}

[modify] https://crrev.com/c82bb4760bc368ce89d3e30abe617f995fe7c6b5/third_party/WebKit/Source/core/dom/Range.cpp
[modify] https://crrev.com/c82bb4760bc368ce89d3e30abe617f995fe7c6b5/third_party/WebKit/Source/core/dom/Range.h

Project Member

Comment 16 by bugdroid1@chromium.org, May 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/479179ca87f415cc18ae18682a3938a4486ea281

commit 479179ca87f415cc18ae18682a3938a4486ea281
Author: hs1217.lee <hs1217.lee@samsung.com>
Date: Mon May 22 09:43:58 2017

Rewrite UpdateMarkerRenderedRect() to use EphemeralRange.

this patch is last step to replace Range with EphemeralRange in
updateMarkerRenderedRect().

we are progressing three steps.
[1/3] Make RenderedRectsForMarkers() to ignore disconnected nodes.
 (https://codereview.chromium.org/2776103002)
[2/3] In-place change of Range::textRects() and boundingBox()
 to EphemeralRange version in "Range.cpp"
 (https://codereview.chromium.org/2810313003)
[3/3] Rewrite UpdateMarkerRenderedRect() to use EphemeralRange
 instead of Range (this patch)

BUG= 691202 

Review-Url: https://codereview.chromium.org/2885103004
Cr-Commit-Position: refs/heads/master@{#473534}

[modify] https://crrev.com/479179ca87f415cc18ae18682a3938a4486ea281/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp

Status: Fixed (was: Started)

Sign in to add a comment