Bug 132294

Summary: Don't immediately snapshot plugin to allow for proper dominant plugin detection.
Product: WebKit Reporter: Roger Fong <roger_fong>
Component: Plug-insAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, roger_fong, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 131871    
Attachments:
Description Flags
patch dino: review+

Description Roger Fong 2014-04-28 12:07:21 PDT
Currently we immediately set the display state to displaying snapshot if the max number of snapshot retries is 0.
However, this causes timing problems. Namely, it causes hit testing to fail because the hit test needs to happen with the original plugin element.
If we instead call beginSnapshottingRunningPlugin, we allow the page some time to perform the hit test with the plugin element before snapshotting.

I've only seen this affect layout tests, where we explicitly set the max number of snapshot retries to 0.
This fix will allow us to enable snapshotting tests.
Comment 1 Radar WebKit Bug Importer 2014-04-28 12:07:58 PDT
<rdar://problem/16745679>
Comment 2 Roger Fong 2014-04-28 12:21:09 PDT
Created attachment 230316 [details]
patch
Comment 3 Roger Fong 2014-04-29 15:15:36 PDT
http://trac.webkit.org/changeset/167961