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

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

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 if (const Attribute* attribute = elementData()->getAttributeItem(localName, shouldIgnoreAttributeCase())) 877 if (const Attribute* attribute = elementData()->getAttributeItem(localName, shouldIgnoreAttributeCase()))
878 return attribute->value(); 878 return attribute->value();
879 return nullAtom; 879 return nullAtom;
880 } 880 }
881 881
882 const AtomicString& Element::getAttributeNS(const AtomicString& namespaceURI, co nst AtomicString& localName) const 882 const AtomicString& Element::getAttributeNS(const AtomicString& namespaceURI, co nst AtomicString& localName) const
883 { 883 {
884 return getAttribute(QualifiedName(nullAtom, localName, namespaceURI)); 884 return getAttribute(QualifiedName(nullAtom, localName, namespaceURI));
885 } 885 }
886 886
887 void Element::setAttribute(const AtomicString& localName, const AtomicString& va lue, ExceptionState& es) 887 void Element::setAttribute(const AtomicString& localName, const AtomicString& va lue, ExceptionState& exceptionState)
888 { 888 {
889 if (!Document::isValidName(localName)) { 889 if (!Document::isValidName(localName)) {
890 es.throwUninformativeAndGenericDOMException(InvalidCharacterError); 890 exceptionState.throwUninformativeAndGenericDOMException(InvalidCharacter Error);
891 return; 891 return;
892 } 892 }
893 893
894 synchronizeAttribute(localName); 894 synchronizeAttribute(localName);
895 const AtomicString& caseAdjustedLocalName = shouldIgnoreAttributeCase() ? lo calName.lower() : localName; 895 const AtomicString& caseAdjustedLocalName = shouldIgnoreAttributeCase() ? lo calName.lower() : localName;
896 896
897 size_t index = elementData() ? elementData()->getAttributeItemIndex(caseAdju stedLocalName, false) : kNotFound; 897 size_t index = elementData() ? elementData()->getAttributeItemIndex(caseAdju stedLocalName, false) : kNotFound;
898 const QualifiedName& qName = index != kNotFound ? attributeItem(index)->name () : QualifiedName(nullAtom, caseAdjustedLocalName, nullAtom); 898 const QualifiedName& qName = index != kNotFound ? attributeItem(index)->name () : QualifiedName(nullAtom, caseAdjustedLocalName, nullAtom);
899 setAttributeInternal(index, qName, value, NotInSynchronizationOfLazyAttribut e); 899 setAttributeInternal(index, qName, value, NotInSynchronizationOfLazyAttribut e);
900 } 900 }
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 String Element::nodeName() const 1225 String Element::nodeName() const
1226 { 1226 {
1227 return m_tagName.toString(); 1227 return m_tagName.toString();
1228 } 1228 }
1229 1229
1230 String Element::nodeNamePreservingCase() const 1230 String Element::nodeNamePreservingCase() const
1231 { 1231 {
1232 return m_tagName.toString(); 1232 return m_tagName.toString();
1233 } 1233 }
1234 1234
1235 void Element::setPrefix(const AtomicString& prefix, ExceptionState& es) 1235 void Element::setPrefix(const AtomicString& prefix, ExceptionState& exceptionSta te)
1236 { 1236 {
1237 checkSetPrefix(prefix, es); 1237 checkSetPrefix(prefix, exceptionState);
1238 if (es.hadException()) 1238 if (exceptionState.hadException())
1239 return; 1239 return;
1240 1240
1241 m_tagName.setPrefix(prefix.isEmpty() ? AtomicString() : prefix); 1241 m_tagName.setPrefix(prefix.isEmpty() ? AtomicString() : prefix);
1242 } 1242 }
1243 1243
1244 KURL Element::baseURI() const 1244 KURL Element::baseURI() const
1245 { 1245 {
1246 const AtomicString& baseAttribute = getAttribute(baseAttr); 1246 const AtomicString& baseAttribute = getAttribute(baseAttr);
1247 KURL base(KURL(), baseAttribute); 1247 KURL base(KURL(), baseAttribute);
1248 if (!base.protocol().isEmpty()) 1248 if (!base.protocol().isEmpty())
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 return ensureElementRareData().ensureShadow(); 1685 return ensureElementRareData().ensureShadow();
1686 } 1686 }
1687 1687
1688 void Element::didAffectSelector(AffectedSelectorMask mask) 1688 void Element::didAffectSelector(AffectedSelectorMask mask)
1689 { 1689 {
1690 setNeedsStyleRecalc(); 1690 setNeedsStyleRecalc();
1691 if (ElementShadow* elementShadow = shadowWhereNodeCanBeDistributed(*this)) 1691 if (ElementShadow* elementShadow = shadowWhereNodeCanBeDistributed(*this))
1692 elementShadow->didAffectSelector(mask); 1692 elementShadow->didAffectSelector(mask);
1693 } 1693 }
1694 1694
1695 PassRefPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& es) 1695 PassRefPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& exceptionState)
1696 { 1696 {
1697 if (alwaysCreateUserAgentShadowRoot()) 1697 if (alwaysCreateUserAgentShadowRoot())
1698 ensureUserAgentShadowRoot(); 1698 ensureUserAgentShadowRoot();
1699 1699
1700 if (RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled()) 1700 if (RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled())
1701 return PassRefPtr<ShadowRoot>(ensureShadow().addShadowRoot(*this, Shadow Root::AuthorShadowRoot)); 1701 return PassRefPtr<ShadowRoot>(ensureShadow().addShadowRoot(*this, Shadow Root::AuthorShadowRoot));
1702 1702
1703 // Since some elements recreates shadow root dynamically, multiple shadow 1703 // Since some elements recreates shadow root dynamically, multiple shadow
1704 // subtrees won't work well in that element. Until they are fixed, we disabl e 1704 // subtrees won't work well in that element. Until they are fixed, we disabl e
1705 // adding author shadow root for them. 1705 // adding author shadow root for them.
1706 if (!areAuthorShadowsAllowed()) { 1706 if (!areAuthorShadowsAllowed()) {
1707 es.throwUninformativeAndGenericDOMException(HierarchyRequestError); 1707 exceptionState.throwUninformativeAndGenericDOMException(HierarchyRequest Error);
1708 return 0; 1708 return 0;
1709 } 1709 }
1710 return PassRefPtr<ShadowRoot>(ensureShadow().addShadowRoot(*this, ShadowRoot ::AuthorShadowRoot)); 1710 return PassRefPtr<ShadowRoot>(ensureShadow().addShadowRoot(*this, ShadowRoot ::AuthorShadowRoot));
1711 } 1711 }
1712 1712
1713 ShadowRoot* Element::shadowRoot() const 1713 ShadowRoot* Element::shadowRoot() const
1714 { 1714 {
1715 ElementShadow* elementShadow = shadow(); 1715 ElementShadow* elementShadow = shadow();
1716 if (!elementShadow) 1716 if (!elementShadow)
1717 return 0; 1717 return 0;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 strncpy(buffer, result.toString().utf8().data(), length - 1); 1902 strncpy(buffer, result.toString().utf8().data(), length - 1);
1903 } 1903 }
1904 #endif 1904 #endif
1905 1905
1906 const Vector<RefPtr<Attr> >& Element::attrNodeList() 1906 const Vector<RefPtr<Attr> >& Element::attrNodeList()
1907 { 1907 {
1908 ASSERT(hasSyntheticAttrChildNodes()); 1908 ASSERT(hasSyntheticAttrChildNodes());
1909 return *attrNodeListForElement(this); 1909 return *attrNodeListForElement(this);
1910 } 1910 }
1911 1911
1912 PassRefPtr<Attr> Element::setAttributeNode(Attr* attrNode, ExceptionState& es) 1912 PassRefPtr<Attr> Element::setAttributeNode(Attr* attrNode, ExceptionState& excep tionState)
1913 { 1913 {
1914 if (!attrNode) { 1914 if (!attrNode) {
1915 es.throwUninformativeAndGenericDOMException(TypeMismatchError); 1915 exceptionState.throwUninformativeAndGenericDOMException(TypeMismatchErro r);
1916 return 0; 1916 return 0;
1917 } 1917 }
1918 1918
1919 RefPtr<Attr> oldAttrNode = attrIfExists(attrNode->qualifiedName()); 1919 RefPtr<Attr> oldAttrNode = attrIfExists(attrNode->qualifiedName());
1920 if (oldAttrNode.get() == attrNode) 1920 if (oldAttrNode.get() == attrNode)
1921 return attrNode; // This Attr is already attached to the element. 1921 return attrNode; // This Attr is already attached to the element.
1922 1922
1923 // InUseAttributeError: Raised if node is an Attr that is already an attribu te of another Element object. 1923 // InUseAttributeError: Raised if node is an Attr that is already an attribu te of another Element object.
1924 // The DOM user must explicitly clone Attr nodes to re-use them in other ele ments. 1924 // The DOM user must explicitly clone Attr nodes to re-use them in other ele ments.
1925 if (attrNode->ownerElement()) { 1925 if (attrNode->ownerElement()) {
1926 es.throwUninformativeAndGenericDOMException(InUseAttributeError); 1926 exceptionState.throwUninformativeAndGenericDOMException(InUseAttributeEr ror);
1927 return 0; 1927 return 0;
1928 } 1928 }
1929 1929
1930 synchronizeAllAttributes(); 1930 synchronizeAllAttributes();
1931 UniqueElementData* elementData = ensureUniqueElementData(); 1931 UniqueElementData* elementData = ensureUniqueElementData();
1932 1932
1933 size_t index = elementData->getAttributeItemIndex(attrNode->qualifiedName(), shouldIgnoreAttributeCase()); 1933 size_t index = elementData->getAttributeItemIndex(attrNode->qualifiedName(), shouldIgnoreAttributeCase());
1934 if (index != kNotFound) { 1934 if (index != kNotFound) {
1935 if (oldAttrNode) 1935 if (oldAttrNode)
1936 detachAttrNodeFromElementWithValue(oldAttrNode.get(), elementData->a ttributeItem(index)->value()); 1936 detachAttrNodeFromElementWithValue(oldAttrNode.get(), elementData->a ttributeItem(index)->value());
1937 else 1937 else
1938 oldAttrNode = Attr::create(document(), attrNode->qualifiedName(), el ementData->attributeItem(index)->value()); 1938 oldAttrNode = Attr::create(document(), attrNode->qualifiedName(), el ementData->attributeItem(index)->value());
1939 } 1939 }
1940 1940
1941 setAttributeInternal(index, attrNode->qualifiedName(), attrNode->value(), No tInSynchronizationOfLazyAttribute); 1941 setAttributeInternal(index, attrNode->qualifiedName(), attrNode->value(), No tInSynchronizationOfLazyAttribute);
1942 1942
1943 attrNode->attachToElement(this); 1943 attrNode->attachToElement(this);
1944 treeScope().adoptIfNeeded(*attrNode); 1944 treeScope().adoptIfNeeded(*attrNode);
1945 ensureAttrNodeListForElement(this).append(attrNode); 1945 ensureAttrNodeListForElement(this).append(attrNode);
1946 1946
1947 return oldAttrNode.release(); 1947 return oldAttrNode.release();
1948 } 1948 }
1949 1949
1950 PassRefPtr<Attr> Element::setAttributeNodeNS(Attr* attr, ExceptionState& es) 1950 PassRefPtr<Attr> Element::setAttributeNodeNS(Attr* attr, ExceptionState& excepti onState)
1951 { 1951 {
1952 return setAttributeNode(attr, es); 1952 return setAttributeNode(attr, exceptionState);
1953 } 1953 }
1954 1954
1955 PassRefPtr<Attr> Element::removeAttributeNode(Attr* attr, ExceptionState& es) 1955 PassRefPtr<Attr> Element::removeAttributeNode(Attr* attr, ExceptionState& except ionState)
1956 { 1956 {
1957 if (!attr) { 1957 if (!attr) {
1958 es.throwUninformativeAndGenericDOMException(TypeMismatchError); 1958 exceptionState.throwUninformativeAndGenericDOMException(TypeMismatchErro r);
1959 return 0; 1959 return 0;
1960 } 1960 }
1961 if (attr->ownerElement() != this) { 1961 if (attr->ownerElement() != this) {
1962 es.throwUninformativeAndGenericDOMException(NotFoundError); 1962 exceptionState.throwUninformativeAndGenericDOMException(NotFoundError);
1963 return 0; 1963 return 0;
1964 } 1964 }
1965 1965
1966 ASSERT(document() == attr->document()); 1966 ASSERT(document() == attr->document());
1967 1967
1968 synchronizeAttribute(attr->qualifiedName()); 1968 synchronizeAttribute(attr->qualifiedName());
1969 1969
1970 size_t index = elementData()->getAttrIndex(attr); 1970 size_t index = elementData()->getAttrIndex(attr);
1971 if (index == kNotFound) { 1971 if (index == kNotFound) {
1972 es.throwUninformativeAndGenericDOMException(NotFoundError); 1972 exceptionState.throwUninformativeAndGenericDOMException(NotFoundError);
1973 return 0; 1973 return 0;
1974 } 1974 }
1975 1975
1976 RefPtr<Attr> guard(attr); 1976 RefPtr<Attr> guard(attr);
1977 detachAttrNodeAtIndex(attr, index); 1977 detachAttrNodeAtIndex(attr, index);
1978 return guard.release(); 1978 return guard.release();
1979 } 1979 }
1980 1980
1981 bool Element::parseAttributeName(QualifiedName& out, const AtomicString& namespa ceURI, const AtomicString& qualifiedName, ExceptionState& es) 1981 bool Element::parseAttributeName(QualifiedName& out, const AtomicString& namespa ceURI, const AtomicString& qualifiedName, ExceptionState& exceptionState)
1982 { 1982 {
1983 String prefix, localName; 1983 String prefix, localName;
1984 if (!Document::parseQualifiedName(qualifiedName, prefix, localName, es)) 1984 if (!Document::parseQualifiedName(qualifiedName, prefix, localName, exceptio nState))
1985 return false; 1985 return false;
1986 ASSERT(!es.hadException()); 1986 ASSERT(!exceptionState.hadException());
1987 1987
1988 QualifiedName qName(prefix, localName, namespaceURI); 1988 QualifiedName qName(prefix, localName, namespaceURI);
1989 1989
1990 if (!Document::hasValidNamespaceForAttributes(qName)) { 1990 if (!Document::hasValidNamespaceForAttributes(qName)) {
1991 es.throwUninformativeAndGenericDOMException(NamespaceError); 1991 exceptionState.throwUninformativeAndGenericDOMException(NamespaceError);
1992 return false; 1992 return false;
1993 } 1993 }
1994 1994
1995 out = qName; 1995 out = qName;
1996 return true; 1996 return true;
1997 } 1997 }
1998 1998
1999 void Element::setAttributeNS(const AtomicString& namespaceURI, const AtomicStrin g& qualifiedName, const AtomicString& value, ExceptionState& es) 1999 void Element::setAttributeNS(const AtomicString& namespaceURI, const AtomicStrin g& qualifiedName, const AtomicString& value, ExceptionState& exceptionState)
2000 { 2000 {
2001 QualifiedName parsedName = anyName; 2001 QualifiedName parsedName = anyName;
2002 if (!parseAttributeName(parsedName, namespaceURI, qualifiedName, es)) 2002 if (!parseAttributeName(parsedName, namespaceURI, qualifiedName, exceptionSt ate))
2003 return; 2003 return;
2004 setAttribute(parsedName, value); 2004 setAttribute(parsedName, value);
2005 } 2005 }
2006 2006
2007 void Element::removeAttributeInternal(size_t index, SynchronizationOfLazyAttribu te inSynchronizationOfLazyAttribute) 2007 void Element::removeAttributeInternal(size_t index, SynchronizationOfLazyAttribu te inSynchronizationOfLazyAttribute)
2008 { 2008 {
2009 ASSERT_WITH_SECURITY_IMPLICATION(index < attributeCount()); 2009 ASSERT_WITH_SECURITY_IMPLICATION(index < attributeCount());
2010 2010
2011 UniqueElementData* elementData = ensureUniqueElementData(); 2011 UniqueElementData* elementData = ensureUniqueElementData();
2012 2012
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
2215 String Element::innerHTML() const 2215 String Element::innerHTML() const
2216 { 2216 {
2217 return createMarkup(this, ChildrenOnly); 2217 return createMarkup(this, ChildrenOnly);
2218 } 2218 }
2219 2219
2220 String Element::outerHTML() const 2220 String Element::outerHTML() const
2221 { 2221 {
2222 return createMarkup(this); 2222 return createMarkup(this);
2223 } 2223 }
2224 2224
2225 void Element::setInnerHTML(const String& html, ExceptionState& es) 2225 void Element::setInnerHTML(const String& html, ExceptionState& exceptionState)
2226 { 2226 {
2227 if (RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(html , this, AllowScriptingContent, "innerHTML", es)) { 2227 if (RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(html , this, AllowScriptingContent, "innerHTML", exceptionState)) {
2228 ContainerNode* container = this; 2228 ContainerNode* container = this;
2229 if (hasTagName(templateTag)) 2229 if (hasTagName(templateTag))
2230 container = toHTMLTemplateElement(this)->content(); 2230 container = toHTMLTemplateElement(this)->content();
2231 replaceChildrenWithFragment(container, fragment.release(), es); 2231 replaceChildrenWithFragment(container, fragment.release(), exceptionStat e);
2232 } 2232 }
2233 } 2233 }
2234 2234
2235 void Element::setOuterHTML(const String& html, ExceptionState& es) 2235 void Element::setOuterHTML(const String& html, ExceptionState& exceptionState)
2236 { 2236 {
2237 Node* p = parentNode(); 2237 Node* p = parentNode();
2238 if (!p || !p->isElementNode()) { 2238 if (!p || !p->isElementNode()) {
2239 es.throwUninformativeAndGenericDOMException(NoModificationAllowedError); 2239 exceptionState.throwUninformativeAndGenericDOMException(NoModificationAl lowedError);
2240 return; 2240 return;
2241 } 2241 }
2242 RefPtr<Element> parent = toElement(p); 2242 RefPtr<Element> parent = toElement(p);
2243 RefPtr<Node> prev = previousSibling(); 2243 RefPtr<Node> prev = previousSibling();
2244 RefPtr<Node> next = nextSibling(); 2244 RefPtr<Node> next = nextSibling();
2245 2245
2246 RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(html, pa rent.get(), AllowScriptingContent, "outerHTML", es); 2246 RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(html, pa rent.get(), AllowScriptingContent, "outerHTML", exceptionState);
2247 if (es.hadException()) 2247 if (exceptionState.hadException())
2248 return; 2248 return;
2249 2249
2250 parent->replaceChild(fragment.release(), this, es); 2250 parent->replaceChild(fragment.release(), this, exceptionState);
2251 RefPtr<Node> node = next ? next->previousSibling() : 0; 2251 RefPtr<Node> node = next ? next->previousSibling() : 0;
2252 if (!es.hadException() && node && node->isTextNode()) 2252 if (!exceptionState.hadException() && node && node->isTextNode())
2253 mergeWithNextTextNode(node.release(), es); 2253 mergeWithNextTextNode(node.release(), exceptionState);
2254 2254
2255 if (!es.hadException() && prev && prev->isTextNode()) 2255 if (!exceptionState.hadException() && prev && prev->isTextNode())
2256 mergeWithNextTextNode(prev.release(), es); 2256 mergeWithNextTextNode(prev.release(), exceptionState);
2257 } 2257 }
2258 2258
2259 String Element::innerText() 2259 String Element::innerText()
2260 { 2260 {
2261 // We need to update layout, since plainText uses line boxes in the render t ree. 2261 // We need to update layout, since plainText uses line boxes in the render t ree.
2262 document().updateLayoutIgnorePendingStylesheets(); 2262 document().updateLayoutIgnorePendingStylesheets();
2263 2263
2264 if (!renderer()) 2264 if (!renderer())
2265 return textContent(true); 2265 return textContent(true);
2266 2266
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2667 return hasRareData() ? elementRareData()->pseudoElement(pseudoId) : 0; 2667 return hasRareData() ? elementRareData()->pseudoElement(pseudoId) : 0;
2668 } 2668 }
2669 2669
2670 RenderObject* Element::pseudoElementRenderer(PseudoId pseudoId) const 2670 RenderObject* Element::pseudoElementRenderer(PseudoId pseudoId) const
2671 { 2671 {
2672 if (PseudoElement* element = pseudoElement(pseudoId)) 2672 if (PseudoElement* element = pseudoElement(pseudoId))
2673 return element->renderer(); 2673 return element->renderer();
2674 return 0; 2674 return 0;
2675 } 2675 }
2676 2676
2677 bool Element::webkitMatchesSelector(const String& selector, ExceptionState& es) 2677 bool Element::webkitMatchesSelector(const String& selector, ExceptionState& exce ptionState)
2678 { 2678 {
2679 if (selector.isEmpty()) { 2679 if (selector.isEmpty()) {
2680 es.throwUninformativeAndGenericDOMException(SyntaxError); 2680 exceptionState.throwUninformativeAndGenericDOMException(SyntaxError);
2681 return false; 2681 return false;
2682 } 2682 }
2683 2683
2684 SelectorQuery* selectorQuery = document().selectorQueryCache().add(selector, document(), es); 2684 SelectorQuery* selectorQuery = document().selectorQueryCache().add(selector, document(), exceptionState);
2685 if (!selectorQuery) 2685 if (!selectorQuery)
2686 return false; 2686 return false;
2687 return selectorQuery->matches(*this); 2687 return selectorQuery->matches(*this);
2688 } 2688 }
2689 2689
2690 DOMTokenList* Element::classList() 2690 DOMTokenList* Element::classList()
2691 { 2691 {
2692 ElementRareData& rareData = ensureElementRareData(); 2692 ElementRareData& rareData = ensureElementRareData();
2693 if (!rareData.classList()) 2693 if (!rareData.classList())
2694 rareData.setClassList(ClassList::create(this)); 2694 rareData.setClassList(ClassList::create(this));
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
3507 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems 3507 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems
3508 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405 3508 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405
3509 if (hasTagName(optionTag) || hasTagName(optgroupTag)) 3509 if (hasTagName(optionTag) || hasTagName(optgroupTag))
3510 return false; 3510 return false;
3511 if (FullscreenElementStack::isActiveFullScreenElement(this)) 3511 if (FullscreenElementStack::isActiveFullScreenElement(this))
3512 return false; 3512 return false;
3513 return true; 3513 return true;
3514 } 3514 }
3515 3515
3516 } // namespace WebCore 3516 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698