Merge lp:~kalikiana/midori/webkit1.8.3b into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: André Stösel
Approved revision: 6222
Merged at revision: 6230
Proposed branch: lp:~kalikiana/midori/webkit1.8.3b
Merge into: lp:midori
Diff against target: 30 lines (+0/-14)
1 file modified
midori/midori-tab.vala (+0/-14)
To merge this branch: bzr merge lp:~kalikiana/midori/webkit1.8.3b
Reviewer Review Type Date Requested Status
André Stösel Approve
Review via email: mp+170920@code.launchpad.net

Commit message

Drop non-DOM style sheet injection code path

Description of the change

Drop non-DOM style sheet injection code path

To post a comment you must log in.
Revision history for this message
André Stösel (ivaldi) wrote :

Looks good to me!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'midori/midori-tab.vala'
2--- midori/midori-tab.vala 2013-05-19 09:33:02 +0000
3+++ midori/midori-tab.vala 2013-06-21 23:25:28 +0000
4@@ -109,7 +109,6 @@
5
6 public void inject_stylesheet (string stylesheet) {
7 #if !HAVE_WEBKIT2
8- #if HAVE_DOM
9 var dom = web_view.get_dom_document ();
10 try {
11 var style = dom.create_element ("style");
12@@ -121,19 +120,6 @@
13 catch (Error error) {
14 critical (_("Failed to inject stylesheet: %s"), error.message);
15 }
16- #else
17- web_view.execute_script ("""
18- (function () {
19- var style = document.createElement ('style');
20- style.setAttribute ('type', 'text/css');
21- style.appendChild (document.createTextNode ('%s'));
22- var head = document.getElementsByTagName ('head')[0];
23- if (head) head.appendChild (style);
24- else document.documentElement.insertBefore
25- (style, document.documentElement.firstChild);
26- }) ();
27- """.printf (stylesheet));
28- #endif
29 #endif
30 }
31

Subscribers

People subscribed via source and target branches

to all changes: