Bug 40472 - [Qt] In Carbon event model, NPP_SetWindow is called too often
Summary: [Qt] In Carbon event model, NPP_SetWindow is called too often
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 420+
Hardware: Mac (Intel) OS X 10.6
: P3 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-06-11 05:17 PDT by qt-info
Modified: 2014-01-14 09:21 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description qt-info 2010-06-11 05:17:54 PDT
In the Carbon event model, NPP_SetWindow is called for every redraw. It should be called only when the window geometry has changed. 

There is an easy workaround: Check for equality of the NPP_SetWindow parameters and the parameters from the previous call before recomputing anything.

In PluginViewMac.cpp, there is a call to setNPWindowIfNeeded() inside the paint(...) function. I believe this may be the culprit. 

Basically, I'm seeing a call to NPP_SetWindow (with the same parameters each time) before each update event, which is completely unnecessary and different from every other browser I'm supporting so far.

(Bug reported against Qt version 4.6.2)