| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "public/web/WebDOMEvent.h" | 58 #include "public/web/WebDOMEvent.h" |
| 59 #include "public/web/WebDocumentType.h" | 59 #include "public/web/WebDocumentType.h" |
| 60 #include "public/web/WebElement.h" | 60 #include "public/web/WebElement.h" |
| 61 #include "public/web/WebElementCollection.h" | 61 #include "public/web/WebElementCollection.h" |
| 62 #include "public/web/WebFormElement.h" | 62 #include "public/web/WebFormElement.h" |
| 63 #include "public/web/WebNodeList.h" | 63 #include "public/web/WebNodeList.h" |
| 64 #include "web/WebLocalFrameImpl.h" | 64 #include "web/WebLocalFrameImpl.h" |
| 65 #include "wtf/PassRefPtr.h" | 65 #include "wtf/PassRefPtr.h" |
| 66 #include <v8.h> | 66 #include <v8.h> |
| 67 | 67 |
| 68 using namespace blink; | |
| 69 | |
| 70 namespace blink { | 68 namespace blink { |
| 71 | 69 |
| 72 WebURL WebDocument::url() const | 70 WebURL WebDocument::url() const |
| 73 { | 71 { |
| 74 return constUnwrap<Document>()->url(); | 72 return constUnwrap<Document>()->url(); |
| 75 } | 73 } |
| 76 | 74 |
| 77 WebSecurityOrigin WebDocument::securityOrigin() const | 75 WebSecurityOrigin WebDocument::securityOrigin() const |
| 78 { | 76 { |
| 79 if (!constUnwrap<Document>()) | 77 if (!constUnwrap<Document>()) |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 WebVector<WebDraggableRegion> WebDocument::draggableRegions() const | 290 WebVector<WebDraggableRegion> WebDocument::draggableRegions() const |
| 293 { | 291 { |
| 294 WebVector<WebDraggableRegion> draggableRegions; | 292 WebVector<WebDraggableRegion> draggableRegions; |
| 295 const Document* document = constUnwrap<Document>(); | 293 const Document* document = constUnwrap<Document>(); |
| 296 if (document->hasAnnotatedRegions()) { | 294 if (document->hasAnnotatedRegions()) { |
| 297 const Vector<AnnotatedRegionValue>& regions = document->annotatedRegions
(); | 295 const Vector<AnnotatedRegionValue>& regions = document->annotatedRegions
(); |
| 298 draggableRegions = WebVector<WebDraggableRegion>(regions.size()); | 296 draggableRegions = WebVector<WebDraggableRegion>(regions.size()); |
| 299 for (size_t i = 0; i < regions.size(); i++) { | 297 for (size_t i = 0; i < regions.size(); i++) { |
| 300 const AnnotatedRegionValue& value = regions[i]; | 298 const AnnotatedRegionValue& value = regions[i]; |
| 301 draggableRegions[i].draggable = value.draggable; | 299 draggableRegions[i].draggable = value.draggable; |
| 302 draggableRegions[i].bounds = blink::IntRect(value.bounds); | 300 draggableRegions[i].bounds = IntRect(value.bounds); |
| 303 } | 301 } |
| 304 } | 302 } |
| 305 return draggableRegions; | 303 return draggableRegions; |
| 306 } | 304 } |
| 307 | 305 |
| 308 v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString
& name, v8::Handle<v8::Value> options, WebExceptionCode& ec) | 306 v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString
& name, v8::Handle<v8::Value> options, WebExceptionCode& ec) |
| 309 { | 307 { |
| 310 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 308 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
| 311 Document* document = unwrap<Document>(); | 309 Document* document = unwrap<Document>(); |
| 312 Dictionary dictionary(options, isolate); | 310 Dictionary dictionary(options, isolate); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 328 m_private = elem; | 326 m_private = elem; |
| 329 return *this; | 327 return *this; |
| 330 } | 328 } |
| 331 | 329 |
| 332 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const | 330 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const |
| 333 { | 331 { |
| 334 return toDocument(m_private.get()); | 332 return toDocument(m_private.get()); |
| 335 } | 333 } |
| 336 | 334 |
| 337 } // namespace blink | 335 } // namespace blink |
| OLD | NEW |