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

Issue 2636623002: Fix crash in localSelectionRectOfPositionTemplate() in VisibleUnits.cpp (Closed)

Created:
3 years, 11 months ago by joone
Modified:
3 years, 11 months ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, chromium-reviews, yoichio
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix crash in localSelectionRectOfPositionTemplate() in VisibleUnits.cpp. It only happens during scrolling in Android. BUG=680428

Patch Set 1 #

Patch Set 2 : return empty rect #

Patch Set 3 : add a test #

Total comments: 4

Patch Set 4 : call absoluteCaretBoundsOf #

Patch Set 5 : same as the patch set 2 #

Patch Set 6 : embrace localCaretRectOfPositionTemplate() #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -3 lines) Patch
M third_party/WebKit/Source/core/editing/VisibleUnits.cpp View 1 2 3 4 5 1 chunk +20 lines, -3 lines 3 comments Download

Messages

Total messages: 44 (28 generated)
joone
Please review this CL.
3 years, 11 months ago (2017-01-14 01:27:52 UTC) #5
yosin_UTC9
Could you add a test case for this[1]? gTest is better. [1] Importance and requirements ...
3 years, 11 months ago (2017-01-16 02:25:37 UTC) #10
joone
On 2017/01/16 02:25:37, Yosi_UTC9 wrote: > Could you add a test case for this[1]? gTest ...
3 years, 11 months ago (2017-01-17 05:50:37 UTC) #11
yosin_UTC9
On 2017/01/17 at 05:50:37, joone.hur wrote: > On 2017/01/16 02:25:37, Yosi_UTC9 wrote: > > Could ...
3 years, 11 months ago (2017-01-18 01:56:09 UTC) #17
yosin_UTC9
https://codereview.chromium.org/2636623002/diff/40001/third_party/WebKit/Source/core/editing/VisibleUnits.cpp File third_party/WebKit/Source/core/editing/VisibleUnits.cpp (right): https://codereview.chromium.org/2636623002/diff/40001/third_party/WebKit/Source/core/editing/VisibleUnits.cpp#newcode2604 third_party/WebKit/Source/core/editing/VisibleUnits.cpp:2604: LayoutRect localSelectionRectOfPosition( This function doesn't relate to change of ...
3 years, 11 months ago (2017-01-18 05:37:50 UTC) #18
joone
On 2017/01/18 01:56:09, Yosi_UTC9 wrote: > On 2017/01/17 at 05:50:37, joone.hur wrote: > > On ...
3 years, 11 months ago (2017-01-18 07:51:07 UTC) #19
joone
https://codereview.chromium.org/2636623002/diff/40001/third_party/WebKit/Source/core/editing/VisibleUnits.cpp File third_party/WebKit/Source/core/editing/VisibleUnits.cpp (right): https://codereview.chromium.org/2636623002/diff/40001/third_party/WebKit/Source/core/editing/VisibleUnits.cpp#newcode2604 third_party/WebKit/Source/core/editing/VisibleUnits.cpp:2604: LayoutRect localSelectionRectOfPosition( On 2017/01/18 05:37:50, Yosi_UTC9 wrote: > This ...
3 years, 11 months ago (2017-01-18 07:52:17 UTC) #20
amineer
On 2017/01/18 07:52:17, joone wrote: > https://codereview.chromium.org/2636623002/diff/40001/third_party/WebKit/Source/core/editing/VisibleUnits.cpp > File third_party/WebKit/Source/core/editing/VisibleUnits.cpp (right): > > https://codereview.chromium.org/2636623002/diff/40001/third_party/WebKit/Source/core/editing/VisibleUnits.cpp#newcode2604 > ...
3 years, 11 months ago (2017-01-18 16:16:53 UTC) #21
joone
On 2017/01/18 01:56:09, Yosi_UTC9 wrote: > > Call site is: > > VisiblePosition oldOffsetExtentPosition = ...
3 years, 11 months ago (2017-01-18 18:31:47 UTC) #24
joone
On 2017/01/18 16:16:53, amineer wrote: > On 2017/01/18 07:52:17, joone wrote: > > > https://codereview.chromium.org/2636623002/diff/40001/third_party/WebKit/Source/core/editing/VisibleUnits.cpp ...
3 years, 11 months ago (2017-01-18 18:32:31 UTC) #25
joone
yosin@ it will take more time to write a test case for this crash problem ...
3 years, 11 months ago (2017-01-18 22:25:31 UTC) #32
yosin_UTC9
On 2017/01/18 at 22:25:31, joone.hur wrote: > yosin@ it will take more time to write ...
3 years, 11 months ago (2017-01-19 01:19:55 UTC) #35
joone
On 2017/01/19 01:19:55, Yosi_UTC9 wrote: > On 2017/01/18 at 22:25:31, joone.hur wrote: > > yosin@ ...
3 years, 11 months ago (2017-01-19 01:59:56 UTC) #36
yosin_UTC9
On 2017/01/19 at 01:59:56, joone.hur wrote: > On 2017/01/19 01:19:55, Yosi_UTC9 wrote: > > On ...
3 years, 11 months ago (2017-01-19 05:58:53 UTC) #37
joone
yosin@ please review the updated CL. I tested it with Nexus5 . https://codereview.chromium.org/2636623002/diff/100001/third_party/WebKit/Source/core/editing/VisibleUnits.cpp File third_party/WebKit/Source/core/editing/VisibleUnits.cpp ...
3 years, 11 months ago (2017-01-20 02:07:29 UTC) #41
yosin_UTC9
3 years, 11 months ago (2017-01-20 04:28:29 UTC) #44
I think caret height fix has big benefit to users.
Let's try to find out test case and fix absoluteSelectionRectOf() until time
expired, Friday 5PM PST.

https://codereview.chromium.org/2636623002/diff/100001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/editing/VisibleUnits.cpp (right):

https://codereview.chromium.org/2636623002/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/editing/VisibleUnits.cpp:2584: if
(rect.isEmpty())
On 2017/01/20 at 02:07:29, joone wrote:
> If boxPosition.inlineBox isn't InlineTextBox, localCaretRect returns empty
rect.

We need to have a test case of this. I think BR or IMG may be case.
We also attempt to try to find test case. 
Let's try to seek test case rather than reverting patch as time allows. ;-)

https://codereview.chromium.org/2636623002/diff/100001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/editing/VisibleUnits.cpp:2587: InlineTextBox* box
= toInlineTextBox(boxPosition.inlineBox);
We need to handle if |boxPosition.inlineBox| isn't InlineTextBox.
We also need to have a test case of this.

Powered by Google App Engine
This is Rietveld 408576698