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

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

Issue 354333002: Add path option(path2d) for hit regions on canvas2d. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: nit and rebase Created 6 years, 5 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/core/v8/Dictionary.h ('k') | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/Dictionary.cpp
diff --git a/Source/bindings/core/v8/Dictionary.cpp b/Source/bindings/core/v8/Dictionary.cpp
index 7c90bda1299fde42c601f579974a43a08d6a496b..7a8266a9e6fb1af2a43735e3ddf78adf9795e6b0 100644
--- a/Source/bindings/core/v8/Dictionary.cpp
+++ b/Source/bindings/core/v8/Dictionary.cpp
@@ -35,6 +35,7 @@
#include "bindings/core/v8/V8EventTarget.h"
#include "bindings/core/v8/V8MediaKeyError.h"
#include "bindings/core/v8/V8MessagePort.h"
+#include "bindings/core/v8/V8Path2D.h"
#include "bindings/core/v8/V8Storage.h"
#include "bindings/core/v8/V8TextTrack.h"
#include "bindings/core/v8/V8VoidCallback.h"
@@ -429,6 +430,16 @@ bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtrWillBeMemb
return true;
}
+bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtr<Path2D>& value) const
+{
+ v8::Local<v8::Value> v8Value;
+ if (!getKey(key, v8Value) || WebCore::isUndefinedOrNull(v8Value))
+ return false;
+
+ value = V8Path2D::toNativeWithTypeCheck(m_isolate, v8Value);
+ return true;
+}
+
bool Dictionary::get(const String& key, RefPtr<Uint8Array>& value) const
{
v8::Local<v8::Value> v8Value;
« no previous file with comments | « Source/bindings/core/v8/Dictionary.h ('k') | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698