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

Unified Diff: lib/elemHideHitRegistration.js

Issue 6019524214128640: Issue 1241 - Element hiding exceptions broken in Firefox 34 (Closed)
Patch Set: Added comment Created Aug. 18, 2014, 11:25 a.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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/elemHideHitRegistration.js
===================================================================
--- a/lib/elemHideHitRegistration.js
+++ b/lib/elemHideHitRegistration.js
@@ -121,17 +121,21 @@ HitRegistrationChannel.prototype = {
} 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>";
+
+ // This dummy binding below won't have any effect on the element. For
+ // elements that should be hidden however we don't return any binding at
+ // all, this makes Gecko stop constructing the node - it cannot be shown.
+ let data = "<bindings xmlns='http://www.mozilla.org/xbl'><binding id='dummy' bindToUntrustedContent='true'/></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))
data = "<bindings xmlns='http://www.mozilla.org/xbl'/>";
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld