Bug 133232 - Remove invalid ASSERT in wordRangeForPosition
Summary: Remove invalid ASSERT in wordRangeForPosition
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-23 13:57 PDT by Enrica Casucci
Modified: 2014-05-23 14:33 PDT (History)
0 users

See Also:


Attachments
Patch (1.64 KB, patch)
2014-05-23 14:00 PDT, Enrica Casucci
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2014-05-23 13:57:23 PDT
In WK2 for iOS this function is called on every selection change.
The selection could be set by Javascript in an element that is not visible. In that case we won't be able to create a VisiblePosition and wordRangeForPosition should not ASSERT that the VisiblePosition is not null, but rather perform an early return if it is null.
Comment 1 Enrica Casucci 2014-05-23 14:00:51 PDT
Created attachment 231981 [details]
Patch
Comment 2 Enrica Casucci 2014-05-23 14:33:19 PDT
Committed revision 169280.