Bug 143234 - [iOS] WebContent crashing at WebCore: WebCore::Range::collectSelectionRects
Summary: [iOS] WebContent crashing at WebCore: WebCore::Range::collectSelectionRects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified iOS 8.2
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-30 12:17 PDT by Enrica Casucci
Modified: 2015-03-30 16:26 PDT (History)
1 user (show)

See Also:


Attachments
Patch (3.39 KB, patch)
2015-03-30 12:22 PDT, Enrica Casucci
thorton: 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 2015-03-30 12:17:44 PDT
rdar://problem/18571345
Comment 1 Enrica Casucci 2015-03-30 12:22:34 PDT
Created attachment 249754 [details]
Patch
Comment 2 Tim Horton 2015-03-30 12:27:28 PDT
Comment on attachment 249754 [details]
Patch

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

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:137
> +        if (compositionRange)

Maybe we should pull this code into its own function so we can early return if !compositionRange (and then later if compositionRects.isEmpty()?)

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:141
>          if (compositionRects.size() > 1)

Will the plainTextReplacingNoBreakSpace a few lines below here handle a null compositionRange correctly?
Comment 3 Enrica Casucci 2015-03-30 15:29:11 PDT
(In reply to comment #2)
> Comment on attachment 249754 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=249754&action=review
> 
> > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:137
> > +        if (compositionRange)
> 
> Maybe we should pull this code into its own function so we can early return
> if !compositionRange (and then later if compositionRects.isEmpty()?)
> 
> > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:141
> >          if (compositionRects.size() > 1)
> 
> Will the plainTextReplacingNoBreakSpace a few lines below here handle a null
> compositionRange correctly?

Yes it does. But I agree that there is no need to do any of the rest of the composition code if compositionRange is null.
Comment 4 Enrica Casucci 2015-03-30 16:26:43 PDT
Committed revision 182162.