Bug 92905

Summary: BUG in QTWebkit 4.8 > Flash
Product: WebKit Reporter: Janton <janton.koster>
Component: WebKit QtAssignee: Simon Hausmann <hausmann>
Status: RESOLVED FIXED    
Severity: Major CC: abecsi, allan.jensen, c0d3r85, dczechowicz, hausmann, jturcotte, patrick, sfcheng, webkit.review.bot, wingzx3
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Windows Vista   
URL: http://www.qtcentre.org/threads/50286-BUG-in-QTWebkit-4-8-gt-Flash
Attachments:
Description Flags
scrolling up and down on this page: http://www.wechoosethemoon.org/
none
youtube page when there is a banner
none
Paint the flash video in the actual rect
none
Patch none

Description Janton 2012-08-01 13:38:33 PDT
Hallo All,

I'm not sure were to report this issue, so i try to report it here.

It seems there is a terrible bug in the last QT with Webkit.

When i scroll down a page that contains flash content, the flash moves down also..
Well it's difficult to explain so i created some screenshots.

I tried this on two different windows machines and both same result.
The issue is when you scroll down and up..! In this example i used:
www.youtube.com (youtube only has problems with a banner.. if there is banner ofcourse!)
http://www.wechoosethemoon.org/ (the starting loader and well.. then the whole site)
Comment 1 Janton 2012-08-01 13:40:00 PDT
Created attachment 155875 [details]
scrolling up and down on this page: http://www.wechoosethemoon.org/
Comment 2 Janton 2012-08-01 13:40:40 PDT
Created attachment 155876 [details]
youtube page when there is a banner
Comment 3 Janton 2012-08-01 13:42:08 PDT
i don't know what verion QTWebkit has in the last 4.8.2 release?
Comment 4 Janton 2012-08-01 13:44:07 PDT
I also reported the issue here:
http://www.qtcentre.org/threads/50286-BUG-in-QTWebkit-4-8-gt-Flash

but no responds yet! Am I the only one?
Comment 5 c0d3r 2012-08-10 01:05:14 PDT
Have the same behaviour in QtWebKit v4.9.2.
There is no such bug in QtWebKit v 4.7.4.
Comment 6 Patrick Li 2012-09-12 17:10:52 PDT
It's being painted to the wrong Rect.  The following patch fixes it:


Index: win/PluginViewWin.cpp
===================================================================
--- Source/WebCore/plugins/win/PluginViewWin.cpp       (revision 63895)
+++ Source/WebCore/plugins/win/PluginViewWin.cpp       (working copy)
@@ -618,7 +618,8 @@

     ASSERT(parent()->isFrameView());
     IntRect rectInWindow = static_cast<FrameView*>(parent())->contentsToWindow(
frameRect());
-    LocalWindowsContext windowsContext(context, rectInWindow, m_isTransparent);

+    HDC hdc = context->getWindowsContext(rectInWindow, m_isTransparent);
+

     // On Safari/Windows without transparency layers the GraphicsContext return
s the HDC
     // of the window and the plugin expects that the passed in DC has window co
ordinates.
@@ -627,14 +628,15 @@
 #if !PLATFORM(QT) && !OS(WINCE)
     if (!context->inTransparencyLayer()) {
         XFORM transform;
-        GetWorldTransform(windowsContext.hdc(), &transform);
+        GetWorldTransform(hdc, &transform);
         transform.eDx = 0;
         transform.eDy = 0;
-        SetWorldTransform(windowsContext.hdc(), &transform);
+        SetWorldTransform(hdc, &transform);
     }
 #endif

-    paintIntoTransformedContext(windowsContext.hdc());
+    paintIntoTransformedContext(hdc);
+    context->releaseWindowsContext(hdc, frameRect(), m_isTransparent);
 }
Comment 7 Patrick Li 2012-09-12 17:14:23 PDT
Created attachment 163742 [details]
Paint the flash video in the actual rect
Comment 8 Damian 2012-09-13 06:36:21 PDT
Great thank you very much you build webkit 2.2.2 or which version? alone or with qt?
Comment 9 Damian 2012-09-13 13:00:44 PDT
(In reply to comment #8)
> Great thank you very much i confirm work well on xp and  win 7 use qt webkit 2.2.2 from here https://gitorious.org/webkit/qtwebkit/trees/qtwebkit-2.2.2
Comment 10 Jocelyn Turcotte 2012-09-17 06:32:15 PDT
Comment on attachment 163742 [details]
Paint the flash video in the actual rect

This seemed to have been broken in http://trac.webkit.org/changeset/67125
I wonder if there would be a way to keep using LocalWindowsContext, maybe by adjusting the coordinates like GTK did in http://trac.webkit.org/changeset/121441.
Comment 11 Simon Hausmann 2012-09-17 06:36:54 PDT
(In reply to comment #10)
> (From update of attachment 163742 [details])
> This seemed to have been broken in http://trac.webkit.org/changeset/67125
> I wonder if there would be a way to keep using LocalWindowsContext, maybe by adjusting the coordinates like GTK did in http://trac.webkit.org/changeset/121441.

Well spotted!!
Comment 12 Allan Sandfeld Jensen 2012-09-17 07:28:51 PDT
I think is a duplicate of  bug #71950
Comment 13 Allan Sandfeld Jensen 2012-09-17 07:30:12 PDT
*** Bug 71950 has been marked as a duplicate of this bug. ***
Comment 14 Simon Hausmann 2012-09-18 08:34:07 PDT
Created attachment 164568 [details]
Patch

Patch that enables the same code path as Gtk. Tested on Windows with youtube and QtTestBrowser.exe
Comment 15 WebKit Review Bot 2012-09-19 01:43:11 PDT
Comment on attachment 164568 [details]
Patch

Clearing flags on attachment: 164568

Committed r128978: <http://trac.webkit.org/changeset/128978>
Comment 16 WebKit Review Bot 2012-09-19 01:43:15 PDT
All reviewed patches have been landed.  Closing bug.
Comment 17 Stephen 2012-11-12 13:01:09 PST
*** Bug 101242 has been marked as a duplicate of this bug. ***