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

Delta Between Two Patch Sets: lib/elemHideHitRegistration.js

Issue 6019524214128640: Issue 1241 - Element hiding exceptions broken in Firefox 34 (Closed)
Left Patch Set: Created Aug. 18, 2014, 10:54 a.m.
Right Patch Set: Added comment Created Aug. 18, 2014, 11:25 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 try { 119 try {
120 listener.onStopRequest(this, context, Cr.NS_OK); 120 listener.onStopRequest(this, context, Cr.NS_OK);
121 } catch(e) {} 121 } catch(e) {}
122 }, this); 122 }, this);
123 }, 123 },
124 124
125 open: function() 125 open: function()
126 { 126 {
127 let {Policy} = require("contentPolicy"); 127 let {Policy} = require("contentPolicy");
128 let {ElemHide} = require("elemHide"); 128 let {ElemHide} = require("elemHide");
129
130 // This dummy binding below won't have any effect on the element. For
131 // elements that should be hidden however we don't return any binding at
132 // all, this makes Gecko stop constructing the node - it cannot be shown.
129 let data = "<bindings xmlns='http://www.mozilla.org/xbl'><binding id='dummy' bindToUntrustedContent='true'/></bindings>"; 133 let data = "<bindings xmlns='http://www.mozilla.org/xbl'><binding id='dummy' bindToUntrustedContent='true'/></bindings>";
130 let filter = ElemHide.getFilterByKey(this.key); 134 let filter = ElemHide.getFilterByKey(this.key);
131 if (filter) 135 if (filter)
132 { 136 {
133 let wnd = Utils.getRequestWindow(this); 137 let wnd = Utils.getRequestWindow(this);
134 if (wnd && wnd.document && !Policy.processNode(wnd, wnd.document, Policy.t ype.ELEMHIDE, filter)) 138 if (wnd && wnd.document && !Policy.processNode(wnd, wnd.document, Policy.t ype.ELEMHIDE, filter))
135 data = "<bindings xmlns='http://www.mozilla.org/xbl'/>"; 139 data = "<bindings xmlns='http://www.mozilla.org/xbl'/>";
136 } 140 }
137 141
138 let stream = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(Ci.n sIStringInputStream); 142 let stream = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(Ci.n sIStringInputStream);
(...skipping 12 matching lines...) Expand all
151 { 155 {
152 throw Cr.NS_ERROR_NOT_IMPLEMENTED; 156 throw Cr.NS_ERROR_NOT_IMPLEMENTED;
153 }, 157 },
154 resume: function() 158 resume: function()
155 { 159 {
156 throw Cr.NS_ERROR_NOT_IMPLEMENTED; 160 throw Cr.NS_ERROR_NOT_IMPLEMENTED;
157 }, 161 },
158 162
159 QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannel, Ci.nsIRequest]) 163 QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannel, Ci.nsIRequest])
160 }; 164 };
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld