Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: Source/bindings/v8/Dictionary.cpp

Issue 287163007: WIP: <canvas> hit regions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/Dictionary.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/Dictionary.cpp
diff --git a/Source/bindings/v8/Dictionary.cpp b/Source/bindings/v8/Dictionary.cpp
index 572d2d66850137125a7d58b7758bec329d8f0f41..de9707a1cc123dcd2f113fcc2e06a5dfab75bc76 100644
--- a/Source/bindings/v8/Dictionary.cpp
+++ b/Source/bindings/v8/Dictionary.cpp
@@ -27,12 +27,14 @@
#include "bindings/v8/Dictionary.h"
#include "V8DOMError.h"
+#include "V8Element.h"
#include "V8EventTarget.h"
#include "V8Gamepad.h"
#include "V8IDBKeyRange.h"
#include "V8MIDIPort.h"
#include "V8MediaKeyError.h"
#include "V8MessagePort.h"
+#include "V8Path2D.h"
#include "V8SpeechRecognitionError.h"
#include "V8SpeechRecognitionResult.h"
#include "V8SpeechRecognitionResultList.h"
@@ -440,6 +442,16 @@ bool Dictionary::get(const String& key, RefPtr<ArrayBufferView>& value) const
return true;
}
+bool Dictionary::get(const String& key, RefPtr<Element>& value) const
+{
+ v8::Local<v8::Value> v8Value;
+ if (!getKey(key, v8Value))
+ return false;
+
+ value = V8Element::toNativeWithTypeCheck(m_isolate, v8Value);
+ return true;
+}
+
bool Dictionary::get(const String& key, RefPtr<MIDIPort>& value) const
{
v8::Local<v8::Value> v8Value;
@@ -460,6 +472,16 @@ bool Dictionary::get(const String& key, RefPtr<MediaKeyError>& value) const
return true;
}
+bool Dictionary::get(const String& key, RefPtr<Path2D>& value) const
+{
+ v8::Local<v8::Value> v8Value;
+ if (!getKey(key, v8Value))
+ return false;
+
+ value = V8Path2D::toNativeWithTypeCheck(m_isolate, v8Value);
+ return true;
+}
+
bool Dictionary::get(const String& key, RefPtrWillBeMember<TrackBase>& value) const
{
v8::Local<v8::Value> v8Value;
« no previous file with comments | « Source/bindings/v8/Dictionary.h ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698