Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/elemHideHitRegistration.js

Issue 6266581101314048: WIP: Have one global element hide stylesheet and inject the other ones per site (Closed)
Patch Set: rebased Created Aug. 19, 2014, 12:15 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/elemHide.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 let {ElemHide} = require("elemHide"); 128 let {ElemHide} = require("elemHide");
129 let data = "<bindings xmlns='http://www.mozilla.org/xbl'><binding id='dummy' /></bindings>"; 129 let data = "<bindings xmlns='http://www.mozilla.org/xbl'><binding id='dummy' /></bindings>";
130 let filter = ElemHide.getFilterByKey(this.key); 130 let filter = ElemHide.getFilterByKey(this.key);
131 if (filter) 131 if (filter)
132 { 132 {
133 let wnd = Utils.getRequestWindow(this); 133 let wnd = Utils.getRequestWindow(this);
134 if (wnd && wnd.document && !Policy.processNode(wnd, wnd.document, Policy.t ype.ELEMHIDE, filter)) 134 if (wnd && wnd.document && !Policy.processNode(wnd, wnd.document, Policy.t ype.ELEMHIDE, filter))
135 data = "<bindings xmlns='http://www.mozilla.org/xbl'/>"; 135 data = "<bindings xmlns='http://www.mozilla.org/xbl'/>";
136 } 136 }
137 137
138 dump("filter: " + filter + "data: " + data + "\n");
139
138 let stream = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(Ci.n sIStringInputStream); 140 let stream = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(Ci.n sIStringInputStream);
139 stream.setData(data, data.length); 141 stream.setData(data, data.length);
140 return stream; 142 return stream;
141 }, 143 },
142 isPending: function() 144 isPending: function()
143 { 145 {
144 return false; 146 return false;
145 }, 147 },
146 cancel: function() 148 cancel: function()
147 { 149 {
148 throw Cr.NS_ERROR_NOT_IMPLEMENTED; 150 throw Cr.NS_ERROR_NOT_IMPLEMENTED;
149 }, 151 },
150 suspend: function() 152 suspend: function()
151 { 153 {
152 throw Cr.NS_ERROR_NOT_IMPLEMENTED; 154 throw Cr.NS_ERROR_NOT_IMPLEMENTED;
153 }, 155 },
154 resume: function() 156 resume: function()
155 { 157 {
156 throw Cr.NS_ERROR_NOT_IMPLEMENTED; 158 throw Cr.NS_ERROR_NOT_IMPLEMENTED;
157 }, 159 },
158 160
159 QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannel, Ci.nsIRequest]) 161 QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannel, Ci.nsIRequest])
160 }; 162 };
OLDNEW
« no previous file with comments | « lib/elemHide.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld