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

Unified Diff: Source/core/css/CSSGroupingRule.cpp

Issue 169303003: CSP 1.1: Revert CSSOM changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 6 years, 10 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
« no previous file with comments | « Source/bindings/v8/custom/V8WorkerGlobalScopeCustom.cpp ('k') | Source/core/css/CSSKeyframesRule.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSGroupingRule.cpp
diff --git a/Source/core/css/CSSGroupingRule.cpp b/Source/core/css/CSSGroupingRule.cpp
index 768f795b455d36b5d54217e74603ffc834614e24..96dce1522d7406ae10aa9c99a4c4d6eec2c90769 100644
--- a/Source/core/css/CSSGroupingRule.cpp
+++ b/Source/core/css/CSSGroupingRule.cpp
@@ -35,9 +35,7 @@
#include "core/css/parser/BisonCSSParser.h"
#include "core/css/CSSRuleList.h"
#include "core/css/CSSStyleSheet.h"
-#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
-#include "core/frame/ContentSecurityPolicy.h"
#include "core/frame/UseCounter.h"
#include "wtf/text/StringBuilder.h"
@@ -63,21 +61,12 @@ unsigned CSSGroupingRule::insertRule(const String& ruleString, unsigned index, E
{
ASSERT(m_childRuleCSSOMWrappers.size() == m_groupRule->childRules().size());
- CSSStyleSheet* styleSheet = parentStyleSheet();
- if (styleSheet) {
- if (Document* document = styleSheet->ownerDocument()) {
- if (!document->contentSecurityPolicy()->allowStyleEval()) {
- exceptionState.throwSecurityError(document->contentSecurityPolicy()->styleEvalDisabledErrorMessage());
- return 0;
- }
- }
- }
-
if (index > m_groupRule->childRules().size()) {
exceptionState.throwDOMException(IndexSizeError, "the index " + String::number(index) + " must be less than or equal to the length of the rule list.");
return 0;
}
+ CSSStyleSheet* styleSheet = parentStyleSheet();
CSSParserContext context(parserContext(), UseCounter::getFrom(styleSheet));
BisonCSSParser parser(context);
RefPtr<StyleRuleBase> newRule = parser.parseRule(styleSheet ? styleSheet->contents() : 0, ruleString);
« no previous file with comments | « Source/bindings/v8/custom/V8WorkerGlobalScopeCustom.cpp ('k') | Source/core/css/CSSKeyframesRule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698