Bug 33591 - [Qt/Win] Flash in QGraphicsWebView does not process hover correctly.
Summary: [Qt/Win] Flash in QGraphicsWebView does not process hover correctly.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows Vista
: P2 Normal
Assignee: Girish Ramakrishnan
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2010-01-13 05:01 PST by Girish Ramakrishnan
Modified: 2010-01-15 01:52 PST (History)
1 user (show)

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Girish Ramakrishnan 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 Girish Ramakrishnan 2010-01-13 06:00:19 PST
Created attachment 46451 [details]
Fix mouse hover for flash in QGraphicsWebView
Comment 2 Girish Ramakrishnan 2010-01-13 19:08:24 PST
Comment on attachment 46451 [details]
Fix mouse hover for flash in QGraphicsWebView

> 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 Girish Ramakrishnan 2010-01-14 21:13:44 PST
Created attachment 46640 [details]
Code style fixes
Comment 4 Simon Hausmann 2010-01-15 00:12:47 PST
Comment on attachment 46640 [details]
Code style fixes

r=me
Comment 5 Girish Ramakrishnan 2010-01-15 01:43:38 PST
Landed in r53327
Comment 6 Simon Hausmann 2010-01-15 01:52:56 PST
Cherry-picked into qtwebkit-4.6 with commit 24c008da2c13b72c441a2a47a3b17627c4fc4a9e