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 17 matching lines...) Expand all Loading... |
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 #include "config.h" | 31 #include "config.h" |
32 #include "WebDocument.h" | 32 #include "WebDocument.h" |
33 | 33 |
34 #include "WebAXObject.h" | 34 #include "WebAXObject.h" |
35 #include "WebDOMEvent.h" | 35 #include "WebDOMEvent.h" |
36 #include "WebDocumentType.h" | 36 #include "WebDocumentType.h" |
37 #include "WebElement.h" | 37 #include "WebElement.h" |
| 38 #include "WebElementCollection.h" |
38 #include "WebFormElement.h" | 39 #include "WebFormElement.h" |
39 #include "WebFrameImpl.h" | 40 #include "WebFrameImpl.h" |
40 #include "WebNodeCollection.h" | |
41 #include "WebNodeList.h" | 41 #include "WebNodeList.h" |
42 #include "bindings/v8/Dictionary.h" | 42 #include "bindings/v8/Dictionary.h" |
43 #include "bindings/v8/ExceptionState.h" | 43 #include "bindings/v8/ExceptionState.h" |
44 #include "bindings/v8/ScriptState.h" | 44 #include "bindings/v8/ScriptState.h" |
45 #include "bindings/v8/ScriptValue.h" | 45 #include "bindings/v8/ScriptValue.h" |
46 #include "core/accessibility/AXObjectCache.h" | 46 #include "core/accessibility/AXObjectCache.h" |
47 #include "core/css/CSSParserMode.h" | 47 #include "core/css/CSSParserMode.h" |
48 #include "core/css/StyleSheetContents.h" | 48 #include "core/css/StyleSheetContents.h" |
49 #include "core/dom/CSSSelectorWatch.h" | 49 #include "core/dom/CSSSelectorWatch.h" |
50 #include "core/dom/Document.h" | 50 #include "core/dom/Document.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 WebElement WebDocument::head() | 145 WebElement WebDocument::head() |
146 { | 146 { |
147 return WebElement(unwrap<Document>()->head()); | 147 return WebElement(unwrap<Document>()->head()); |
148 } | 148 } |
149 | 149 |
150 WebString WebDocument::title() const | 150 WebString WebDocument::title() const |
151 { | 151 { |
152 return WebString(constUnwrap<Document>()->title()); | 152 return WebString(constUnwrap<Document>()->title()); |
153 } | 153 } |
154 | 154 |
155 WebNodeCollection WebDocument::all() | 155 WebElementCollection WebDocument::all() |
156 { | 156 { |
157 return WebNodeCollection(unwrap<Document>()->all()); | 157 return WebElementCollection(unwrap<Document>()->all()); |
158 } | 158 } |
159 | 159 |
160 void WebDocument::images(WebVector<WebElement>& results) | 160 void WebDocument::images(WebVector<WebElement>& results) |
161 { | 161 { |
162 RefPtr<HTMLCollection> images = unwrap<Document>()->images(); | 162 RefPtr<HTMLCollection> images = unwrap<Document>()->images(); |
163 size_t sourceLength = images->length(); | 163 size_t sourceLength = images->length(); |
164 Vector<WebElement> temp; | 164 Vector<WebElement> temp; |
165 temp.reserveCapacity(sourceLength); | 165 temp.reserveCapacity(sourceLength); |
166 for (size_t i = 0; i < sourceLength; ++i) { | 166 for (size_t i = 0; i < sourceLength; ++i) { |
167 Element* element = images->item(i); | 167 Element* element = images->item(i); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 m_private = elem; | 315 m_private = elem; |
316 return *this; | 316 return *this; |
317 } | 317 } |
318 | 318 |
319 WebDocument::operator PassRefPtr<Document>() const | 319 WebDocument::operator PassRefPtr<Document>() const |
320 { | 320 { |
321 return toDocument(m_private.get()); | 321 return toDocument(m_private.get()); |
322 } | 322 } |
323 | 323 |
324 } // namespace blink | 324 } // namespace blink |
OLD | NEW |