Bug 33591 - [Qt/Win] Flash in QGraphicsWebView does not process hover correctly.
: [Qt/Win] Flash in QGraphicsWebView does not process hover correctly.
Status: RESOLVED FIXED
: WebKit
Plug-ins
: 528+ (Nightly build)
: PC Windows Vista
: P2 Normal
Assigned To:
:
: Qt
:
:
  Show dependency treegraph
 
Reported: 2010-01-13 05:01 PST by
Modified: 2010-01-15 01:52 PST (History)


Attachments
Fix mouse hover for flash in QGraphicsWebView (2.41 KB, patch)
2010-01-13 06:00 PST, Girish Ramakrishnan
no flags Review Patch | Details | Formatted Diff | Diff
Code style fixes (2.41 KB, patch)
2010-01-14 21:13 PST, Girish Ramakrishnan
hausmann: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-01-13 05:01:08 PST
Mouse hover does not work as expected with the flash in some sites.
        - http://www.bbc.co.uk/ Hover over the map
        - http://www.barbie.com/ Hover over the menu items (Games, Videos)
------- Comment #1 From 2010-01-13 06:00:19 PST -------
Created an attachment (id=46451) [details]
Fix mouse hover for flash in QGraphicsWebView
------- Comment #2 From 2010-01-13 19:08:24 PST -------
(From update of attachment 46451 [details])
> commit 9b2485eb48ef403f6609334fc4d00b0aec901e8a
> Author: Girish Ramakrishnan <girish@forwardbias.in>
> Date:   Wed Jan 13 19:25:11 2010 +0530
> 
>     [Qt/Win] Flash in QGraphicsWebView does not process hover correctly.
>     
>     https://bugs.webkit.org/show_bug.cgi?id=33591
>     
>     Mouse hover does not work as expected with the flash in some sites.
>         - http://www.bbc.co.uk/ Hover over the map
>         - http://www.barbie.com/ Hover over the menu items (Games, Videos)
>     The problem appears to be that Flash queries NPNVnetscapeWindow on every
>     mouse hover. I do not how flash uses this value but returning 0 when flash
>     is in windowless mode solves the problem (When using QGraphicsWebView we
>     inject wmode opaque, thereby putting the plugin in windowless mode).
> 
> diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
> index 1968af0..34cf27a 100644
> --- a/WebCore/ChangeLog
> +++ b/WebCore/ChangeLog
> @@ -1,3 +1,22 @@
> +2010-01-13  Girish Ramakrishnan  <girish@forwardbias.in>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        [Qt/Win] Flash in QGraphicsWebView does not process hover correctly.
> +        
> +        https://bugs.webkit.org/show_bug.cgi?id=33591
> +        
> +        Mouse hover does not work as expected with the flash in some sites.
> +        - http://www.bbc.co.uk/ Hover over the map
> +        - http://www.barbie.com/ Hover over the menu items (Games, Videos)
> +        The problem appears to be that Flash queries NPNVnetscapeWindow on every
> +        mouse hover. I do not how flash uses this value but returning 0 when flash
> +        is in windowless mode solves the problem (When using QGraphicsWebView we
> +        inject wmode opaque, thereby putting the plugin in windowless mode).
> +
> +        * plugins/win/PluginViewWin.cpp:
> +        (windowHandleForPageClient):
> +
>  2009-12-29  Kent Tamura  <tkent@chromium.org>
>  
>          Reviewed by Maciej Stachowiak.
> diff --git a/WebCore/plugins/win/PluginViewWin.cpp b/WebCore/plugins/win/PluginViewWin.cpp
> index 763536c..336681e 100644
> --- a/WebCore/plugins/win/PluginViewWin.cpp
> +++ b/WebCore/plugins/win/PluginViewWin.cpp
> @@ -94,7 +94,9 @@ static inline HWND windowHandleForPageClient(PlatformPageClient client)
>  #if PLATFORM(QT)
>      if (!client)
>          return 0;
> -    return client->ownerWidget()->winId();
> +    if (QWidget *pluginParent = qobject_cast<QWidget*>(client->pluginParent()))
> +        return pluginParent->winId();
> +    return 0;

Reviewing my own patch, there is a coding style violation. Other than that, does this look ok?
------- Comment #3 From 2010-01-14 21:13:44 PST -------
Created an attachment (id=46640) [details]
Code style fixes
------- Comment #4 From 2010-01-15 00:12:47 PST -------
(From update of attachment 46640 [details])
r=me
------- Comment #5 From 2010-01-15 01:43:38 PST -------
Landed in r53327
------- Comment #6 From 2010-01-15 01:52:56 PST -------
Cherry-picked into qtwebkit-4.6 with commit 24c008da2c13b72c441a2a47a3b17627c4fc4a9e