GNOME Bugzilla – Bug 746166
Disable some WebKit features we don't need
Last modified: 2015-05-31 02:01:11 UTC
Created attachment 299338 [details] [review] patch Disable some WebKit features we don't need. Avoid weird crashes like https://bugzilla.redhat.com/show_bug.cgi?id=1201823 which should not be happening at all, because developer documentation does not need HTML5 local storage.
Review of attachment 299338 [details] [review]: ::: src/dh-window.c @@ +1219,3 @@ /* Prepare the web view */ view = webkit_web_view_new (); + apply_webview_settings (WEBKIT_WEB_VIEW (view)); Instead of applying these settings to every new web view created, I think we should have a global WebKitSettings object, created with those settings initially (webkit_settings_new_with_settings), and share that settings object among all web views (webkit_web_view_new_with_settings). That would also fix another problem in devhelp, that changing the fonts or font size only applies to the current tab.
Ok, I pushed that one already as I was about to roll the tarball for .92 but if there's a patch update today I'll gladly accept it.
I've tentatively added the WebKitSettings object as a member of the singleton DhSettings class, which is where all the gsettings code is. (In reply to Carlos Garcia Campos from comment #1) > That would > also fix another problem in devhelp, that changing the fonts or font size > only applies to the current tab. Hm, it's a bit more complicated than this. There is code to update the font on each tab, but it's only partially working. I don't have time to look into this more before freeze, because my jhbuild development copy of WebKit is in no state for testing things right now. But I'll try to have a new patch "soon."
That's fine; it's now hard code freeze but we can get the patch in for 3.16.1.
So the status quo in 3.14 is that font size is updated immediately in every tab in every window (i.e. it's already correct), as does checking or unchecking "use system fonts", but changing to a different font does not work at all ever, not even if I restart devhelp.
Well I guess the fonts are set by the HTML... maybe having the setting at all is more confusing than it's worth
Created attachment 300079 [details] [review] Use one WebKitSettings for each web view Here is the promised patch, but I'm not sure if we should apply it because (a) it doesn't fix anything (changing fonts across multiple tabs and windows already works fine for me, except that setting a default font family is rather useless), and (b) using one WebKitSettings object means we need to remove all the code that previously painstakingly ensured that devhelp would automatically adjust font size per-window if one screen had different DPI than another, so it will introduce a regression. I wish apps didn't have to handle DPI themselves.
I reject my patch for the reasons above. Let's close this bug. :)