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); |