Index: Source/core/dom/Element.cpp |
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
index 6603f42fd0700ea5c6fe48be28e9464b15a89ea1..032e275db8b73be32eb51cc8ce8f2f3095481fe3 100644 |
--- a/Source/core/dom/Element.cpp |
+++ b/Source/core/dom/Element.cpp |
@@ -1014,8 +1014,6 @@ void Element::attributeChanged(const QualifiedName& name, const AtomicString& ne |
classAttributeChanged(newValue); |
} else if (name == HTMLNames::nameAttr) { |
setHasName(!newValue.isNull()); |
- } else if (name == HTMLNames::pseudoAttr) { |
- shouldInvalidateStyle |= testShouldInvalidateStyle && isInShadowTree(); |
} |
invalidateNodeListCachesInAncestors(&name, this); |
@@ -2440,11 +2438,16 @@ String Element::textFromChildren() |
const AtomicString& Element::shadowPseudoId() const |
{ |
- return getAttribute(pseudoAttr); |
+ if (ShadowRoot* root = containingShadowRoot()) { |
+ if (root->type() == ShadowRoot::UserAgentShadowRoot) |
+ return fastGetAttribute(pseudoAttr); |
+ } |
+ return nullAtom; |
} |
void Element::setShadowPseudoId(const AtomicString& id) |
{ |
+ ASSERT(CSSSelector::parsePseudoType(id) == CSSSelector::PseudoWebKitCustomElement || CSSSelector::parsePseudoType(id) == CSSSelector::PseudoUserAgentCustomElement); |
setAttribute(pseudoAttr, id); |
} |