Commit ae26e11a authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

net-internals: Fix same-origin policy violation.

It was modifying a style sheet from another origin to hide some UI
elements when capturing was stopped. This CL makes it add another sheet
instead.

Bug: 788061
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I734543786e80d5046b93fda1e970f9e5e40f6096
Reviewed-on: https://chromium-review.googlesource.com/794542Reviewed-by: default avatarEric Roman <eroman@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519940}
parent 364cc9e9
......@@ -143,8 +143,11 @@ var MainView = (function() {
stopCapturing: function() {
g_browser.disable();
document.styleSheets[0].insertRule(
'.hide-when-not-capturing { display: none; }', 0);
var sheet = document.createElement('style');
sheet.type = 'text/css';
sheet.appendChild(document.createTextNode(
'.hide-when-not-capturing { display: none; }'));
document.head.appendChild(sheet);
},
initTabs_: function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment