| 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 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 // When a node has rare data we move the layoutObject into the rare data. | 826 // When a node has rare data we move the layoutObject into the rare data. |
| 827 union DataUnion { | 827 union DataUnion { |
| 828 DataUnion() : m_layoutObject(nullptr) { } | 828 DataUnion() : m_layoutObject(nullptr) { } |
| 829 // LayoutObjects are fully owned by their DOM node. See LayoutObject's | 829 // LayoutObjects are fully owned by their DOM node. See LayoutObject's |
| 830 // LIFETIME documentation section. | 830 // LIFETIME documentation section. |
| 831 LayoutObject* m_layoutObject; | 831 LayoutObject* m_layoutObject; |
| 832 NodeRareDataBase* m_rareData; | 832 NodeRareDataBase* m_rareData; |
| 833 } m_data; | 833 } m_data; |
| 834 }; | 834 }; |
| 835 | 835 |
| 836 inline void Node::setParentOrShadowHostNode(ContainerNode* parent) |
| 837 { |
| 838 ASSERT(isMainThread()); |
| 839 m_parentOrShadowHostNode = parent; |
| 840 } |
| 841 |
| 836 inline ContainerNode* Node::parentOrShadowHostNode() const | 842 inline ContainerNode* Node::parentOrShadowHostNode() const |
| 837 { | 843 { |
| 838 ASSERT(isMainThread()); | 844 ASSERT(isMainThread()); |
| 839 return m_parentOrShadowHostNode; | 845 return m_parentOrShadowHostNode; |
| 840 } | 846 } |
| 841 | 847 |
| 842 inline ContainerNode* Node::parentNode() const | 848 inline ContainerNode* Node::parentNode() const |
| 843 { | 849 { |
| 844 return isShadowRoot() ? nullptr : parentOrShadowHostNode(); | 850 return isShadowRoot() ? nullptr : parentOrShadowHostNode(); |
| 845 } | 851 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 } // namespace blink | 915 } // namespace blink |
| 910 | 916 |
| 911 #ifndef NDEBUG | 917 #ifndef NDEBUG |
| 912 // Outside the WebCore namespace for ease of invocation from gdb. | 918 // Outside the WebCore namespace for ease of invocation from gdb. |
| 913 void showNode(const blink::Node*); | 919 void showNode(const blink::Node*); |
| 914 void showTree(const blink::Node*); | 920 void showTree(const blink::Node*); |
| 915 void showNodePath(const blink::Node*); | 921 void showNodePath(const blink::Node*); |
| 916 #endif | 922 #endif |
| 917 | 923 |
| 918 #endif // Node_h | 924 #endif // Node_h |
| OLD | NEW |