Chromium Code Reviews| Index: Source/core/css/resolver/ScopedStyleResolver.cpp |
| diff --git a/Source/core/css/resolver/ScopedStyleResolver.cpp b/Source/core/css/resolver/ScopedStyleResolver.cpp |
| index 3190423c3475c843f8b945b41a9dc98ec57d7d73..ff52d8e89a5db3054c940b190359c642920a256c 100644 |
| --- a/Source/core/css/resolver/ScopedStyleResolver.cpp |
| +++ b/Source/core/css/resolver/ScopedStyleResolver.cpp |
| @@ -46,25 +46,15 @@ ContainerNode* ScopedStyleResolver::scopingNodeFor(Document& document, const CSS |
| { |
| ASSERT(sheet); |
| - Document* sheetDocument = sheet->ownerDocument(); |
| - if (!sheetDocument) |
| - return 0; |
|
tasak
2014/06/03 05:57:48
I think, this code is not related to style scoped.
kochi
2014/06/03 07:47:05
Thanks for the explanation.
I'll separate changes
|
| Node* ownerNode = sheet->ownerNode(); |
| if (!isHTMLStyleElement(ownerNode)) |
| return &document; |
| HTMLStyleElement& styleElement = toHTMLStyleElement(*ownerNode); |
| - if (!styleElement.scoped()) { |
| - if (styleElement.isInShadowTree()) |
| - return styleElement.containingShadowRoot(); |
| - return &document; |
| - } |
| - |
| - ContainerNode* parent = styleElement.parentNode(); |
| - if (!parent) |
| - return 0; |
| + if (styleElement.isInShadowTree()) |
|
tasak
2014/06/03 05:57:48
If we keep isScoped method in HTMLStyleElement, it
kochi
2014/06/03 07:47:05
As I removed isScoepd(), isInShadowTree() is fine
|
| + return styleElement.containingShadowRoot(); |
| - return (parent->isElementNode() || parent->isShadowRoot()) ? parent : 0; |
| + return &document; |
| } |
| void ScopedStyleResolver::addRulesFromSheet(CSSStyleSheet* cssSheet, const MediaQueryEvaluator& medium, StyleResolver* resolver) |