After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679372 - Port user style sheet to WebKit2
Port user style sheet to WebKit2
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Backend
git master
Other Linux
: Normal normal
: ---
Assigned To: Xan Lopez
Epiphany Maintainers
Depends on:
Blocks: 678610
 
 
Reported: 2012-07-04 07:17 UTC by Carlos Garcia Campos
Modified: 2013-03-18 16:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use a custom WebKitWebViewGroup for all ephy web views (5.15 KB, patch)
2013-03-17 15:55 UTC, Carlos Garcia Campos
committed Details | Review
Patch (3.57 KB, patch)
2013-03-17 15:57 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2012-07-04 07:17:01 UTC
There's no API in WebKit2 to set a user style sheet yet.
Comment 1 Carlos Garcia Campos 2012-10-11 17:05:06 UTC
See https://bugs.webkit.org/show_bug.cgi?id=99081
Comment 2 Carlos Garcia Campos 2013-03-17 15:55:58 UTC
Created attachment 239065 [details] [review]
Use a custom WebKitWebViewGroup for all ephy web views
Comment 3 Carlos Garcia Campos 2013-03-17 15:57:07 UTC
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?
Comment 4 Carlos Garcia Campos 2013-03-17 16:02:37 UTC
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.
Comment 5 Carlos Garcia Campos 2013-03-17 16:03:35 UTC
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
Comment 6 Carlos Garcia Campos 2013-03-18 09:50:36 UTC
The WebKit patch landed already in the stable branch,
Comment 7 Xan Lopez 2013-03-18 14:12:08 UTC
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?
Comment 8 Xan Lopez 2013-03-18 14:17:09 UTC
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.
Comment 9 Xan Lopez 2013-03-18 14:18:04 UTC
Review of attachment 239065 [details] [review]:

OK.
Comment 10 Carlos Garcia Campos 2013-03-18 16:31:51 UTC
(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?