| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 PassRefPtr<ClientRect> getBoundingClientRect(); | 128 PassRefPtr<ClientRect> getBoundingClientRect(); |
| 129 | 129 |
| 130 virtual void didMoveToNewDocument(Document&) override; | 130 virtual void didMoveToNewDocument(Document&) override; |
| 131 | 131 |
| 132 CSSStyleDeclaration* style(); | 132 CSSStyleDeclaration* style(); |
| 133 | 133 |
| 134 const QualifiedName& tagQName() const { return m_tagName; } | 134 const QualifiedName& tagQName() const { return m_tagName; } |
| 135 String tagName() const { return nodeName(); } | 135 String tagName() const { return nodeName(); } |
| 136 | 136 |
| 137 bool hasTagName(const QualifiedName& tagName) const { return m_tagName == ta
gName; } | 137 bool hasTagName(const QualifiedName& tagName) const { return m_tagName == ta
gName; } |
| 138 bool hasTagName(const HTMLQualifiedName& name) const { return hasLocalName(n
ame.localName()); } | |
| 139 | 138 |
| 140 // A fast function for checking the local name against another atomic string
. | 139 // A fast function for checking the local name against another atomic string
. |
| 141 bool hasLocalName(const AtomicString& other) const { return m_tagName.localN
ame() == other; } | 140 bool hasLocalName(const AtomicString& other) const { return m_tagName.localN
ame() == other; } |
| 142 | 141 |
| 143 virtual const AtomicString& localName() const override final { return m_tagN
ame.localName(); } | 142 virtual const AtomicString& localName() const override final { return m_tagN
ame.localName(); } |
| 144 | 143 |
| 145 virtual String nodeName() const override; | 144 virtual String nodeName() const override; |
| 146 | 145 |
| 147 PassRefPtr<Element> cloneElementWithChildren(); | 146 PassRefPtr<Element> cloneElementWithChildren(); |
| 148 PassRefPtr<Element> cloneElementWithoutChildren(); | 147 PassRefPtr<Element> cloneElementWithoutChildren(); |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 clearFlag(IsInShadowTreeFlag); | 513 clearFlag(IsInShadowTreeFlag); |
| 515 } | 514 } |
| 516 | 515 |
| 517 inline ShadowRoot* Node::shadowRoot() const | 516 inline ShadowRoot* Node::shadowRoot() const |
| 518 { | 517 { |
| 519 if (!isElementNode()) | 518 if (!isElementNode()) |
| 520 return 0; | 519 return 0; |
| 521 return toElement(this)->shadowRoot(); | 520 return toElement(this)->shadowRoot(); |
| 522 } | 521 } |
| 523 | 522 |
| 524 inline bool Node::hasTagName(const HTMLQualifiedName& name) const | |
| 525 { | |
| 526 return isHTMLElement() && toElement(*this).hasTagName(name); | |
| 527 } | |
| 528 | |
| 529 inline void Element::invalidateStyleAttribute() | 523 inline void Element::invalidateStyleAttribute() |
| 530 { | 524 { |
| 531 ASSERT(elementData()); | 525 ASSERT(elementData()); |
| 532 elementData()->m_styleAttributeIsDirty = true; | 526 elementData()->m_styleAttributeIsDirty = true; |
| 533 } | 527 } |
| 534 | 528 |
| 535 inline bool isShadowHost(const Node* node) | 529 inline bool isShadowHost(const Node* node) |
| 536 { | 530 { |
| 537 return node && node->isElementNode() && toElement(node)->shadow(); | 531 return node && node->isElementNode() && toElement(node)->shadow(); |
| 538 } | 532 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 564 static PassRefPtr<T> create(const QualifiedName&, Document&) | 558 static PassRefPtr<T> create(const QualifiedName&, Document&) |
| 565 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 559 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 566 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \ | 560 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \ |
| 567 { \ | 561 { \ |
| 568 return adoptRef(new T(tagName, document)); \ | 562 return adoptRef(new T(tagName, document)); \ |
| 569 } | 563 } |
| 570 | 564 |
| 571 } // namespace | 565 } // namespace |
| 572 | 566 |
| 573 #endif // SKY_ENGINE_CORE_DOM_ELEMENT_H_ | 567 #endif // SKY_ENGINE_CORE_DOM_ELEMENT_H_ |
| OLD | NEW |