Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(601)

Unified Diff: Source/core/dom/StyleElement.h

Issue 516273002: Move plugin placeholder style to CSS, and allow it to bypass main world CSP. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: whitelist an explicit string Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/StyleElement.h
diff --git a/Source/core/dom/StyleElement.h b/Source/core/dom/StyleElement.h
index 7949fc465f9cd7c80e423389b93c5afc45dc015e..45d8b00cf880abd981b6c4597a389ade4ba2b670 100644
--- a/Source/core/dom/StyleElement.h
+++ b/Source/core/dom/StyleElement.h
@@ -54,6 +54,10 @@ protected:
void childrenChanged(Element*);
void finishParsingChildren(Element*);
+ // Authorized a particular string to be used, even if CSP does not permit
+ // inline style.
+ void whitelistSource(const String& source) { m_whitelistedSource = source; }
+
RefPtrWillBeMember<CSSStyleSheet> m_sheet;
private:
@@ -65,6 +69,7 @@ private:
bool m_loading : 1;
bool m_registeredAsCandidate : 1;
TextPosition m_startPosition;
+ String m_whitelistedSource;
};
}

Powered by Google App Engine
This is Rietveld 408576698