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

Side by Side Diff: trunk/Source/core/dom/Node.h

Issue 75463008: Revert 162247 "Revert 162180 "[Refactoring] Remove include "core..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « trunk/Source/core/dom/Element.cpp ('k') | trunk/Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights 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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 909
910 detach(context); 910 detach(context);
911 markAncestorsWithChildNeedsStyleRecalc(); 911 markAncestorsWithChildNeedsStyleRecalc();
912 } 912 }
913 913
914 inline bool shouldRecalcStyle(StyleRecalcChange change, const Node* node) 914 inline bool shouldRecalcStyle(StyleRecalcChange change, const Node* node)
915 { 915 {
916 return change >= Inherit || node->childNeedsStyleRecalc() || node->needsStyl eRecalc(); 916 return change >= Inherit || node->childNeedsStyleRecalc() || node->needsStyl eRecalc();
917 } 917 }
918 918
919 inline bool isTreeScopeRoot(const Node* node)
920 {
921 return !node || node->isDocumentNode() || node->isShadowRoot();
922 }
923
924 inline bool isTreeScopeRoot(const Node& node)
925 {
926 return node.isDocumentNode() || node.isShadowRoot();
927 }
928
919 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. 929 // Allow equality comparisons of Nodes by reference or pointer, interchangeably.
920 inline bool operator==(const Node& a, const Node& b) { return &a == &b; } 930 inline bool operator==(const Node& a, const Node& b) { return &a == &b; }
921 inline bool operator==(const Node& a, const Node* b) { return &a == b; } 931 inline bool operator==(const Node& a, const Node* b) { return &a == b; }
922 inline bool operator==(const Node* a, const Node& b) { return a == &b; } 932 inline bool operator==(const Node* a, const Node& b) { return a == &b; }
923 inline bool operator!=(const Node& a, const Node& b) { return !(a == b); } 933 inline bool operator!=(const Node& a, const Node& b) { return !(a == b); }
924 inline bool operator!=(const Node& a, const Node* b) { return !(a == b); } 934 inline bool operator!=(const Node& a, const Node* b) { return !(a == b); }
925 inline bool operator!=(const Node* a, const Node& b) { return !(a == b); } 935 inline bool operator!=(const Node* a, const Node& b) { return !(a == b); }
926 inline bool operator==(const PassRefPtr<Node>& a, const Node& b) { return a.get( ) == &b; } 936 inline bool operator==(const PassRefPtr<Node>& a, const Node& b) { return a.get( ) == &b; }
927 inline bool operator==(const Node& a, const PassRefPtr<Node>& b) { return &a == b.get(); } 937 inline bool operator==(const Node& a, const PassRefPtr<Node>& b) { return &a == b.get(); }
928 inline bool operator!=(const PassRefPtr<Node>& a, const Node& b) { return !(a == b); } 938 inline bool operator!=(const PassRefPtr<Node>& a, const Node& b) { return !(a == b); }
(...skipping 11 matching lines...) Expand all
940 950
941 } // namespace WebCore 951 } // namespace WebCore
942 952
943 #ifndef NDEBUG 953 #ifndef NDEBUG
944 // Outside the WebCore namespace for ease of invocation from gdb. 954 // Outside the WebCore namespace for ease of invocation from gdb.
945 void showTree(const WebCore::Node*); 955 void showTree(const WebCore::Node*);
946 void showNodePath(const WebCore::Node*); 956 void showNodePath(const WebCore::Node*);
947 #endif 957 #endif
948 958
949 #endif 959 #endif
OLDNEW
« no previous file with comments | « trunk/Source/core/dom/Element.cpp ('k') | trunk/Source/core/dom/SelectorQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698