Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Unified Diff: Source/core/dom/Element.cpp

Issue 187573002: Revert "Reverting custom pseudo element". (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/Element.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 9f85ee93bf3a2dc8e26e5ad49a0538bbbf05acbe..db27e175c2aa74741ba947c6aa5c8191729d92c8 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1034,6 +1034,8 @@ 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);
@@ -2435,16 +2437,11 @@ String Element::textFromChildren()
const AtomicString& Element::shadowPseudoId() const
{
- if (ShadowRoot* root = containingShadowRoot()) {
- if (root->type() == ShadowRoot::UserAgentShadowRoot)
- return fastGetAttribute(pseudoAttr);
- }
- return nullAtom;
+ return getAttribute(pseudoAttr);
}
void Element::setShadowPseudoId(const AtomicString& id)
{
- ASSERT(CSSSelector::parsePseudoType(id) == CSSSelector::PseudoWebKitCustomElement || CSSSelector::parsePseudoType(id) == CSSSelector::PseudoUserAgentCustomElement);
setAttribute(pseudoAttr, id);
}
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/Element.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698