| 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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 return elementData() && elementData()->hasClass(); | 781 return elementData() && elementData()->hasClass(); |
| 782 } | 782 } |
| 783 | 783 |
| 784 inline UniqueElementData& Element::ensureUniqueElementData() | 784 inline UniqueElementData& Element::ensureUniqueElementData() |
| 785 { | 785 { |
| 786 if (!elementData() || !elementData()->isUnique()) | 786 if (!elementData() || !elementData()->isUnique()) |
| 787 createUniqueElementData(); | 787 createUniqueElementData(); |
| 788 return toUniqueElementData(*m_elementData); | 788 return toUniqueElementData(*m_elementData); |
| 789 } | 789 } |
| 790 | 790 |
| 791 // Put here to make them inline. | |
| 792 inline bool Node::hasID() const | |
| 793 { | |
| 794 return isElementNode() && toElement(this)->hasID(); | |
| 795 } | |
| 796 | |
| 797 inline bool Node::hasClass() const | |
| 798 { | |
| 799 return isElementNode() && toElement(this)->hasClass(); | |
| 800 } | |
| 801 | |
| 802 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse
rtionPoint) | 791 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse
rtionPoint) |
| 803 { | 792 { |
| 804 ASSERT(!childNeedsStyleInvalidation()); | 793 ASSERT(!childNeedsStyleInvalidation()); |
| 805 ASSERT(!needsStyleInvalidation()); | 794 ASSERT(!needsStyleInvalidation()); |
| 806 ASSERT(insertionPoint->inDocument() || isContainerNode()); | 795 ASSERT(insertionPoint->inDocument() || isContainerNode()); |
| 807 if (insertionPoint->inDocument()) | 796 if (insertionPoint->inDocument()) |
| 808 setFlag(InDocumentFlag); | 797 setFlag(InDocumentFlag); |
| 809 if (parentOrShadowHostNode()->isInShadowTree()) | 798 if (parentOrShadowHostNode()->isInShadowTree()) |
| 810 setFlag(IsInShadowTreeFlag); | 799 setFlag(IsInShadowTreeFlag); |
| 811 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio
nRecalc()) | 800 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio
nRecalc()) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 860 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
| 872 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 861 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 873 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ | 862 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ |
| 874 { \ | 863 { \ |
| 875 return adoptRefWillBeNoop(new T(tagName, document)); \ | 864 return adoptRefWillBeNoop(new T(tagName, document)); \ |
| 876 } | 865 } |
| 877 | 866 |
| 878 } // namespace | 867 } // namespace |
| 879 | 868 |
| 880 #endif | 869 #endif |
| OLD | NEW |