 Issue 29958567:
  Issue 7104 - Clear style sheets when frame structure is updated  (Closed) 
  Base URL: https://hg.adblockplus.org/adblockpluschrome/
    
  
    Issue 29958567:
  Issue 7104 - Clear style sheets when frame structure is updated  (Closed) 
  Base URL: https://hg.adblockplus.org/adblockpluschrome/| Left: | ||
| Right: | 
| LEFT | RIGHT | 
|---|---|
| 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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 framesOfTabs.set(tabId, frames); | 126 framesOfTabs.set(tabId, frames); | 
| 127 } | 127 } | 
| 128 | 128 | 
| 129 let frame = frames.get(frameId); | 129 let frame = frames.get(frameId); | 
| 130 if (!frame) | 130 if (!frame) | 
| 131 { | 131 { | 
| 132 frame = {}; | 132 frame = {}; | 
| 133 frames.set(frameId, frame); | 133 frames.set(frameId, frame); | 
| 134 } | 134 } | 
| 135 | 135 | 
| 136 frame.state = {}; | 136 frame.state = Object.create(null); | 
| 
kzar
2018/12/19 10:22:00
Nit: How about `Object.create(null)`?
 
Manish Jethani
2018/12/19 13:03:54
Done.
 | |
| 137 | 137 | 
| 138 return frame; | 138 return frame; | 
| 139 } | 139 } | 
| 140 | 140 | 
| 141 function updatePageFrameStructure(frameId, tabId, url, parentFrameId) | 141 function updatePageFrameStructure(frameId, tabId, url, parentFrameId) | 
| 142 { | 142 { | 
| 143 if (frameId == 0) | 143 if (frameId == 0) | 
| 144 { | 144 { | 
| 145 let page = new Page({id: tabId, url}); | 145 let page = new Page({id: tabId, url}); | 
| 146 | 146 | 
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 519 return frames.get(0) || null; | 519 return frames.get(0) || null; | 
| 520 } | 520 } | 
| 521 }; | 521 }; | 
| 522 } | 522 } | 
| 523 | 523 | 
| 524 return ext.onMessage._dispatch( | 524 return ext.onMessage._dispatch( | 
| 525 message, sender, sendResponse | 525 message, sender, sendResponse | 
| 526 ).includes(true); | 526 ).includes(true); | 
| 527 }); | 527 }); | 
| 528 } | 528 } | 
| LEFT | RIGHT |