Bug 176011 - [iOS WK2] Web process crashes after changing selection to the end of the document when speaking a selection
Summary: [iOS WK2] Web process crashes after changing selection to the end of the docu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-26 23:40 PDT by Wenson Hsieh
Modified: 2017-08-27 19:03 PDT (History)
5 users (show)

See Also:


Attachments
Patch (23.47 KB, patch)
2017-08-27 00:05 PDT, Wenson Hsieh
rniwa: review+
Details | Formatted Diff | Diff
Patch for landing (23.00 KB, patch)
2017-08-27 17:41 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2017-08-26 23:40:43 PDT
<rdar://problem/32614095>
Comment 1 Wenson Hsieh 2017-08-27 00:05:41 PDT
Created attachment 319156 [details]
Patch
Comment 2 Ryosuke Niwa 2017-08-27 16:49:46 PDT
Comment on attachment 319156 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=319156&action=review

> Source/WebCore/editing/Editing.cpp:1095
> +VisiblePosition visiblePositionForPositionWithOffset(const VisiblePosition& position, int32_t offset)

We should make this function take unsigned instead of int32_t. It's non-sensical to have a negative offset.
Comment 3 Wenson Hsieh 2017-08-27 16:55:30 PDT
Comment on attachment 319156 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=319156&action=review

>> Source/WebCore/editing/Editing.cpp:1095
>> +VisiblePosition visiblePositionForPositionWithOffset(const VisiblePosition& position, int32_t offset)
> 
> We should make this function take unsigned instead of int32_t. It's non-sensical to have a negative offset.

Sounds good! Changed to unsigned.
Comment 4 Wenson Hsieh 2017-08-27 17:13:10 PDT
Comment on attachment 319156 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=319156&action=review

>>> Source/WebCore/editing/Editing.cpp:1095
>>> +VisiblePosition visiblePositionForPositionWithOffset(const VisiblePosition& position, int32_t offset)
>> 
>> We should make this function take unsigned instead of int32_t. It's non-sensical to have a negative offset.
> 
> Sounds good! Changed to unsigned.

Actually, a call site of visiblePositionForPositionWithOffset in AXObjectCache.cpp takes in a negative integer -- we'll change this to be an int instead.
Comment 5 Wenson Hsieh 2017-08-27 17:41:09 PDT
Created attachment 319163 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2017-08-27 18:22:59 PDT
Comment on attachment 319163 [details]
Patch for landing

Clearing flags on attachment: 319163

Committed r221233: <http://trac.webkit.org/changeset/221233>