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

Unified Diff: lib/devtools.js

Issue 29370970: [adblockpluschrome] Issue 3596 - Added support for CSS property filters to devtools panel (Closed)
Patch Set: Use two Arrays insteaf of Array of Arrays in ElemHidingTracer Created Feb. 13, 2017, 10:31 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
« include.preload.js ('K') | « include.preload.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/devtools.js
diff --git a/lib/devtools.js b/lib/devtools.js
index 2fdf5ec8ccde7a433a87bbac8e844519b33fb528..8ae5bfa38861a229491b1a0b4794a53b92f9a618 100644
--- a/lib/devtools.js
+++ b/lib/devtools.js
@@ -17,7 +17,11 @@
"use strict";
-let {RegExpFilter, WhitelistFilter, ElemHideFilter} = require("filterClasses");
+let {RegExpFilter,
+ WhitelistFilter,
+ ElemHideFilter,
+ ElemHideEmulationFilter} = require("filterClasses");
+
let {SpecialSubscription} = require("subscriptionClasses");
let {FilterStorage} = require("filterStorage");
let {defaultMatcher} = require("matcher");
@@ -160,6 +164,7 @@ exports.logRequest = function(page, url, type, docDomain,
function logHiddenElements(page, selectors, docDomain)
{
let panel = getActivePanel(page);
+ if (panel)
{
for (let subscription of FilterStorage.subscriptions)
{
@@ -168,7 +173,8 @@ function logHiddenElements(page, selectors, docDomain)
for (let filter of subscription.filters)
{
- if (!(filter instanceof ElemHideFilter))
+ if (!(filter instanceof ElemHideFilter) &&
+ !(filter instanceof ElemHideEmulationFilter))
continue;
if (selectors.indexOf(filter.selector) == -1)
continue;
« include.preload.js ('K') | « include.preload.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld