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

Unified Diff: lib/contentPolicy.js

Issue 5320026647166976: Issue 1381 - Element hiding exceptions broken after #432 landing (Closed)
Patch Set: Created Sept. 18, 2014, 12:10 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
« 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/contentPolicy.js
===================================================================
--- a/lib/contentPolicy.js
+++ b/lib/contentPolicy.js
@@ -184,16 +184,17 @@ let Policy = exports.Policy =
// Data loaded by plugins should be attached to the document
if (contentType == Policy.type.OBJECT_SUBREQUEST && node instanceof Ci.nsIDOMElement)
node = node.ownerDocument;
// Fix type for objects misrepresented as frames or images
if (contentType != Policy.type.OBJECT && (node instanceof Ci.nsIDOMHTMLObjectElement || node instanceof Ci.nsIDOMHTMLEmbedElement))
contentType = Policy.type.OBJECT;
+ let thirdParty = (contentType == Policy.type.ELEMHIDE ? false : isThirdParty(location, docDomain));
Thomas Greiner 2014/09/18 12:45:37 I'm sure you tried it out but I don't see how movi
Wladimir Palant 2014/09/18 12:56:22 That variable is being accessed in line 227/228 be
Thomas Greiner 2014/09/18 13:15:10 Got it, I guess I relied to much on the browser se
Wladimir Palant 2014/09/18 13:26:16 The browser search feature is fine, it's actually
let locationText = location.spec;
if (!match && contentType == Policy.type.ELEMHIDE)
{
let testWnd = wnd;
let parentWndLocation = getWindowLocation(testWnd);
while (true)
{
let testWndLocation = parentWndLocation;
@@ -224,18 +225,16 @@ let Policy = exports.Policy =
if (exception)
{
FilterStorage.increaseHitCount(exception, wnd);
RequestNotifier.addNodeData(node, topWnd, contentType, docDomain, thirdParty, locationText, exception);
return true;
}
}
- let thirdParty = (contentType == Policy.type.ELEMHIDE ? false : isThirdParty(location, docDomain));
-
if (!match && Prefs.enabled)
{
match = defaultMatcher.matchesAny(locationText, Policy.typeDescr[contentType] || "", docDomain, thirdParty, sitekey);
if (match instanceof BlockingFilter && node.ownerDocument && !(contentType in Policy.nonVisual))
{
let prefCollapse = (match.collapse != null ? match.collapse : !Prefs.fastcollapse);
if (collapse || prefCollapse)
schedulePostProcess(node);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld