| OLD | NEW |
| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class ClientRect; | 49 class ClientRect; |
| 50 class ClientRectList; | 50 class ClientRectList; |
| 51 class CustomElementDefinition; | 51 class CustomElementDefinition; |
| 52 class DOMStringMap; | 52 class DOMStringMap; |
| 53 class DOMTokenList; | 53 class DOMTokenList; |
| 54 class Dictionary; | 54 class Dictionary; |
| 55 class ElementRareData; | 55 class ElementRareData; |
| 56 class ElementShadow; | 56 class ElementShadow; |
| 57 class ExceptionState; | 57 class ExceptionState; |
| 58 class Image; | 58 class Image; |
| 59 class IntersectionObserver; |
| 59 class IntSize; | 60 class IntSize; |
| 60 class Locale; | 61 class Locale; |
| 61 class MutableStylePropertySet; | 62 class MutableStylePropertySet; |
| 62 class PropertySetCSSStyleDeclaration; | 63 class PropertySetCSSStyleDeclaration; |
| 63 class PseudoElement; | 64 class PseudoElement; |
| 64 class ScrollState; | 65 class ScrollState; |
| 65 class ScrollStateCallback; | 66 class ScrollStateCallback; |
| 66 class ScrollToOptions; | 67 class ScrollToOptions; |
| 67 class ShadowRoot; | 68 class ShadowRoot; |
| 68 class ShadowRootInit; | 69 class ShadowRootInit; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 81 ContainsFullScreenElement = 1 << 3, | 82 ContainsFullScreenElement = 1 << 3, |
| 82 IsInTopLayer = 1 << 4, | 83 IsInTopLayer = 1 << 4, |
| 83 HasPendingResources = 1 << 5, | 84 HasPendingResources = 1 << 5, |
| 84 | 85 |
| 85 NumberOfElementFlags = 6, // Required size of bitfield used to store the fla
gs. | 86 NumberOfElementFlags = 6, // Required size of bitfield used to store the fla
gs. |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 enum class ShadowRootType; | 89 enum class ShadowRootType; |
| 89 | 90 |
| 90 typedef WillBeHeapVector<RefPtrWillBeMember<Attr>> AttrNodeList; | 91 typedef WillBeHeapVector<RefPtrWillBeMember<Attr>> AttrNodeList; |
| 92 typedef WillBeHeapVector<RawPtrWillBeMember<IntersectionObserver>> IntersectionO
bserverList; |
| 91 | 93 |
| 92 class CORE_EXPORT Element : public ContainerNode { | 94 class CORE_EXPORT Element : public ContainerNode { |
| 93 DEFINE_WRAPPERTYPEINFO(); | 95 DEFINE_WRAPPERTYPEINFO(); |
| 94 public: | 96 public: |
| 95 static PassRefPtrWillBeRawPtr<Element> create(const QualifiedName&, Document
*); | 97 static PassRefPtrWillBeRawPtr<Element> create(const QualifiedName&, Document
*); |
| 96 ~Element() override; | 98 ~Element() override; |
| 97 | 99 |
| 98 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecopy); | 100 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecopy); |
| 99 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecut); | 101 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecut); |
| 100 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforepaste); | 102 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforepaste); |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 void setTabIndex(int); | 517 void setTabIndex(int); |
| 516 short tabIndex() const override; | 518 short tabIndex() const override; |
| 517 | 519 |
| 518 void incrementProxyCount(); | 520 void incrementProxyCount(); |
| 519 void decrementProxyCount(); | 521 void decrementProxyCount(); |
| 520 | 522 |
| 521 DECLARE_VIRTUAL_TRACE(); | 523 DECLARE_VIRTUAL_TRACE(); |
| 522 | 524 |
| 523 SpellcheckAttributeState spellcheckAttributeState() const; | 525 SpellcheckAttributeState spellcheckAttributeState() const; |
| 524 | 526 |
| 527 void registerIntersectionObserver(IntersectionObserver*); |
| 528 void unregisterIntersectionObserver(IntersectionObserver*); |
| 529 bool hasIntersectionObserver() const override { return m_intersectionObserve
rs.size() > 0; } |
| 530 IntersectionObserverList& intersectionObservers() { return m_intersectionObs
ervers; } |
| 531 |
| 525 protected: | 532 protected: |
| 526 Element(const QualifiedName& tagName, Document*, ConstructionType); | 533 Element(const QualifiedName& tagName, Document*, ConstructionType); |
| 527 | 534 |
| 528 const ElementData* elementData() const { return m_elementData.get(); } | 535 const ElementData* elementData() const { return m_elementData.get(); } |
| 529 UniqueElementData& ensureUniqueElementData(); | 536 UniqueElementData& ensureUniqueElementData(); |
| 530 | 537 |
| 531 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, CSSValueID identifier); | 538 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, CSSValueID identifier); |
| 532 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, double value, CSSPrimitiveValue::UnitType); | 539 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, double value, CSSPrimitiveValue::UnitType); |
| 533 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, const String& value); | 540 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, const String& value); |
| 534 | 541 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 | 668 |
| 662 AttrNodeList& ensureAttrNodeList(); | 669 AttrNodeList& ensureAttrNodeList(); |
| 663 void removeAttrNodeList(); | 670 void removeAttrNodeList(); |
| 664 void detachAllAttrNodesFromElement(); | 671 void detachAllAttrNodesFromElement(); |
| 665 void detachAttrNodeFromElementWithValue(Attr*, const AtomicString& value); | 672 void detachAttrNodeFromElementWithValue(Attr*, const AtomicString& value); |
| 666 void detachAttrNodeAtIndex(Attr*, size_t index); | 673 void detachAttrNodeAtIndex(Attr*, size_t index); |
| 667 | 674 |
| 668 v8::Local<v8::Object> wrapCustomElement(v8::Isolate*, v8::Local<v8::Object>
creationContext); | 675 v8::Local<v8::Object> wrapCustomElement(v8::Isolate*, v8::Local<v8::Object>
creationContext); |
| 669 | 676 |
| 670 RefPtrWillBeMember<ElementData> m_elementData; | 677 RefPtrWillBeMember<ElementData> m_elementData; |
| 678 IntersectionObserverList m_intersectionObservers; |
| 671 }; | 679 }; |
| 672 | 680 |
| 673 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); | 681 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); |
| 674 template <typename T> bool isElementOfType(const Node&); | 682 template <typename T> bool isElementOfType(const Node&); |
| 675 template <> inline bool isElementOfType<const Element>(const Node& node) { retur
n node.isElementNode(); } | 683 template <> inline bool isElementOfType<const Element>(const Node& node) { retur
n node.isElementNode(); } |
| 676 template <typename T> inline bool isElementOfType(const Element& element) { retu
rn isElementOfType<T>(static_cast<const Node&>(element)); } | 684 template <typename T> inline bool isElementOfType(const Element& element) { retu
rn isElementOfType<T>(static_cast<const Node&>(element)); } |
| 677 template <> inline bool isElementOfType<const Element>(const Element&) { return
true; } | 685 template <> inline bool isElementOfType<const Element>(const Element&) { return
true; } |
| 678 | 686 |
| 679 // Type casting. | 687 // Type casting. |
| 680 template<typename T> inline T& toElement(Node& node) | 688 template<typename T> inline T& toElement(Node& node) |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 911 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
| 904 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 912 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 905 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ | 913 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ |
| 906 { \ | 914 { \ |
| 907 return adoptRefWillBeNoop(new T(tagName, document)); \ | 915 return adoptRefWillBeNoop(new T(tagName, document)); \ |
| 908 } | 916 } |
| 909 | 917 |
| 910 } // namespace | 918 } // namespace |
| 911 | 919 |
| 912 #endif // Element_h | 920 #endif // Element_h |
| OLD | NEW |