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

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

Issue 2808403007: Remove ScriptWrappable::FromNode (Closed)
Patch Set: Rebase Created 3 years, 8 months 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
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8BindingForCore.h ('k') | no next file » | 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-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. 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
7 * (http://www.torchmobile.com/) 7 * (http://www.torchmobile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 986
987 DetachLayoutTree(context); 987 DetachLayoutTree(context);
988 MarkAncestorsWithChildNeedsStyleRecalc(); 988 MarkAncestorsWithChildNeedsStyleRecalc();
989 } 989 }
990 990
991 inline bool Node::ShouldCallRecalcStyle(StyleRecalcChange change) { 991 inline bool Node::ShouldCallRecalcStyle(StyleRecalcChange change) {
992 return change >= kIndependentInherit || NeedsStyleRecalc() || 992 return change >= kIndependentInherit || NeedsStyleRecalc() ||
993 ChildNeedsStyleRecalc(); 993 ChildNeedsStyleRecalc();
994 } 994 }
995 995
996 // See the comment at the declaration of ScriptWrappable::fromNode in
997 // bindings/core/v8/ScriptWrappable.h about why this method is defined here.
998 inline ScriptWrappable* ScriptWrappable::FromNode(Node* node) {
999 return node;
1000 }
1001
1002 // Allow equality comparisons of Nodes by reference or pointer, interchangeably. 996 // Allow equality comparisons of Nodes by reference or pointer, interchangeably.
1003 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Node) 997 DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Node)
1004 998
1005 #define DEFINE_NODE_TYPE_CASTS(thisType, predicate) \ 999 #define DEFINE_NODE_TYPE_CASTS(thisType, predicate) \
1006 DEFINE_TYPE_CASTS(thisType, Node, node, node->predicate, node.predicate) 1000 DEFINE_TYPE_CASTS(thisType, Node, node, node->predicate, node.predicate)
1007 1001
1008 // This requires isClassName(const Node&). 1002 // This requires isClassName(const Node&).
1009 #define DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) \ 1003 #define DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) \
1010 DEFINE_TYPE_CASTS(thisType, Node, node, Is##thisType(*node), \ 1004 DEFINE_TYPE_CASTS(thisType, Node, node, Is##thisType(*node), \
1011 Is##thisType(node)) 1005 Is##thisType(node))
1012 1006
1013 #define DECLARE_NODE_FACTORY(T) static T* Create(Document&) 1007 #define DECLARE_NODE_FACTORY(T) static T* Create(Document&)
1014 #define DEFINE_NODE_FACTORY(T) \ 1008 #define DEFINE_NODE_FACTORY(T) \
1015 T* T::Create(Document& document) { return new T(document); } 1009 T* T::Create(Document& document) { return new T(document); }
1016 1010
1017 CORE_EXPORT std::ostream& operator<<(std::ostream&, const Node&); 1011 CORE_EXPORT std::ostream& operator<<(std::ostream&, const Node&);
1018 CORE_EXPORT std::ostream& operator<<(std::ostream&, const Node*); 1012 CORE_EXPORT std::ostream& operator<<(std::ostream&, const Node*);
1019 1013
1020 } // namespace blink 1014 } // namespace blink
1021 1015
1022 #ifndef NDEBUG 1016 #ifndef NDEBUG
1023 // Outside the WebCore namespace for ease of invocation from gdb. 1017 // Outside the WebCore namespace for ease of invocation from gdb.
1024 void showNode(const blink::Node*); 1018 void showNode(const blink::Node*);
1025 void showTree(const blink::Node*); 1019 void showTree(const blink::Node*);
1026 void showNodePath(const blink::Node*); 1020 void showNodePath(const blink::Node*);
1027 #endif 1021 #endif
1028 1022
1029 #endif // Node_h 1023 #endif // Node_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8BindingForCore.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698