RESOLVED FIXED 44594
[Qt] Add Visibility notification NPAPI for plugins
https://bugs.webkit.org/show_bug.cgi?id=44594
Summary [Qt] Add Visibility notification NPAPI for plugins
Girish Ramakrishnan
Reported 2010-08-25 01:57:07 PDT
There is some discussion on plugin-features to implement a plugin visibility notification to NPAPI. The cases are - Plug-in instance goes out of sight after page scrolling. - Plug-in instance comes in sight after page scrolling. - Plug-in instance goes out of sight after browser window goes background. - Plug-in instance comes in sight after browser window goes foreground. See thread about it at: https://mail.mozilla.org/pipermail/plugin-futures/2010-July/000123.html Wiki entry: https://wiki.mozilla.org/NPAPI:VisibilityNotification The bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=583109 This is probably interesting to all platforms but note that the public flash player does not support it and hence this task is Qt/Maemo5 specific for now.
Attachments
Set clipRect correctly on X11 (3.37 KB, patch)
2010-08-25 11:48 PDT, Girish Ramakrishnan
kenneth: review+
Set clipRect correctly on X11 (3.22 KB, patch)
2010-08-26 04:44 PDT, Girish Ramakrishnan
no flags
Set clipRect correctly on X11 (3.21 KB, patch)
2010-08-26 04:46 PDT, Girish Ramakrishnan
hausmann: review+
Girish Ramakrishnan
Comment 1 2010-08-25 02:52:27 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.
Girish Ramakrishnan
Comment 2 2010-08-25 11:48:03 PDT
Created attachment 65453 [details] Set clipRect correctly on X11
Kenneth Rohde Christiansen
Comment 3 2010-08-25 11:52:17 PDT
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.
Girish Ramakrishnan
Comment 4 2010-08-26 04:44:49 PDT
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.
WebKit Review Bot
Comment 5 2010-08-26 04:46:31 PDT
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.
Girish Ramakrishnan
Comment 6 2010-08-26 04:46:32 PDT
Created attachment 65546 [details] Set clipRect correctly on X11 Fix codings style
Girish Ramakrishnan
Comment 7 2010-08-26 04:57:00 PDT
Landed in r66095
WebKit Review Bot
Comment 8 2010-08-26 05:24:23 PDT
http://trac.webkit.org/changeset/66095 might have broken Qt Linux Release
Simon Hausmann
Comment 9 2010-08-26 05:45:58 PDT
Simon Hausmann
Comment 10 2010-08-26 05:48:03 PDT
Ademar Reis
Comment 11 2010-08-27 06:36:31 PDT
Revision r66095 cherry-picked into qtwebkit-2.1 with commit 4a3c8a09303316623216e38f5dea9e0b3f215a26 Revision r66097 cherry-picked into qtwebkit-2.1 with commit fb2dbc367407000b4a1e7d741e740d8b1417946d
Note You need to log in before you can comment on or make changes to this bug.