Bug 40997 - NPAPI plugin not handling recursive drawRect events properly
Summary: NPAPI plugin not handling recursive drawRect events properly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.6
: P2 Major
Assignee: Nobody
URL: http://www.dreamfactory.com
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-22 10:50 PDT by Bill Appleton
Modified: 2010-06-22 13:54 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Appleton 2010-06-22 10:50:42 PDT
Hi All,

Normally calls to NPN_InvalidateRect will trigger a matching call to the drawRect event. 

This is the case in FireFox 32 and 64 (minefield release candidates) and Safari 32-bit

However Safari-64 bit does something quite different.

Here there is only ONE recursive call into drawRect, but no further calls thereafter. 

Here is an example of a typical order of events.

1) a mouseDown event is sent to the plugin
2) the user starts dragging the mouse and the plugin calls NPN_InvalidateRect in a loop
3) something else is called like [NSApp nextEventMatchingmask...] that allows re-entrance
4) drawRect gets called recursively and the plugin updates the screen & continues back to step (2) above
5) the mouse is released

Normally this will trigger: (1) followed by (2, 3, 4) over and over again until (5)
On Safari 64 bit this will trigger: (1) with (2, 3, 4) once and then (2, 3) over and over again until (5)

In other words, Safari only send ONE recursive call to drawRect no matter how many times NPN_InvalidateRect is called in the loop
So it is like the message pump is not running to keep sending recursive events in response to NPN_InvalidateRect 


Thanks,

let me know how to help


Bill Appleton
CTO @ DreamFactory Software
Comment 1 Bill Appleton 2010-06-22 13:54:44 PDT
Whoops the latest version of Safari fixes this bug

thanks all...