GNOME Bugzilla – Bug 679372
Port user style sheet to WebKit2
Last modified: 2013-03-18 16:34:47 UTC
There's no API in WebKit2 to set a user style sheet yet.
See https://bugs.webkit.org/show_bug.cgi?id=99081
Created attachment 239065 [details] [review] Use a custom WebKitWebViewGroup for all ephy web views
Created attachment 239066 [details] [review] Patch Should we monitor the file for changes? what happened in wk1 when the style sheet file changed on disk?
Btw, I think it would be great to rework the UI to take advantage of the WebKit2 API that allows to add more than one style sheet and provide a base URI for every style sheet, as well as blacklist and whitelist URIs to control the web sites that should load the style sheets. It would be a different bug though, this is about to port the existing feature to WebKit2.
The first patch can be applied now, but the second one depends on this wk bug: https://bugs.webkit.org/show_bug.cgi?id=99081
The WebKit patch landed already in the stable branch,
Comment on attachment 239065 [details] [review] Use a custom WebKitWebViewGroup for all ephy web views I don't understand how this is related to the bug. Can you explain in the patch instead of simply describing what it does?
Review of attachment 239066 [details] [review]: OK, so I guess the previous patch is needed because the style sheet stuff uses the WebGroup API. This seems OK. Not sure if we did anything special in WK1 for style sheets, what we did is to monitor local files and reload the web view if they were changed. We could do the same for this.
Review of attachment 239065 [details] [review]: OK.
(In reply to comment #8) > Review of attachment 239066 [details] [review]: > > OK, so I guess the previous patch is needed because the style sheet stuff uses > the WebGroup API. Yes, but also because it's the best way to use the API since we introduced WebKitWebViewGroup, but I haven't changed it to keep the code similar to the WebKit1. > This seems OK. Not sure if we did anything special in WK1 for style sheets, > what we did is to monitor local files and reload the web view if they were > changed. We could do the same for this. I can do that in a separate bug/patch, where's the current code for wk1 that does it?