| Index: Source/core/css/resolver/ScopedStyleResolver.cpp
|
| diff --git a/Source/core/css/resolver/ScopedStyleResolver.cpp b/Source/core/css/resolver/ScopedStyleResolver.cpp
|
| index 693ab410ff7fb60e999c4b0cb499a512c0ce0af8..5763d0d923e72ee9ec79b7b92f5b30ebbf234451 100644
|
| --- a/Source/core/css/resolver/ScopedStyleResolver.cpp
|
| +++ b/Source/core/css/resolver/ScopedStyleResolver.cpp
|
| @@ -50,17 +50,17 @@ ContainerNode* ScopedStyleResolver::scopingNodeFor(Document& document, const CSS
|
| if (!sheetDocument)
|
| return 0;
|
| Node* ownerNode = sheet->ownerNode();
|
| - if (!ownerNode || !ownerNode->hasTagName(HTMLNames::styleTag))
|
| + if (!isHTMLStyleElement(ownerNode))
|
| return &document;
|
|
|
| - HTMLStyleElement* styleElement = toHTMLStyleElement(ownerNode);
|
| - if (!styleElement->scoped()) {
|
| - if (styleElement->isInShadowTree())
|
| - return styleElement->containingShadowRoot();
|
| + HTMLStyleElement& styleElement = toHTMLStyleElement(*ownerNode);
|
| + if (!styleElement.scoped()) {
|
| + if (styleElement.isInShadowTree())
|
| + return styleElement.containingShadowRoot();
|
| return &document;
|
| }
|
|
|
| - ContainerNode* parent = styleElement->parentNode();
|
| + ContainerNode* parent = styleElement.parentNode();
|
| if (!parent)
|
| return 0;
|
|
|
|
|