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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #include "public/web/WebDOMEvent.h" | 59 #include "public/web/WebDOMEvent.h" |
60 #include "public/web/WebDocumentType.h" | 60 #include "public/web/WebDocumentType.h" |
61 #include "public/web/WebElement.h" | 61 #include "public/web/WebElement.h" |
62 #include "public/web/WebElementCollection.h" | 62 #include "public/web/WebElementCollection.h" |
63 #include "public/web/WebFormElement.h" | 63 #include "public/web/WebFormElement.h" |
64 #include "public/web/WebNodeList.h" | 64 #include "public/web/WebNodeList.h" |
65 #include "web/WebLocalFrameImpl.h" | 65 #include "web/WebLocalFrameImpl.h" |
66 #include "wtf/PassRefPtr.h" | 66 #include "wtf/PassRefPtr.h" |
67 #include <v8.h> | 67 #include <v8.h> |
68 | 68 |
69 using namespace WebCore; | 69 using namespace blink; |
70 | 70 |
71 namespace blink { | 71 namespace blink { |
72 | 72 |
73 WebURL WebDocument::url() const | 73 WebURL WebDocument::url() const |
74 { | 74 { |
75 return constUnwrap<Document>()->url(); | 75 return constUnwrap<Document>()->url(); |
76 } | 76 } |
77 | 77 |
78 WebSecurityOrigin WebDocument::securityOrigin() const | 78 WebSecurityOrigin WebDocument::securityOrigin() const |
79 { | 79 { |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 WebVector<WebDraggableRegion> WebDocument::draggableRegions() const | 280 WebVector<WebDraggableRegion> WebDocument::draggableRegions() const |
281 { | 281 { |
282 WebVector<WebDraggableRegion> draggableRegions; | 282 WebVector<WebDraggableRegion> draggableRegions; |
283 const Document* document = constUnwrap<Document>(); | 283 const Document* document = constUnwrap<Document>(); |
284 if (document->hasAnnotatedRegions()) { | 284 if (document->hasAnnotatedRegions()) { |
285 const Vector<AnnotatedRegionValue>& regions = document->annotatedRegions
(); | 285 const Vector<AnnotatedRegionValue>& regions = document->annotatedRegions
(); |
286 draggableRegions = WebVector<WebDraggableRegion>(regions.size()); | 286 draggableRegions = WebVector<WebDraggableRegion>(regions.size()); |
287 for (size_t i = 0; i < regions.size(); i++) { | 287 for (size_t i = 0; i < regions.size(); i++) { |
288 const AnnotatedRegionValue& value = regions[i]; | 288 const AnnotatedRegionValue& value = regions[i]; |
289 draggableRegions[i].draggable = value.draggable; | 289 draggableRegions[i].draggable = value.draggable; |
290 draggableRegions[i].bounds = WebCore::IntRect(value.bounds); | 290 draggableRegions[i].bounds = blink::IntRect(value.bounds); |
291 } | 291 } |
292 } | 292 } |
293 return draggableRegions; | 293 return draggableRegions; |
294 } | 294 } |
295 | 295 |
296 v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString
& name, v8::Handle<v8::Value> options, WebExceptionCode& ec) | 296 v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString
& name, v8::Handle<v8::Value> options, WebExceptionCode& ec) |
297 { | 297 { |
298 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 298 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
299 Document* document = unwrap<Document>(); | 299 Document* document = unwrap<Document>(); |
300 Dictionary dictionary(options, isolate); | 300 Dictionary dictionary(options, isolate); |
(...skipping 15 matching lines...) Expand all Loading... |
316 m_private = elem; | 316 m_private = elem; |
317 return *this; | 317 return *this; |
318 } | 318 } |
319 | 319 |
320 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const | 320 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const |
321 { | 321 { |
322 return toDocument(m_private.get()); | 322 return toDocument(m_private.get()); |
323 } | 323 } |
324 | 324 |
325 } // namespace blink | 325 } // namespace blink |
OLD | NEW |