Bug 158697

Summary: [GTK][Wayland] evince-browser-plugin prevents viewing PDFs
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebKitGTKAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, bugs-noreply, cgarcia, commit-queue, gustavo, mcatanzaro, mrobinson
Priority: P2    
Version: Other   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 81456    
Attachments:
Description Flags
Patch
cgarcia: review-
Patch
mcatanzaro: review+
Archive of layout-test-results from ews115 for mac-yosemite none

Michael Catanzaro
Reported 2016-06-13 10:25:32 PDT
When running in Wayland with evince-browser-plugin installed, PDF surfaces are completely black and it's impossible to view PDFs. Only solution is to uninstall the evince-browser-plugin. It's probably a regression from r196053.
Attachments
Patch (2.84 KB, patch)
2016-09-03 07:38 PDT, Michael Catanzaro
cgarcia: review-
Patch (2.75 KB, patch)
2016-09-06 02:44 PDT, Carlos Garcia Campos
mcatanzaro: review+
Archive of layout-test-results from ews115 for mac-yosemite (1.55 MB, application/zip)
2016-09-06 03:46 PDT, Build Bot
no flags
Michael Catanzaro
Comment 1 2016-08-17 01:08:04 PDT
Note that in Fedora, I've disabled windowless NPAPI plugins in Wayland as a crappy workaround for this, since being able to download PDFs is much more important than being able to install GNOME shell extensions.
Michael Catanzaro
Comment 2 2016-09-03 07:28:41 PDT
I think we should do this upstream, even if it's just a workaround and not a real fix. gnome-session 3.21.91 still defaults to the Wayland session, and it seems quite unlikely that's going to change in the next couple of weeks, so this is going to be a major user experience issue in 3.22.
Michael Catanzaro
Comment 3 2016-09-03 07:38:12 PDT
WebKit Commit Bot
Comment 4 2016-09-03 07:40:09 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Carlos Garcia Campos
Comment 5 2016-09-04 01:53:29 PDT
Comment on attachment 287861 [details] Patch I'm going to check the issue this week. If I don't have a better solution, I'm fine with a workaround, but we can probably blacklist the evince plugin only instead of disabling all plugins.
Carlos Garcia Campos
Comment 6 2016-09-05 05:57:10 PDT
I've checked this, and I don't think it's a WebKit issue. The evince browser plugin shouldn't claim to support handling PDF documents (well, or any other supported format) on systems that don't support XEmbed. I've patched evince to fail to initialize on wayland and it works. However, there's another problem that needs to be fixed in WebKit. The plugin cache assumes that a plugin is supported on any platform supporting plugins. So, if you update evince, load anything in X11, the cache is updated, then load a PDF in wayland and the information is taken form the cache. We need to add the display information to the cache, somehow.
Carlos Garcia Campos
Comment 7 2016-09-05 06:08:36 PDT
I think the easiest solution would to be have a different plugin cache for every display type. ~/.cache/webkitgtk/plugins-x11 ~/.cache/webkitgtk/plugins-wayland that way we don't need to change the file format, nor the code handling plugins info, etc.
Carlos Garcia Campos
Comment 8 2016-09-06 02:44:17 PDT
Build Bot
Comment 9 2016-09-06 03:46:00 PDT
Comment on attachment 288004 [details] Patch Attachment 288004 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2016842 New failing tests: transitions/default-timing-function.html
Build Bot
Comment 10 2016-09-06 03:46:03 PDT
Created attachment 288012 [details] Archive of layout-test-results from ews115 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-yosemite Platform: Mac OS X 10.10.5
Carlos Garcia Campos
Comment 11 2016-09-06 09:30:13 PDT
Note You need to log in before you can comment on or make changes to this bug.