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

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

Issue 2173623003: Add "Failed" custom element state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix and cleanup Created 4 years, 5 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 1897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1908 if (!layoutObject) 1908 if (!layoutObject)
1909 return; 1909 return;
1910 if (!layoutObject->hasLayer()) 1910 if (!layoutObject->hasLayer())
1911 return; 1911 return;
1912 layoutObject->layer()->setNeedsCompositingInputsUpdate(); 1912 layoutObject->layer()->setNeedsCompositingInputsUpdate();
1913 // Changes in the return value of requiresAcceleratedCompositing change if 1913 // Changes in the return value of requiresAcceleratedCompositing change if
1914 // the PaintLayer is self-painting. 1914 // the PaintLayer is self-painting.
1915 layoutObject->layer()->updateSelfPaintingLayer(); 1915 layoutObject->layer()->updateSelfPaintingLayer();
1916 } 1916 }
1917 1917
1918 bool Element::isDefined() const
1919 {
1920 return CustomElement::isDefined(getCustomElementState());
dominicc (has gone to gerrit) 2016/07/26 05:47:42 Do we need CustomElement::isDefined and Element::i
1921 }
1922
1918 void Element::setCustomElementDefinition(V0CustomElementDefinition* definition) 1923 void Element::setCustomElementDefinition(V0CustomElementDefinition* definition)
1919 { 1924 {
1920 if (!hasRareData() && !definition) 1925 if (!hasRareData() && !definition)
1921 return; 1926 return;
1922 DCHECK(!customElementDefinition()); 1927 DCHECK(!customElementDefinition());
1923 ensureElementRareData().setCustomElementDefinition(definition); 1928 ensureElementRareData().setCustomElementDefinition(definition);
1924 } 1929 }
1925 1930
1926 V0CustomElementDefinition* Element::customElementDefinition() const 1931 V0CustomElementDefinition* Element::customElementDefinition() const
1927 { 1932 {
(...skipping 24 matching lines...) Expand all
1952 } 1957 }
1953 1958
1954 ShadowRoot* Element::attachShadow(const ScriptState* scriptState, const ShadowRo otInit& shadowRootInitDict, ExceptionState& exceptionState) 1959 ShadowRoot* Element::attachShadow(const ScriptState* scriptState, const ShadowRo otInit& shadowRootInitDict, ExceptionState& exceptionState)
1955 { 1960 {
1956 DCHECK(RuntimeEnabledFeatures::shadowDOMV1Enabled()); 1961 DCHECK(RuntimeEnabledFeatures::shadowDOMV1Enabled());
1957 1962
1958 HostsUsingFeatures::countMainWorldOnly(scriptState, document(), HostsUsingFe atures::Feature::ElementAttachShadow); 1963 HostsUsingFeatures::countMainWorldOnly(scriptState, document(), HostsUsingFe atures::Feature::ElementAttachShadow);
1959 1964
1960 const AtomicString& tagName = localName(); 1965 const AtomicString& tagName = localName();
1961 bool tagNameIsSupported = isV0CustomElement() 1966 bool tagNameIsSupported = isV0CustomElement()
1962 || isCustomElement() 1967 || getCustomElementState() != CustomElementState::Uncustomized
1963 || tagName == HTMLNames::articleTag 1968 || tagName == HTMLNames::articleTag
1964 || tagName == HTMLNames::asideTag 1969 || tagName == HTMLNames::asideTag
1965 || tagName == HTMLNames::blockquoteTag 1970 || tagName == HTMLNames::blockquoteTag
1966 || tagName == HTMLNames::bodyTag 1971 || tagName == HTMLNames::bodyTag
1967 || tagName == HTMLNames::divTag 1972 || tagName == HTMLNames::divTag
1968 || tagName == HTMLNames::footerTag 1973 || tagName == HTMLNames::footerTag
1969 || tagName == HTMLNames::h1Tag 1974 || tagName == HTMLNames::h1Tag
1970 || tagName == HTMLNames::h2Tag 1975 || tagName == HTMLNames::h2Tag
1971 || tagName == HTMLNames::h3Tag 1976 || tagName == HTMLNames::h3Tag
1972 || tagName == HTMLNames::h4Tag 1977 || tagName == HTMLNames::h4Tag
(...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after
3745 3750
3746 DEFINE_TRACE_WRAPPERS(Element) 3751 DEFINE_TRACE_WRAPPERS(Element)
3747 { 3752 {
3748 if (hasRareData()) { 3753 if (hasRareData()) {
3749 visitor->traceWrappers(elementRareData()); 3754 visitor->traceWrappers(elementRareData());
3750 } 3755 }
3751 ContainerNode::traceWrappers(visitor); 3756 ContainerNode::traceWrappers(visitor);
3752 } 3757 }
3753 3758
3754 } // namespace blink 3759 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698