| 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 25 matching lines...) Expand all Loading... |
| 36 #include "sky/engine/platform/heap/Handle.h" | 36 #include "sky/engine/platform/heap/Handle.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class ActiveAnimations; | 40 class ActiveAnimations; |
| 41 class Attr; | 41 class Attr; |
| 42 class Attribute; | 42 class Attribute; |
| 43 class CSSStyleDeclaration; | 43 class CSSStyleDeclaration; |
| 44 class ClientRect; | 44 class ClientRect; |
| 45 class ClientRectList; | 45 class ClientRectList; |
| 46 class CustomElementDefinition; | |
| 47 class DOMTokenList; | 46 class DOMTokenList; |
| 48 class Document; | 47 class Document; |
| 49 class ElementRareData; | 48 class ElementRareData; |
| 50 class ElementShadow; | 49 class ElementShadow; |
| 51 class ExceptionState; | 50 class ExceptionState; |
| 52 class Image; | 51 class Image; |
| 53 class IntSize; | 52 class IntSize; |
| 54 class MutableStylePropertySet; | 53 class MutableStylePropertySet; |
| 55 class PropertySetCSSStyleDeclaration; | 54 class PropertySetCSSStyleDeclaration; |
| 56 class PseudoElement; | 55 class PseudoElement; |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 void dispatchBlurEvent(Element* newFocusedElement); | 235 void dispatchBlurEvent(Element* newFocusedElement); |
| 237 void dispatchFocusInEvent(const AtomicString& eventType, Element* oldFocused
Element); | 236 void dispatchFocusInEvent(const AtomicString& eventType, Element* oldFocused
Element); |
| 238 void dispatchFocusOutEvent(const AtomicString& eventType, Element* newFocuse
dElement); | 237 void dispatchFocusOutEvent(const AtomicString& eventType, Element* newFocuse
dElement); |
| 239 | 238 |
| 240 bool matches(const String& selectors, ExceptionState&); | 239 bool matches(const String& selectors, ExceptionState&); |
| 241 | 240 |
| 242 DOMTokenList& classList(); | 241 DOMTokenList& classList(); |
| 243 | 242 |
| 244 virtual bool canContainRangeEndPoint() const override { return true; } | 243 virtual bool canContainRangeEndPoint() const override { return true; } |
| 245 | 244 |
| 246 void setCustomElementDefinition(PassRefPtr<CustomElementDefinition>); | |
| 247 CustomElementDefinition* customElementDefinition() const; | |
| 248 | |
| 249 bool isSpellCheckingEnabled() const; | 245 bool isSpellCheckingEnabled() const; |
| 250 | 246 |
| 251 // FIXME: public for RenderTreeBuilder, we shouldn't expose this though. | 247 // FIXME: public for RenderTreeBuilder, we shouldn't expose this though. |
| 252 PassRefPtr<RenderStyle> styleForRenderer(); | 248 PassRefPtr<RenderStyle> styleForRenderer(); |
| 253 | 249 |
| 254 bool hasID() const; | 250 bool hasID() const; |
| 255 bool hasClass() const; | 251 bool hasClass() const; |
| 256 const SpaceSplitString& classNames() const; | 252 const SpaceSplitString& classNames() const; |
| 257 | 253 |
| 258 ActiveAnimations* activeAnimations() const; | 254 ActiveAnimations* activeAnimations() const; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 SpellcheckAttributeState spellcheckAttributeState() const; | 344 SpellcheckAttributeState spellcheckAttributeState() const; |
| 349 | 345 |
| 350 void createUniqueElementData(); | 346 void createUniqueElementData(); |
| 351 | 347 |
| 352 bool shouldInvalidateDistributionWhenAttributeChanged(ElementShadow*, const
QualifiedName&, const AtomicString&); | 348 bool shouldInvalidateDistributionWhenAttributeChanged(ElementShadow*, const
QualifiedName&, const AtomicString&); |
| 353 | 349 |
| 354 ElementRareData* elementRareData() const; | 350 ElementRareData* elementRareData() const; |
| 355 ElementRareData& ensureElementRareData(); | 351 ElementRareData& ensureElementRareData(); |
| 356 | 352 |
| 357 RefPtr<ElementData> m_elementData; | 353 RefPtr<ElementData> m_elementData; |
| 358 RefPtr<CustomElementDefinition> m_customElementDefinition; | |
| 359 }; | 354 }; |
| 360 | 355 |
| 361 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); | 356 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); |
| 362 template <typename T> bool isElementOfType(const Node&); | 357 template <typename T> bool isElementOfType(const Node&); |
| 363 template <> inline bool isElementOfType<const Element>(const Node& node) { retur
n node.isElementNode(); } | 358 template <> inline bool isElementOfType<const Element>(const Node& node) { retur
n node.isElementNode(); } |
| 364 template <typename T> inline bool isElementOfType(const Element& element) { retu
rn isElementOfType<T>(static_cast<const Node&>(element)); } | 359 template <typename T> inline bool isElementOfType(const Element& element) { retu
rn isElementOfType<T>(static_cast<const Node&>(element)); } |
| 365 template <> inline bool isElementOfType<const Element>(const Element&) { return
true; } | 360 template <> inline bool isElementOfType<const Element>(const Element&) { return
true; } |
| 366 | 361 |
| 367 // Type casting. | 362 // Type casting. |
| 368 template<typename T> inline T& toElement(Node& node) | 363 template<typename T> inline T& toElement(Node& node) |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 static PassRefPtr<T> create(const QualifiedName&, Document&) | 556 static PassRefPtr<T> create(const QualifiedName&, Document&) |
| 562 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 557 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 563 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \ | 558 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \ |
| 564 { \ | 559 { \ |
| 565 return adoptRef(new T(tagName, document)); \ | 560 return adoptRef(new T(tagName, document)); \ |
| 566 } | 561 } |
| 567 | 562 |
| 568 } // namespace | 563 } // namespace |
| 569 | 564 |
| 570 #endif // SKY_ENGINE_CORE_DOM_ELEMENT_H_ | 565 #endif // SKY_ENGINE_CORE_DOM_ELEMENT_H_ |
| OLD | NEW |