Commit 8a4ccd6b authored by Andrey Lushnikov's avatar Andrey Lushnikov Committed by Commit Bot

DevTools: fix rule insertion with file URLs.

This patch allows accessing rules for inspector style sheets.
Our tests didn't catch the regression since we run with
--allow-file-access-from-files flag.

Bug: 814937
Change-Id: I58eabb8e299a81c5a912d5a42175ab78ad904704
Reviewed-on: https://chromium-review.googlesource.com/935749Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539166}
parent b893f3bd
......@@ -301,6 +301,8 @@ bool CSSStyleSheet::CanAccessRules() const {
Document* document = OwnerDocument();
if (!document)
return true;
if (document->GetStyleEngine().InspectorStyleSheet() == this)
return true;
if (document->GetSecurityOrigin()->CanRequest(base_url))
return true;
if (allow_rule_access_from_origin_ &&
......
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