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 IntersectionObservation; | |
60 class IntersectionObserver; | |
59 class IntSize; | 61 class IntSize; |
60 class Locale; | 62 class Locale; |
61 class MutableStylePropertySet; | 63 class MutableStylePropertySet; |
62 class PropertySetCSSStyleDeclaration; | 64 class PropertySetCSSStyleDeclaration; |
63 class PseudoElement; | 65 class PseudoElement; |
64 class ScrollState; | 66 class ScrollState; |
65 class ScrollStateCallback; | 67 class ScrollStateCallback; |
66 class ScrollToOptions; | 68 class ScrollToOptions; |
67 class ShadowRoot; | 69 class ShadowRoot; |
68 class ShadowRootInit; | 70 class ShadowRootInit; |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
531 void setTabIndex(int); | 533 void setTabIndex(int); |
532 short tabIndex() const override; | 534 short tabIndex() const override; |
533 | 535 |
534 void incrementProxyCount(); | 536 void incrementProxyCount(); |
535 void decrementProxyCount(); | 537 void decrementProxyCount(); |
536 | 538 |
537 DECLARE_VIRTUAL_TRACE(); | 539 DECLARE_VIRTUAL_TRACE(); |
538 | 540 |
539 SpellcheckAttributeState spellcheckAttributeState() const; | 541 SpellcheckAttributeState spellcheckAttributeState() const; |
540 | 542 |
543 WeakPtr<Element> createWeakPtr(); | |
dcheng
2015/11/20 20:35:07
That being said, can we do this without exposing w
szager1
2015/11/20 22:02:23
The spec is out-of-date; the consensus is now:
-
dcheng
2015/11/20 22:50:52
In general, I'm not thrilled about exposing weak p
szager1
2015/12/01 06:53:31
I updated the implementation design doc:
https://
| |
544 | |
545 void addIntersectionObservation(IntersectionObservation&); | |
546 void removeIntersectionObservation(IntersectionObservation&); | |
547 | |
548 bool computeIntersection(Element*, LayoutRect&, LayoutRect&, LayoutRect&); | |
549 | |
541 protected: | 550 protected: |
542 Element(const QualifiedName& tagName, Document*, ConstructionType); | 551 Element(const QualifiedName& tagName, Document*, ConstructionType); |
543 | 552 |
544 const ElementData* elementData() const { return m_elementData.get(); } | 553 const ElementData* elementData() const { return m_elementData.get(); } |
545 UniqueElementData& ensureUniqueElementData(); | 554 UniqueElementData& ensureUniqueElementData(); |
546 | 555 |
547 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, CSSValueID identifier); | 556 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, CSSValueID identifier); |
548 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, double value, CSSPrimitiveValue::UnitType); | 557 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, double value, CSSPrimitiveValue::UnitType); |
549 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const String& value); | 558 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const String& value); |
550 | 559 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
674 | 683 |
675 ElementRareData* elementRareData() const; | 684 ElementRareData* elementRareData() const; |
676 ElementRareData& ensureElementRareData(); | 685 ElementRareData& ensureElementRareData(); |
677 | 686 |
678 AttrNodeList& ensureAttrNodeList(); | 687 AttrNodeList& ensureAttrNodeList(); |
679 void removeAttrNodeList(); | 688 void removeAttrNodeList(); |
680 void detachAllAttrNodesFromElement(); | 689 void detachAllAttrNodesFromElement(); |
681 void detachAttrNodeFromElementWithValue(Attr*, const AtomicString& value); | 690 void detachAttrNodeFromElementWithValue(Attr*, const AtomicString& value); |
682 void detachAttrNodeAtIndex(Attr*, size_t index); | 691 void detachAttrNodeAtIndex(Attr*, size_t index); |
683 | 692 |
693 void disconnectIntersectionObservations(); | |
694 | |
684 v8::Local<v8::Object> wrapCustomElement(v8::Isolate*, v8::Local<v8::Object> creationContext); | 695 v8::Local<v8::Object> wrapCustomElement(v8::Isolate*, v8::Local<v8::Object> creationContext); |
685 | 696 |
686 RefPtrWillBeMember<ElementData> m_elementData; | 697 RefPtrWillBeMember<ElementData> m_elementData; |
687 }; | 698 }; |
688 | 699 |
689 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); | 700 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); |
690 template <typename T> bool isElementOfType(const Node&); | 701 template <typename T> bool isElementOfType(const Node&); |
691 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); } | 702 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); } |
692 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); } | 703 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); } |
693 template <> inline bool isElementOfType<const Element>(const Element&) { return true; } | 704 template <> inline bool isElementOfType<const Element>(const Element&) { return true; } |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
919 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 930 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
920 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 931 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
921 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ | 932 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ |
922 { \ | 933 { \ |
923 return adoptRefWillBeNoop(new T(tagName, document)); \ | 934 return adoptRefWillBeNoop(new T(tagName, document)); \ |
924 } | 935 } |
925 | 936 |
926 } // namespace | 937 } // namespace |
927 | 938 |
928 #endif // Element_h | 939 #endif // Element_h |
OLD | NEW |