| Index: Source/core/css/CSSStyleSheet.cpp
|
| diff --git a/Source/core/css/CSSStyleSheet.cpp b/Source/core/css/CSSStyleSheet.cpp
|
| index 71871efde40c748ea039a5f756f3f5a7ae2e5bad..bd943f93046036b416e150320d2366bdc58a4fc0 100644
|
| --- a/Source/core/css/CSSStyleSheet.cpp
|
| +++ b/Source/core/css/CSSStyleSheet.cpp
|
| @@ -289,7 +289,8 @@ unsigned CSSStyleSheet::insertRule(const String& ruleString, unsigned index, Exc
|
| exceptionState.throwDOMException(IndexSizeError, "The index provided (" + String::number(index) + ") is larger than the maximum index (" + String::number(length()) + ").");
|
| return 0;
|
| }
|
| - CSSParserContext context(m_contents->parserContext(), UseCounter::getFrom(this));
|
| + Document* ownerDoc = ownerDocument();
|
| + CSSParserContext context(m_contents->parserContext(), ownerDoc ? ownerDoc->frame() : 0, UseCounter::getFrom(this));
|
| RefPtrWillBeRawPtr<StyleRuleBase> rule = CSSParser::parseRule(context, m_contents.get(), ruleString);
|
|
|
| // FIXME: @namespace rules have special handling in the CSSOM spec, but it
|
|
|