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

Delta Between Two Patch Sets: lib/devtools.js

Issue 29370970: [adblockpluschrome] Issue 3596 - Added support for CSS property filters to devtools panel (Closed)
Left Patch Set: Use Array of Arrays instead of Map in ElementHidingTracer Created Feb. 10, 2017, 10:45 a.m.
Right Patch Set: Addressed review comment Created Feb. 23, 2017, 2:23 p.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 | « include.preload.js ('k') | 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 <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 "use strict"; 18 "use strict";
19 19
20 let {RegExpFilter, 20 const {RegExpFilter,
21 WhitelistFilter, 21 WhitelistFilter,
22 ElemHideFilter, 22 ElemHideFilter,
23 ElemHideEmulationFilter} = require("filterClasses"); 23 ElemHideEmulationFilter} = require("filterClasses");
24 24
25 let {SpecialSubscription} = require("subscriptionClasses"); 25 const {SpecialSubscription} = require("subscriptionClasses");
26 let {FilterStorage} = require("filterStorage"); 26 const {FilterStorage} = require("filterStorage");
27 let {defaultMatcher} = require("matcher"); 27 const {defaultMatcher} = require("matcher");
28 let {FilterNotifier} = require("filterNotifier"); 28 const {FilterNotifier} = require("filterNotifier");
29 let {extractHostFromFrame} = require("url"); 29 const {extractHostFromFrame} = require("url");
30 let {port} = require("messaging"); 30 const {port} = require("messaging");
31 31
32 const nonRequestTypes = ["DOCUMENT", "ELEMHIDE", "GENERICBLOCK", "GENERICHIDE"]; 32 const nonRequestTypes = ["DOCUMENT", "ELEMHIDE", "GENERICBLOCK", "GENERICHIDE"];
33 33
34 // Mapping of inspected tabs to their devpanel page 34 // Mapping of inspected tabs to their devpanel page
35 // and recorded items. We can't use a PageMap here, 35 // and recorded items. We can't use a PageMap here,
36 // because data must persist after navigation/reload. 36 // because data must persist after navigation/reload.
37 let panels = Object.create(null); 37 let panels = Object.create(null);
38 38
39 function hasPanels() 39 function hasPanels()
40 { 40 {
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 panels[inspectedTabId] = {port: port, records: []}; 382 panels[inspectedTabId] = {port: port, records: []};
383 }); 383 });
384 384
385 port.on("devtools.traceElemHide", (message, sender) => 385 port.on("devtools.traceElemHide", (message, sender) =>
386 { 386 {
387 logHiddenElements( 387 logHiddenElements(
388 sender.page, message.selectors, 388 sender.page, message.selectors,
389 extractHostFromFrame(sender.frame) 389 extractHostFromFrame(sender.frame)
390 ); 390 );
391 }); 391 });
LEFTRIGHT

Powered by Google App Engine
This is Rietveld