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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 1958073002: Introduce :-internal-shadow-host-has-appearance pseudo class, and apply it to METER element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove null host check Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after
2758 { 2758 {
2759 if (ShadowRoot* root = containingShadowRoot()) { 2759 if (ShadowRoot* root = containingShadowRoot()) {
2760 if (root->type() == ShadowRootType::UserAgent) 2760 if (root->type() == ShadowRootType::UserAgent)
2761 return fastGetAttribute(pseudoAttr); 2761 return fastGetAttribute(pseudoAttr);
2762 } 2762 }
2763 return nullAtom; 2763 return nullAtom;
2764 } 2764 }
2765 2765
2766 void Element::setShadowPseudoId(const AtomicString& id) 2766 void Element::setShadowPseudoId(const AtomicString& id)
2767 { 2767 {
2768 DCHECK_EQ(CSSSelector::parsePseudoType(id, false), CSSSelector::PseudoWebKit CustomElement); 2768 DCHECK(CSSSelector::parsePseudoType(id, false) == CSSSelector::PseudoWebKitC ustomElement || CSSSelector::parsePseudoType(id, false) == CSSSelector::PseudoBl inkInternalElement);
2769 setAttribute(pseudoAttr, id); 2769 setAttribute(pseudoAttr, id);
2770 } 2770 }
2771 2771
2772 bool Element::isInDescendantTreeOf(const Element* shadowHost) const 2772 bool Element::isInDescendantTreeOf(const Element* shadowHost) const
2773 { 2773 {
2774 DCHECK(shadowHost); 2774 DCHECK(shadowHost);
2775 DCHECK(isShadowHost(shadowHost)); 2775 DCHECK(isShadowHost(shadowHost));
2776 2776
2777 for (const Element* ancestorShadowHost = this->shadowHost(); ancestorShadowH ost; ancestorShadowHost = ancestorShadowHost->shadowHost()) { 2777 for (const Element* ancestorShadowHost = this->shadowHost(); ancestorShadowH ost; ancestorShadowHost = ancestorShadowHost->shadowHost()) {
2778 if (ancestorShadowHost == shadowHost) 2778 if (ancestorShadowHost == shadowHost)
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
3707 3707
3708 DEFINE_TRACE_WRAPPERS(Element) 3708 DEFINE_TRACE_WRAPPERS(Element)
3709 { 3709 {
3710 if (hasRareData()) { 3710 if (hasRareData()) {
3711 visitor->traceWrappers(elementRareData()); 3711 visitor->traceWrappers(elementRareData());
3712 } 3712 }
3713 ContainerNode::traceWrappers(visitor); 3713 ContainerNode::traceWrappers(visitor);
3714 } 3714 }
3715 3715
3716 } // namespace blink 3716 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/html/HTMLMeterElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698