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

Side by Side Diff: public/web/WebNode.h

Issue 280123002: Oilpan: move LiveNodeList collections to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have NodeRareData clear out NodeListsNodeData instead. Created 6 years, 7 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 | « public/web/WebElementCollection.h ('k') | public/web/WebNodeList.h » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 { 137 {
138 T res; 138 T res;
139 res.WebNode::assign(*this); 139 res.WebNode::assign(*this);
140 return res; 140 return res;
141 } 141 }
142 142
143 #if BLINK_IMPLEMENTATION 143 #if BLINK_IMPLEMENTATION
144 WebNode(const PassRefPtrWillBeRawPtr<WebCore::Node>&); 144 WebNode(const PassRefPtrWillBeRawPtr<WebCore::Node>&);
145 WebNode& operator=(const PassRefPtrWillBeRawPtr<WebCore::Node>&); 145 WebNode& operator=(const PassRefPtrWillBeRawPtr<WebCore::Node>&);
146 operator PassRefPtrWillBeRawPtr<WebCore::Node>() const; 146 operator PassRefPtrWillBeRawPtr<WebCore::Node>() const;
147 #if ENABLE(OILPAN)
148 // This constructor enables creation of WebNodes from Members
149 // holding WebCore::Node-derived objects (this shows up in WebVector
150 // assignments, for instance.) It is needed because a RawPtr<T> constructor
151 // from a Member<U> isn't provided, hence the above constructor
152 // won't be usable.
153 template<typename U>
154 WebNode(const WebCore::Member<U>& other, EnsurePtrConvertibleArgDecl(U, WebC ore::Node))
155 : m_private(other.get())
156 {
157 }
158 #endif
147 #endif 159 #endif
148 160
149 #if BLINK_IMPLEMENTATION 161 #if BLINK_IMPLEMENTATION
150 template<typename T> T* unwrap() 162 template<typename T> T* unwrap()
151 { 163 {
152 return static_cast<T*>(m_private.get()); 164 return static_cast<T*>(m_private.get());
153 } 165 }
154 166
155 template<typename T> const T* constUnwrap() const 167 template<typename T> const T* constUnwrap() const
156 { 168 {
(...skipping 16 matching lines...) Expand all
173 } 185 }
174 186
175 inline bool operator<(const WebNode& a, const WebNode& b) 187 inline bool operator<(const WebNode& a, const WebNode& b)
176 { 188 {
177 return a.lessThan(b); 189 return a.lessThan(b);
178 } 190 }
179 191
180 } // namespace blink 192 } // namespace blink
181 193
182 #endif 194 #endif
OLDNEW
« no previous file with comments | « public/web/WebElementCollection.h ('k') | public/web/WebNodeList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698