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

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

Issue 300223009: Implement basic parts of hit regions on canvas2d. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: exclude clipping region part Created 6 years, 6 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
Index: Source/bindings/v8/Dictionary.cpp
diff --git a/Source/bindings/v8/Dictionary.cpp b/Source/bindings/v8/Dictionary.cpp
index caaad219a5080724fe72b6827935133ec673c8e5..da7ee68e3b5db21f483a1e414478bfbe3ec9e380 100644
--- a/Source/bindings/v8/Dictionary.cpp
+++ b/Source/bindings/v8/Dictionary.cpp
@@ -27,6 +27,7 @@
#include "bindings/v8/Dictionary.h"
#include "bindings/core/v8/V8DOMError.h"
+#include "bindings/core/v8/V8Element.h"
#include "bindings/core/v8/V8EventTarget.h"
#include "bindings/core/v8/V8MediaKeyError.h"
#include "bindings/core/v8/V8MessagePort.h"
@@ -417,6 +418,16 @@ bool Dictionary::getWithUndefinedOrNullCheck(const String& key, String& value) c
return true;
}
+bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtrWillBeMember<Element>& value) const
+{
+ v8::Local<v8::Value> v8Value;
+ if (!getKey(key, v8Value) || WebCore::isUndefinedOrNull(v8Value))
+ return false;
+
+ value = V8Element::toNativeWithTypeCheck(m_isolate, v8Value);
+ return true;
+}
+
bool Dictionary::get(const String& key, RefPtr<Uint8Array>& value) const
{
v8::Local<v8::Value> v8Value;

Powered by Google App Engine
This is Rietveld 408576698