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

Unified Diff: ext/background.js

Issue 29958567: Issue 7104 - Clear style sheets when frame structure is updated (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Dec. 4, 2018, 2:33 p.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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/background.js
===================================================================
--- a/ext/background.js
+++ b/ext/background.js
@@ -163,16 +163,18 @@
let frames = framesOfTabs.get(tabId);
let parentFrame = frames.get(parentFrameId);
if (!parentFrame && parentFrameId > 0)
parentFrame = frames.get(0);
if (parentFrame)
frame.parent = parentFrame;
+
+ frame.injectedStyleSheets = null;
}
browser.webRequest.onHeadersReceived.addListener(details =>
{
// We have to update the frame structure when switching to a new
// document, so that we process any further requests made by that
// document in the right context. Unfortunately, we cannot rely
// on webNavigation.onCommitted since it isn't guaranteed to fire
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld