Bug 158697 - [GTK][Wayland] evince-browser-plugin prevents viewing PDFs
Summary: [GTK][Wayland] evince-browser-plugin prevents viewing PDFs
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
Depends on:
Blocks: 81456
  Show dependency treegraph
Reported: 2016-06-13 10:25 PDT by Michael Catanzaro
Modified: 2016-09-06 09:30 PDT (History)
7 users (show)

See Also:

Patch (2.84 KB, patch)
2016-09-03 07:38 PDT, Michael Catanzaro
cgarcia: review-
Details | Formatted Diff | Diff
Patch (2.75 KB, patch)
2016-09-06 02:44 PDT, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff
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 Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 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.
Comment 1 Michael Catanzaro 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.
Comment 2 Michael Catanzaro 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.
Comment 3 Michael Catanzaro 2016-09-03 07:38:12 PDT
Created attachment 287861 [details]
Comment 4 WebKit Commit Bot 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
Comment 5 Carlos Garcia Campos 2016-09-04 01:53:29 PDT
Comment on attachment 287861 [details]

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.
Comment 6 Carlos Garcia Campos 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.
Comment 7 Carlos Garcia Campos 2016-09-05 06:08:36 PDT
I think the easiest solution would to be have a different plugin cache for every display type. 


that way we don't need to change the file format, nor the code handling plugins info, etc.
Comment 8 Carlos Garcia Campos 2016-09-06 02:44:17 PDT
Created attachment 288004 [details]
Comment 9 Build Bot 2016-09-06 03:46:00 PDT
Comment on attachment 288004 [details]

Attachment 288004 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2016842

New failing tests:
Comment 10 Build Bot 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
Comment 11 Carlos Garcia Campos 2016-09-06 09:30:13 PDT
Committed r205485: <http://trac.webkit.org/changeset/205485>