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
=== modified file 'midori/midori-tab.vala'
--- midori/midori-tab.vala 2013-05-19 09:33:02 +0000
+++ midori/midori-tab.vala 2013-06-21 23:25:28 +0000
@@ -109,7 +109,6 @@
109109
110 public void inject_stylesheet (string stylesheet) {110 public void inject_stylesheet (string stylesheet) {
111#if !HAVE_WEBKIT2111#if !HAVE_WEBKIT2
112 #if HAVE_DOM
113 var dom = web_view.get_dom_document ();112 var dom = web_view.get_dom_document ();
114 try {113 try {
115 var style = dom.create_element ("style");114 var style = dom.create_element ("style");
@@ -121,19 +120,6 @@
121 catch (Error error) {120 catch (Error error) {
122 critical (_("Failed to inject stylesheet: %s"), error.message);121 critical (_("Failed to inject stylesheet: %s"), error.message);
123 }122 }
124 #else
125 web_view.execute_script ("""
126 (function () {
127 var style = document.createElement ('style');
128 style.setAttribute ('type', 'text/css');
129 style.appendChild (document.createTextNode ('%s'));
130 var head = document.getElementsByTagName ('head')[0];
131 if (head) head.appendChild (style);
132 else document.documentElement.insertBefore
133 (style, document.documentElement.firstChild);
134 }) ();
135 """.printf (stylesheet));
136 #endif
137#endif123#endif
138 }124 }
139125

Subscribers

People subscribed via source and target branches

to all changes: