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

Delta Between Two Patch Sets: iconAnimation.js

Issue 5464830253203456: Refactored the abstraction layer to address prerendered pages on Safari caused by leaky abstraction (Closed)
Left Patch Set: Rebased and addressed comments Created April 7, 2014, 1:14 p.m.
Right Patch Set: Addressed comments Created April 11, 2014, 2:47 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 | « ext/common.js ('k') | lib/stats.js » ('j') | 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 { 43 {
44 this._icons.set(page, icon); 44 this._icons.set(page, icon);
45 45
46 if (this._animatedPages.has(page)) 46 if (this._animatedPages.has(page))
47 this._updateIcon(page); 47 this._updateIcon(page);
48 }, 48 },
49 _start: function() 49 _start: function()
50 { 50 {
51 this._interval = setInterval(function() 51 this._interval = setInterval(function()
52 { 52 {
53 ext.pages.query({active: true, visibleWindow: true}, function(pages) 53 ext.pages.query({active: true}, function(pages)
54 { 54 {
55 if (pages.length == 0) 55 if (pages.length == 0)
56 return; 56 return;
57 57
58 for (var i = 0; i < pages.length; i++) 58 for (var i = 0; i < pages.length; i++)
59 this._animatedPages.set(pages[i], null); 59 this._animatedPages.set(pages[i], null);
60 60
61 var interval = setInterval(function() 61 var interval = setInterval(function()
62 { 62 {
63 this._step++; 63 this._step++;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 if (this._step < 10) 99 if (this._step < 10)
100 suffix += "-" + this._step; 100 suffix += "-" + this._step;
101 101
102 path = path.replace(/(?=\..+$)/, suffix); 102 path = path.replace(/(?=\..+$)/, suffix);
103 } 103 }
104 104
105 page.browserAction.setIcon(path); 105 page.browserAction.setIcon(path);
106 } 106 }
107 }; 107 };
LEFTRIGHT

Powered by Google App Engine
This is Rietveld