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

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

Issue 334413005: Outline Element::shouldIgnoreAttributeCase() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Attr.cpp ('k') | Source/core/dom/Element.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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 11 matching lines...) Expand all
22 * 22 *
23 */ 23 */
24 24
25 #ifndef Element_h 25 #ifndef Element_h
26 #define Element_h 26 #define Element_h
27 27
28 #include "core/CSSPropertyNames.h" 28 #include "core/CSSPropertyNames.h"
29 #include "core/HTMLNames.h" 29 #include "core/HTMLNames.h"
30 #include "core/css/CSSPrimitiveValue.h" 30 #include "core/css/CSSPrimitiveValue.h"
31 #include "core/dom/Attribute.h" 31 #include "core/dom/Attribute.h"
32 #include "core/dom/Document.h" 32 #include "core/dom/ContainerNode.h"
33 #include "core/dom/ElementData.h" 33 #include "core/dom/ElementData.h"
34 #include "core/dom/SpaceSplitString.h" 34 #include "core/dom/SpaceSplitString.h"
35 #include "core/html/CollectionType.h" 35 #include "core/html/CollectionType.h"
36 #include "core/page/FocusType.h" 36 #include "core/page/FocusType.h"
37 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
38 #include "platform/scroll/ScrollTypes.h" 38 #include "platform/scroll/ScrollTypes.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 class ActiveAnimations; 42 class ActiveAnimations;
43 class Attr; 43 class Attr;
44 class Attribute; 44 class Attribute;
45 class CSSStyleDeclaration;
45 class ClientRect; 46 class ClientRect;
46 class ClientRectList; 47 class ClientRectList;
47 class CustomElementDefinition; 48 class CustomElementDefinition;
48 class DOMStringMap; 49 class DOMStringMap;
49 class DOMTokenList; 50 class DOMTokenList;
51 class Document;
50 class ElementRareData; 52 class ElementRareData;
51 class ElementShadow; 53 class ElementShadow;
52 class ExceptionState; 54 class ExceptionState;
53 class Image; 55 class Image;
54 class InputMethodContext; 56 class InputMethodContext;
55 class IntSize; 57 class IntSize;
56 class Locale; 58 class Locale;
57 class MutableStylePropertySet; 59 class MutableStylePropertySet;
58 class PropertySetCSSStyleDeclaration; 60 class PropertySetCSSStyleDeclaration;
59 class PseudoElement; 61 class PseudoElement;
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 745
744 inline const AtomicString& Element::getClassAttribute() const 746 inline const AtomicString& Element::getClassAttribute() const
745 { 747 {
746 if (!hasClass()) 748 if (!hasClass())
747 return nullAtom; 749 return nullAtom;
748 if (isSVGElement()) 750 if (isSVGElement())
749 return getAttribute(HTMLNames::classAttr); 751 return getAttribute(HTMLNames::classAttr);
750 return fastGetAttribute(HTMLNames::classAttr); 752 return fastGetAttribute(HTMLNames::classAttr);
751 } 753 }
752 754
753 inline bool Element::shouldIgnoreAttributeCase() const
754 {
755 return isHTMLElement() && document().isHTMLDocument();
756 }
757
758 inline void Element::setIdAttribute(const AtomicString& value) 755 inline void Element::setIdAttribute(const AtomicString& value)
759 { 756 {
760 setAttribute(HTMLNames::idAttr, value); 757 setAttribute(HTMLNames::idAttr, value);
761 } 758 }
762 759
763 inline const SpaceSplitString& Element::classNames() const 760 inline const SpaceSplitString& Element::classNames() const
764 { 761 {
765 ASSERT(hasClass()); 762 ASSERT(hasClass());
766 ASSERT(elementData()); 763 ASSERT(elementData());
767 return elementData()->classNames(); 764 return elementData()->classNames();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) 882 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
886 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 883 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
887 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 884 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
888 { \ 885 { \
889 return adoptRefWillBeNoop(new T(tagName, document)); \ 886 return adoptRefWillBeNoop(new T(tagName, document)); \
890 } 887 }
891 888
892 } // namespace 889 } // namespace
893 890
894 #endif 891 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Attr.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698