Summary: | [Qt] Add Visibility notification NPAPI for plugins | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Girish Ramakrishnan <girish> | ||||||||
Component: | Plug-ins | Assignee: | Girish Ramakrishnan <girish> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | abarth, ademar, christian.webkit, eric, hausmann, kenneth, webkit.review.bot | ||||||||
Priority: | P2 | Keywords: | Qt | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Other | ||||||||||
OS: | Other | ||||||||||
Attachments: |
|
Description
Girish Ramakrishnan
2010-08-25 01:57:07 PDT
The clipRect parameter of SetWindow is used different on Mac and Linux/Windows. On Mac, it is used to indicate the position of the plugin. When clipRect is set to 0, it means that it's not visible anymore. On Linux/Windows, clipRect indicates the clipping rect for the painting operation and is called before every paint(). In the plugin-features thread, Adobe person mentions that clipRect is used only on Mac (https://mail.mozilla.org/pipermail/plugin-futures/2010-July/000125.html). So, I guess Flash doesn't use this value. Currently, in Qt/WebKit, clipRect is always set to 0 on X11 in Windowless mode. In Windowed mode, we call it with the visibile rect but with a quirk (PluginQuirkDontCallSetWindowMoreThanOnce) wherein the height/width is never changed in the lifetime of the plugin. Created attachment 65453 [details]
Set clipRect correctly on X11
Comment on attachment 65453 [details]
Set clipRect correctly on X11
WebCore/plugins/qt/PluginViewQt.cpp:588
+ // position and clipRect is relative to the Drawable
comments start with capital and ends with . Why is Drawable with a capital d?
The comments could be a bit more explanatory.
Created attachment 65545 [details]
Set clipRect correctly on X11
Ok, I have a better patch now that also takes care of setting the clip rect to 0 when the plugin is scrolled out in both windowed and windowless mode.
Attachment 65545 [details] did not pass style-queue:
Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/plugins/qt/PluginViewQt.cpp:588: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5]
Total errors found: 1 in 2 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 65546 [details]
Set clipRect correctly on X11
Fix codings style
http://trac.webkit.org/changeset/66095 might have broken Qt Linux Release Committed r66097: <http://trac.webkit.org/changeset/66097> Committed r66095: <http://trac.webkit.org/changeset/66095> |