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, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl
e Inc. All rights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl
e 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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 { | 764 { |
765 ContainerNode* parent = parentNode(); | 765 ContainerNode* parent = parentNode(); |
766 return parent && parent->isElementNode() ? toElement(parent) : 0; | 766 return parent && parent->isElementNode() ? toElement(parent) : 0; |
767 } | 767 } |
768 | 768 |
769 inline Element* Node::previousElementSibling() const | 769 inline Element* Node::previousElementSibling() const |
770 { | 770 { |
771 Node* n = previousSibling(); | 771 Node* n = previousSibling(); |
772 while (n && !n->isElementNode()) | 772 while (n && !n->isElementNode()) |
773 n = n->previousSibling(); | 773 n = n->previousSibling(); |
774 return static_cast<Element*>(n); | 774 return toElement(n); |
775 } | 775 } |
776 | 776 |
777 inline Element* Node::nextElementSibling() const | 777 inline Element* Node::nextElementSibling() const |
778 { | 778 { |
779 Node* n = nextSibling(); | 779 Node* n = nextSibling(); |
780 while (n && !n->isElementNode()) | 780 while (n && !n->isElementNode()) |
781 n = n->nextSibling(); | 781 n = n->nextSibling(); |
782 return static_cast<Element*>(n); | 782 return toElement(n); |
783 } | 783 } |
784 | 784 |
785 inline bool Element::fastHasAttribute(const QualifiedName& name) const | 785 inline bool Element::fastHasAttribute(const QualifiedName& name) const |
786 { | 786 { |
787 ASSERT(fastAttributeLookupAllowed(name)); | 787 ASSERT(fastAttributeLookupAllowed(name)); |
788 return elementData() && getAttributeItem(name); | 788 return elementData() && getAttributeItem(name); |
789 } | 789 } |
790 | 790 |
791 inline const AtomicString& Element::fastGetAttribute(const QualifiedName& name)
const | 791 inline const AtomicString& Element::fastGetAttribute(const QualifiedName& name)
const |
792 { | 792 { |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 | 995 |
996 inline const Attribute* ElementData::attributeItem(unsigned index) const | 996 inline const Attribute* ElementData::attributeItem(unsigned index) const |
997 { | 997 { |
998 RELEASE_ASSERT(index < length()); | 998 RELEASE_ASSERT(index < length()); |
999 return attributeBase() + index; | 999 return attributeBase() + index; |
1000 } | 1000 } |
1001 | 1001 |
1002 } // namespace | 1002 } // namespace |
1003 | 1003 |
1004 #endif | 1004 #endif |
OLD | NEW |