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 14 matching lines...) Expand all Loading... |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebNode_h | 31 #ifndef WebNode_h |
32 #define WebNode_h | 32 #define WebNode_h |
33 | 33 |
34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
| 35 #include "../platform/WebImage.h" |
35 #include "../platform/WebPrivatePtr.h" | 36 #include "../platform/WebPrivatePtr.h" |
36 #include "../platform/WebString.h" | 37 #include "../platform/WebString.h" |
37 #include "WebExceptionCode.h" | 38 #include "WebExceptionCode.h" |
38 | 39 |
39 namespace WebCore { class Node; } | 40 namespace WebCore { class Node; } |
40 | 41 |
41 namespace WebKit { | 42 namespace WebKit { |
42 class WebDOMEvent; | 43 class WebDOMEvent; |
43 class WebDOMEventListener; | 44 class WebDOMEventListener; |
44 class WebDOMEventListenerPrivate; | 45 class WebDOMEventListenerPrivate; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 WEBKIT_EXPORT bool focused() const; | 117 WEBKIT_EXPORT bool focused() const; |
117 WEBKIT_EXPORT bool remove(); | 118 WEBKIT_EXPORT bool remove(); |
118 | 119 |
119 // Returns true if the node has a non-empty bounding box in layout. | 120 // Returns true if the node has a non-empty bounding box in layout. |
120 // This does not 100% guarantee the user can see it, but is pretty close. | 121 // This does not 100% guarantee the user can see it, but is pretty close. |
121 // Note: This method only works properly after layout has occurred. | 122 // Note: This method only works properly after layout has occurred. |
122 WEBKIT_EXPORT bool hasNonEmptyBoundingBox() const; | 123 WEBKIT_EXPORT bool hasNonEmptyBoundingBox() const; |
123 WEBKIT_EXPORT WebPluginContainer* pluginContainer() const; | 124 WEBKIT_EXPORT WebPluginContainer* pluginContainer() const; |
124 WEBKIT_EXPORT WebElement shadowHost() const; | 125 WEBKIT_EXPORT WebElement shadowHost() const; |
125 | 126 |
| 127 // Returns the image contents of this WebNode or a null WebImage |
| 128 // if there isn't any. |
| 129 WEBKIT_EXPORT WebImage imageContents(); |
| 130 |
126 template<typename T> T to() | 131 template<typename T> T to() |
127 { | 132 { |
128 T res; | 133 T res; |
129 res.WebNode::assign(*this); | 134 res.WebNode::assign(*this); |
130 return res; | 135 return res; |
131 } | 136 } |
132 | 137 |
133 template<typename T> const T toConst() const | 138 template<typename T> const T toConst() const |
134 { | 139 { |
135 T res; | 140 T res; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 } | 175 } |
171 | 176 |
172 inline bool operator<(const WebNode& a, const WebNode& b) | 177 inline bool operator<(const WebNode& a, const WebNode& b) |
173 { | 178 { |
174 return a.lessThan(b); | 179 return a.lessThan(b); |
175 } | 180 } |
176 | 181 |
177 } // namespace WebKit | 182 } // namespace WebKit |
178 | 183 |
179 #endif | 184 #endif |
OLD | NEW |