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

Delta Between Two Patch Sets: lib/ui.js

Issue 5294633391226880: issue 1435 - Port popup.html from Chrome/Safari/Opera to Firefox (Closed)
Left Patch Set: Created Sept. 26, 2014, 12:48 p.m.
Right Patch Set: Created Oct. 27, 2014, 9:40 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
« chrome/content/ui/utils.js ('K') | « chrome/skin/popup.png ('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 <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 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 (contentContextMenu instanceof Array && contentContextMenu.indexOf(popup .id) >= 0)) 1285 (contentContextMenu instanceof Array && contentContextMenu.indexOf(popup .id) >= 0))
1286 { 1286 {
1287 this.fillContentContextMenu(popup); 1287 this.fillContentContextMenu(popup);
1288 } 1288 }
1289 else if (popup.id == "abp-tooltip") 1289 else if (popup.id == "abp-tooltip")
1290 this.fillIconTooltip(event, popup.ownerDocument.defaultView); 1290 this.fillIconTooltip(event, popup.ownerDocument.defaultView);
1291 else 1291 else
1292 { 1292 {
1293 let match = /^(abp-(toolbar|status|menuitem)-)popup$/.exec(popup.id); 1293 let match = /^(abp-(toolbar|status|menuitem)-)popup$/.exec(popup.id);
1294 if (match) 1294 if (match)
1295 { 1295 {
Thomas Greiner 2014/09/29 16:19:49 What about adding the following line to avoid acce
saroyanm 2014/10/02 07:53:56 I like it. Done.
1296 if (match[2] == "toolbar" || match[2] == "status") 1296 let [, prefix, name] = match;
1297 let window = popup.ownerDocument.defaultView;
1298 if (name == "toolbar" || name == "status")
1297 { 1299 {
1298 let window = popup.ownerDocument.defaultView; 1300 let browser = window.document.getElementById(prefix + "popup-browser") ;
1299 let browser = window.document.getElementById(match[1] + "popup-browser ");
1300 browser.setAttribute("src", "chrome://adblockplus/content/ui/popup.htm l"); 1301 browser.setAttribute("src", "chrome://adblockplus/content/ui/popup.htm l");
1301 } 1302 }
1302 else 1303 else
1303 this.fillIconMenu(event, popup.ownerDocument.defaultView, match[1]); 1304 this.fillIconMenu(event, window, prefix);
1304 } 1305 }
1305 } 1306 }
1306 }, 1307 },
1307 1308
1308 /** 1309 /**
1309 * Called when some pop-up in the application window is being hidden 1310 * Called when some pop-up in the application window is being hidden
1310 */ 1311 */
1311 onPopupHiding: function(/**Event*/ event) 1312 onPopupHiding: function(/**Event*/ event)
1312 { 1313 {
1313 if (event.defaultPrevented) 1314 if (event.defaultPrevented)
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], 1978 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)],
1978 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] 1979 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)]
1979 ]; 1980 ];
1980 1981
1981 onShutdown.add(function() 1982 onShutdown.add(function()
1982 { 1983 {
1983 for (let window in UI.applicationWindows) 1984 for (let window in UI.applicationWindows)
1984 if (UI.isBottombarOpen(window)) 1985 if (UI.isBottombarOpen(window))
1985 UI.toggleBottombar(window); 1986 UI.toggleBottombar(window);
1986 }); 1987 });
LEFTRIGHT

Powered by Google App Engine
This is Rietveld