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 Apple Inc.
All rights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 inline bool Node::hasID() const | 819 inline bool Node::hasID() const |
820 { | 820 { |
821 return isElementNode() && toElement(this)->hasID(); | 821 return isElementNode() && toElement(this)->hasID(); |
822 } | 822 } |
823 | 823 |
824 inline bool Node::hasClass() const | 824 inline bool Node::hasClass() const |
825 { | 825 { |
826 return isElementNode() && toElement(this)->hasClass(); | 826 return isElementNode() && toElement(this)->hasClass(); |
827 } | 827 } |
828 | 828 |
| 829 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse
rtionPoint) |
| 830 { |
| 831 ASSERT(insertionPoint->inDocument() || isContainerNode()); |
| 832 if (insertionPoint->inDocument()) |
| 833 setFlag(InDocumentFlag); |
| 834 if (parentOrHostNode()->isInShadowTree()) |
| 835 setFlag(IsInShadowTreeFlag); |
| 836 return InsertionDone; |
| 837 } |
| 838 |
| 839 inline void Node::removedFrom(ContainerNode* insertionPoint) |
| 840 { |
| 841 ASSERT(insertionPoint->inDocument() || isContainerNode()); |
| 842 if (insertionPoint->inDocument()) |
| 843 clearFlag(InDocumentFlag); |
| 844 if (isInShadowTree() && !treeScope()->rootNode()->isShadowRoot()) |
| 845 clearFlag(IsInShadowTreeFlag); |
| 846 } |
| 847 |
829 inline bool isShadowHost(const Node* node) | 848 inline bool isShadowHost(const Node* node) |
830 { | 849 { |
831 return node && node->isElementNode() && toElement(node)->shadow(); | 850 return node && node->isElementNode() && toElement(node)->shadow(); |
832 } | 851 } |
833 | 852 |
834 } // namespace | 853 } // namespace |
835 | 854 |
836 #endif | 855 #endif |
OLD | NEW |