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

Unified Diff: lib/elemHideHitRegistration.js

Issue 6201308310667264: Issue 521- Inject our stylesheet on per-site basis rather than globally (Closed)
Patch Set: WIP Created June 4, 2014, 5:55 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/elemHideHitRegistration.js
===================================================================
--- a/lib/elemHideHitRegistration.js
+++ b/lib/elemHideHitRegistration.js
@@ -119,24 +119,23 @@ HitRegistrationChannel.prototype = {
try {
listener.onStopRequest(this, context, Cr.NS_OK);
} catch(e) {}
}, this);
},
open: function()
{
- let {Policy} = require("contentPolicy");
let {ElemHide} = require("elemHide");
let data = "<bindings xmlns='http://www.mozilla.org/xbl'><binding id='dummy'/></bindings>";
let filter = ElemHide.getFilterByKey(this.key);
if (filter)
{
let wnd = Utils.getRequestWindow(this);
- if (wnd && wnd.document && !Policy.processNode(wnd, wnd.document, Policy.type.ELEMHIDE, filter))
+ if (wnd && wnd.document && !ElemHide.shouldAllowLoad(wnd, filter))
data = "<bindings xmlns='http://www.mozilla.org/xbl'/>";
}
let stream = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(Ci.nsIStringInputStream);
stream.setData(data, data.length);
return stream;
},
isPending: function()
« lib/contentPolicy.js ('K') | « lib/elemHide.js ('k') | lib/filterListener.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld