Bug 148410

Summary: Fix crash due to search field disappearing when showing results menu
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Severity: Normal CC: commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Mac   
OS: Unspecified   
Description Flags
Click on the results button to crash WebKit
Patch none

Description Wenson Hsieh 2015-08-24 18:25:44 PDT
Created attachment 259800 [details]
Click on the results button to crash WebKit

When an input of type search has a results attribute and is set up to disappear (e.g. display: none) when focused, clicking on the search field will crash WebKit since we assume that, after running the handler code, the search field's renderer will still exist. We use the renderer to then toggle the search results popup. This fix guards this logic with a check to make sure that the renderer still exists when handling an event on the search field results button.
Comment 1 Wenson Hsieh 2015-08-24 18:26:17 PDT
Comment 2 Wenson Hsieh 2015-08-24 22:49:09 PDT
Created attachment 259827 [details]
Comment 3 Wenson Hsieh 2015-08-25 09:21:38 PDT
Created attachment 259852 [details]
Comment 4 Brent Fulgham 2015-08-25 10:48:54 PDT
Comment on attachment 259852 [details]

Very nice! r=me.
Comment 5 WebKit Commit Bot 2015-08-25 11:00:18 PDT
Comment on attachment 259852 [details]

Clearing flags on attachment: 259852

Committed r188918: <http://trac.webkit.org/changeset/188918>
Comment 6 WebKit Commit Bot 2015-08-25 11:00:21 PDT
All reviewed patches have been landed.  Closing bug.