OLD | NEW |
---|---|
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 Loading... | |
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 | |
tkent
2014/05/19 07:23:40
Sounds reasonable.
| |
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. | |
haraken
2014/05/19 09:19:50
Yeah, probably sounds reasonable.
It might be pos
| |
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 Loading... | |
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 |
OLD | NEW |