RESOLVED FIXED 37769
[Gtk] Flash item placed on wrong location right after load
https://bugs.webkit.org/show_bug.cgi?id=37769
Summary [Gtk] Flash item placed on wrong location right after load
Frederik Himpe
Reported 2010-04-18 02:15:10 PDT
Visit http://www.demorgen using Epiphany or Midori with webkitgtk 1.2.0. After load, a Flash item will be placed on top of the page. when scrolling, the element is moved to the correct place neare the bottom of the page. It should have been on this location automatically from the beginning.
Attachments
Patch (6.58 KB, patch)
2011-02-23 13:42 PST, Martin Robinson
no flags
Patch with a manual-test (7.76 KB, patch)
2011-02-23 14:22 PST, Martin Robinson
no flags
Frederik Himpe
Comment 1 2010-04-18 02:15:52 PDT
Nicolas Dufresne
Comment 2 2010-12-10 11:56:23 PST
So far on current trunk I get an assertion (ASSERTION FAILED: m_state == ParsingState). Might be related, I'll comment it out, so see how far I'll get.
Nicolas Dufresne
Comment 3 2010-12-10 12:11:24 PST
I've commented that assertion and bug cannot be reproduced on latest trunk. Will file another bug for this assertion with proper information.
Martin Robinson
Comment 4 2011-02-23 12:56:23 PST
The issue here seems to be http://trac.webkit.org/changeset/55238. Flash content is somehow getting an incorrect allocation when the plugin is added. Possibly the frameRect and the m_windowRect have diverged at this point. Here is a page that reproduces the original Java issue: http://download.oracle.com/javase/tutorial/deployment/applet/getStarted.html Removing the work around results in the Java applet not rendering until a scroll, focus change or resize.
Martin Robinson
Comment 5 2011-02-23 13:42:15 PST
Xan Lopez
Comment 6 2011-02-23 13:57:20 PST
Comment on attachment 83539 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=83539&action=review Since the patch seems to clearly improve some broken cases I guess we can go for it, but honestly we should either improve our tests or stop messing with this code. > Source/WebCore/plugins/gtk/PluginViewGtk.cpp:534 > + *(m_delayedAllocation.get()) = allocation; Can't we just store a 'GtkAllocation' in the struct and copy the values? Seems more straightforward.
Martin Robinson
Comment 7 2011-02-23 14:22:56 PST
Created attachment 83551 [details] Patch with a manual-test
Martin Robinson
Comment 8 2011-02-23 14:23:27 PST
I've managed to make a manual-test for this issue. It seems that it only appears when the Flash content is in an iframe. Uploaded a new patch.
Xan Lopez
Comment 9 2011-02-23 14:31:11 PST
Comment on attachment 83551 [details] Patch with a manual-test View in context: https://bugs.webkit.org/attachment.cgi?id=83551&action=review Thank you for making a test! > Source/WebCore/plugins/gtk/PluginViewGtk.cpp:534 > + *(m_delayedAllocation.get()) = allocation; g_memdup?
Martin Robinson
Comment 10 2011-02-23 15:07:16 PST
Martin Robinson
Comment 11 2011-02-23 15:07:41 PST
Comment on attachment 83551 [details] Patch with a manual-test Thanks for the review! Landed with the g_memdup change.
Note You need to log in before you can comment on or make changes to this bug.