RESOLVED INVALID 105135
[Qt/Win] Flash opened in windowed mode when 'wmode' attribute set to 'default' explicitly
https://bugs.webkit.org/show_bug.cgi?id=105135
Summary [Qt/Win] Flash opened in windowed mode when 'wmode' attribute set to 'default...
Mozhaev Grigory
Reported 2012-12-16 13:29:32 PST
Created attachment 179662 [details] Incorrect alignment/layered of flash plugin in QGraphics(Scene/View) As known 'default' mode for flash is 'window', thus if wmode isn't set explicity then qtwebkit try to set it to opaque (windowless). When html code has 'wmode' already presented and it's not a 'window', then qtwebkit just passes this and doesn't change anything (lines 1535-1536 below): FrameLoaderClientQt.cpp: ---- 1532: if (wmodeIndex == WTF::notFound) { 1533: params.append("wmode"); 1534: values.append("opaque"); 1535: } else if (equalIgnoringCase(values[wmodeIndex], "window")) 1536: values[wmodeIndex] = "opaque"; ---- The result of this is incorrect alignment into QGraphics(Scene/View) and layered over it as separate window (see qgraphicswebview_windowed_flash.png attachment). Link to reproduce the problem: http://www.bbc.co.uk/news/world-latin-america-18922704 (btw, any video there has the same problem)
Attachments
Incorrect alignment/layered of flash plugin in QGraphics(Scene/View) (433.40 KB, image/png)
2012-12-16 13:29 PST, Mozhaev Grigory
no flags
Force flash to windowless mode (582 bytes, patch)
2012-12-16 13:31 PST, Mozhaev Grigory
no flags
Force flash to windowless mode (809 bytes, patch)
2012-12-16 13:50 PST, Mozhaev Grigory
no flags
Force flash to windowless mode (790 bytes, patch)
2012-12-16 14:05 PST, Mozhaev Grigory
allan.jensen: review-
Mozhaev Grigory
Comment 1 2012-12-16 13:31:28 PST
Created attachment 179663 [details] Force flash to windowless mode
WebKit Review Bot
Comment 2 2012-12-16 13:37:01 PST
Attachment 179663 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files']" exit_code: 1 Total errors found: 0 in 0 files If any of these errors are false positives, please file a bug against check-webkit-style.
Mozhaev Grigory
Comment 3 2012-12-16 13:50:48 PST
Created attachment 179665 [details] Force flash to windowless mode
WebKit Review Bot
Comment 4 2012-12-16 13:54:34 PST
Attachment 179665 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/qt/WebCoreSupport/FrameLoade..." exit_code: 1 Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp:1540: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 1 in 1 files If any of these errors are false positives, please file a bug against check-webkit-style.
Mozhaev Grigory
Comment 5 2012-12-16 14:05:30 PST
Created attachment 179666 [details] Force flash to windowless mode
Mozhaev Grigory
Comment 6 2012-12-16 14:51:23 PST
btw, Chromium simply force to swap wmode to opaque with no matter what was there before, see: http://code.google.com/p/chromiumembedded/source/browse/trunk/libcef/browser_webview_delegate.cc?r=475#629 Maybe we shall not check wmode value at all and do the same?
Allan Sandfeld Jensen
Comment 7 2013-03-18 09:36:20 PDT
Comment on attachment 179666 [details] Force flash to windowless mode View in context: https://bugs.webkit.org/attachment.cgi?id=179666&action=review I am not sure about the behaviour change yet, but as a minimum it needs to be identical in WebKit2 in WebFrameLoaderClient.cpp > Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp:1537 > + if ((equalIgnoringCase(values[wmodeIndex], "window")) || (equalIgnoringCase(values[wmodeIndex], "default"))) Wrong indentation.
Mozhaev Grigory
Comment 8 2013-03-18 09:47:35 PDT
Finally we made a decision to have the following condition (near to which chrome has): + } else if (!equalIgnoringCase(values[wmodeIndex], "direct")) + values[wmodeIndex] = "opaque"; otherwise there is a cases when 'default' means by different aliases on different sites (or even absence of wmode means as 'default' on some of them) and we still get windowed flash. On the other side the 'direct' should be always windowed (at least it needs special direct painting surface which qt can't provide this time on graphicsscene, correct me if I'm wrong), but this is different issue. (In reply to comment #7) > (From update of attachment 179666 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=179666&action=review > > I am not sure about the behaviour change yet, but as a minimum it needs to be identical in WebKit2 in WebFrameLoaderClient.cpp > > > Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp:1537 > > + if ((equalIgnoringCase(values[wmodeIndex], "window")) || (equalIgnoringCase(values[wmodeIndex], "default"))) > > Wrong indentation.
Note You need to log in before you can comment on or make changes to this bug.