Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.h

Issue 1455943002: [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CORE_EXPORT Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
842 inline ContainerNode* Node::parentOrShadowHostNode() const 836 inline ContainerNode* Node::parentOrShadowHostNode() const
843 { 837 {
844 ASSERT(isMainThread()); 838 ASSERT(isMainThread());
845 return m_parentOrShadowHostNode; 839 return m_parentOrShadowHostNode;
846 } 840 }
847 841
848 inline ContainerNode* Node::parentNode() const 842 inline ContainerNode* Node::parentNode() const
849 { 843 {
850 return isShadowRoot() ? nullptr : parentOrShadowHostNode(); 844 return isShadowRoot() ? nullptr : parentOrShadowHostNode();
851 } 845 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 } // namespace blink 909 } // namespace blink
916 910
917 #ifndef NDEBUG 911 #ifndef NDEBUG
918 // Outside the WebCore namespace for ease of invocation from gdb. 912 // Outside the WebCore namespace for ease of invocation from gdb.
919 void showNode(const blink::Node*); 913 void showNode(const blink::Node*);
920 void showTree(const blink::Node*); 914 void showTree(const blink::Node*);
921 void showNodePath(const blink::Node*); 915 void showNodePath(const blink::Node*);
922 #endif 916 #endif
923 917
924 #endif // Node_h 918 #endif // Node_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ElementData.cpp ('k') | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698