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

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

Issue 1561663003: CL for perf tryjob on win (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved. 6 * Copyright (C) 2003-2011, 2013, 2014 Apple 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 PassRefPtrWillBeRawPtr<Element> cloneElementWithChildren(); 269 PassRefPtrWillBeRawPtr<Element> cloneElementWithChildren();
270 PassRefPtrWillBeRawPtr<Element> cloneElementWithoutChildren(); 270 PassRefPtrWillBeRawPtr<Element> cloneElementWithoutChildren();
271 271
272 void scheduleSVGFilterLayerUpdateHack(); 272 void scheduleSVGFilterLayerUpdateHack();
273 273
274 void setBooleanAttribute(const QualifiedName&, bool); 274 void setBooleanAttribute(const QualifiedName&, bool);
275 275
276 virtual const StylePropertySet* additionalPresentationAttributeStyle() { ret urn nullptr; } 276 virtual const StylePropertySet* additionalPresentationAttributeStyle() { ret urn nullptr; }
277 void invalidateStyleAttribute(); 277 void invalidateStyleAttribute();
278 void setExtensionAttribution(int extensionWorld);
278 279
279 const StylePropertySet* inlineStyle() const { return elementData() ? element Data()->m_inlineStyle.get() : nullptr; } 280 const StylePropertySet* inlineStyle() const { return elementData() ? element Data()->m_inlineStyle.get() : nullptr; }
280 281
281 bool setInlineStyleProperty(CSSPropertyID, CSSValueID identifier, bool impor tant = false); 282 bool setInlineStyleProperty(CSSPropertyID, CSSValueID identifier, bool impor tant = false);
282 bool setInlineStyleProperty(CSSPropertyID, double value, CSSPrimitiveValue:: UnitType, bool important = false); 283 bool setInlineStyleProperty(CSSPropertyID, double value, CSSPrimitiveValue:: UnitType, bool important = false);
283 bool setInlineStyleProperty(CSSPropertyID, const String& value, bool importa nt = false); 284 bool setInlineStyleProperty(CSSPropertyID, const String& value, bool importa nt = false);
284 bool removeInlineStyleProperty(CSSPropertyID); 285 bool removeInlineStyleProperty(CSSPropertyID);
285 void removeAllInlineStyleProperties(); 286 void removeAllInlineStyleProperties();
286 287
287 void synchronizeStyleAttributeInternal() const; 288 void synchronizeStyleAttributeInternal() const;
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 void decrementCompositorProxiedProperties(uint32_t mutableProperties); 543 void decrementCompositorProxiedProperties(uint32_t mutableProperties);
543 uint32_t compositorMutableProperties() const; 544 uint32_t compositorMutableProperties() const;
544 545
545 // Helpers for V8DOMActivityLogger::logEvent. They call logEvent only if 546 // Helpers for V8DOMActivityLogger::logEvent. They call logEvent only if
546 // the element is inDocument() and the context is an isolated world. 547 // the element is inDocument() and the context is an isolated world.
547 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1); 548 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1);
548 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1, const QualifiedName& attr2); 549 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1, const QualifiedName& attr2);
549 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1, const QualifiedName& attr2, const QualifiedName& attr3); 550 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1, const QualifiedName& attr2, const QualifiedName& attr3);
550 void logUpdateAttributeIfIsolatedWorldAndInDocument(const char element[], co nst QualifiedName& attributeName, const AtomicString& oldValue, const AtomicStri ng& newValue); 551 void logUpdateAttributeIfIsolatedWorldAndInDocument(const char element[], co nst QualifiedName& attributeName, const AtomicString& oldValue, const AtomicStri ng& newValue);
551 552
553 void taintElementIfFromIsolatedWorld();
554
552 DECLARE_VIRTUAL_TRACE(); 555 DECLARE_VIRTUAL_TRACE();
553 556
554 SpellcheckAttributeState spellcheckAttributeState() const; 557 SpellcheckAttributeState spellcheckAttributeState() const;
555 558
556 protected: 559 protected:
557 Element(const QualifiedName& tagName, Document*, ConstructionType); 560 Element(const QualifiedName& tagName, Document*, ConstructionType);
558 561
559 const ElementData* elementData() const { return m_elementData.get(); } 562 const ElementData* elementData() const { return m_elementData.get(); }
560 UniqueElementData& ensureUniqueElementData(); 563 UniqueElementData& ensureUniqueElementData();
561 564
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 696
694 AttrNodeList& ensureAttrNodeList(); 697 AttrNodeList& ensureAttrNodeList();
695 void removeAttrNodeList(); 698 void removeAttrNodeList();
696 void detachAllAttrNodesFromElement(); 699 void detachAllAttrNodesFromElement();
697 void detachAttrNodeFromElementWithValue(Attr*, const AtomicString& value); 700 void detachAttrNodeFromElementWithValue(Attr*, const AtomicString& value);
698 void detachAttrNodeAtIndex(Attr*, size_t index); 701 void detachAttrNodeAtIndex(Attr*, size_t index);
699 702
700 v8::Local<v8::Object> wrapCustomElement(v8::Isolate*, v8::Local<v8::Object> creationContext); 703 v8::Local<v8::Object> wrapCustomElement(v8::Isolate*, v8::Local<v8::Object> creationContext);
701 704
702 RefPtrWillBeMember<ElementData> m_elementData; 705 RefPtrWillBeMember<ElementData> m_elementData;
706
707 int m_extensionOrigin;
703 }; 708 };
704 709
705 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); 710 DEFINE_NODE_TYPE_CASTS(Element, isElementNode());
706 template <typename T> bool isElementOfType(const Node&); 711 template <typename T> bool isElementOfType(const Node&);
707 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); } 712 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); }
708 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); } 713 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); }
709 template <> inline bool isElementOfType<const Element>(const Element&) { return true; } 714 template <> inline bool isElementOfType<const Element>(const Element&) { return true; }
710 715
711 // Type casting. 716 // Type casting.
712 template<typename T> inline T& toElement(Node& node) 717 template<typename T> inline T& toElement(Node& node)
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 if (AXObjectCache* cache = document().existingAXObjectCache()) 865 if (AXObjectCache* cache = document().existingAXObjectCache())
861 cache->remove(this); 866 cache->remove(this);
862 } 867 }
863 868
864 inline void Element::invalidateStyleAttribute() 869 inline void Element::invalidateStyleAttribute()
865 { 870 {
866 ASSERT(elementData()); 871 ASSERT(elementData());
867 elementData()->m_styleAttributeIsDirty = true; 872 elementData()->m_styleAttributeIsDirty = true;
868 } 873 }
869 874
875 inline void Element::setExtensionAttribution(int extensionWorld)
876 {
877 ASSERT(elementData());
878 m_extensionOrigin = extensionWorld;
879 }
880
870 inline const StylePropertySet* Element::presentationAttributeStyle() 881 inline const StylePropertySet* Element::presentationAttributeStyle()
871 { 882 {
872 if (!elementData()) 883 if (!elementData())
873 return nullptr; 884 return nullptr;
874 if (elementData()->m_presentationAttributeStyleIsDirty) 885 if (elementData()->m_presentationAttributeStyleIsDirty)
875 updatePresentationAttributeStyle(); 886 updatePresentationAttributeStyle();
876 // Need to call elementData() again since updatePresentationAttributeStyle() 887 // Need to call elementData() again since updatePresentationAttributeStyle()
877 // might swap it with a UniqueElementData. 888 // might swap it with a UniqueElementData.
878 return elementData()->presentationAttributeStyle(); 889 return elementData()->presentationAttributeStyle();
879 } 890 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) 946 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
936 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 947 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
937 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 948 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
938 { \ 949 { \
939 return adoptRefWillBeNoop(new T(tagName, document)); \ 950 return adoptRefWillBeNoop(new T(tagName, document)); \
940 } 951 }
941 952
942 } // namespace 953 } // namespace
943 954
944 #endif // Element_h 955 #endif // Element_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698