Bug 116251

Summary: [wk2] didGetImageForFindMatch can return a null image
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Severity: Normal CC: andersca, commit-queue, sam, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
patch simon.fraser: review+

Description Tim Horton 2013-05-16 16:29:21 PDT
FindController::getFindIndicatorBitmapAndRect says:

// Selection rect can be empty for matches that are currently obscured from view.

And then returns a null handle. Which we then try to create a ShareableBitmap from, and then a WebImage from that. We end up getting a null ShareableBitmap in debug builds, or crashing when trying to use the WebImage in release builds (because m_bitmap is null).

We should not didGetImageForFindMatch if we didn't get an image for the find match...

Comment 1 Tim Horton 2013-05-16 16:39:50 PDT
Created attachment 201999 [details]
Comment 2 WebKit Commit Bot 2013-05-16 16:41:55 PDT
Attachment 201999 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/WebProcess/WebPage/FindController.cpp']" exit_code: 1
Source/WebKit2/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 2 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2013-05-16 16:43:40 PDT
Comment on attachment 201999 [details]

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

> Source/WebKit2/ChangeLog:4
> +        https://bugs.webkit.org/process_bug.cgi

Comment 4 Simon Fraser (smfr) 2013-05-16 16:45:49 PDT
Comment on attachment 201999 [details]

r=me if you fix stuff.
Comment 5 Tim Horton 2013-05-16 16:48:35 PDT