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

Unified Diff: tools/dom/src/native_DOMImplementation.dart

Issue 13119007: Helper to support getContext options map analysis. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/native_DOMImplementation.dart
diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart
index b2d83d4b950e037c88ff0e3b22dba8bac8b1984c..3ef960a2ae570346ef041ed830065ef463a7d37a 100644
--- a/tools/dom/src/native_DOMImplementation.dart
+++ b/tools/dom/src/native_DOMImplementation.dart
@@ -31,6 +31,18 @@ class _Utils {
return result;
}
+ static int convertCanvasElementGetContextMap(Map map) {
+ int result = 0;
+ if (map['alpha'] == true) result |= 0x01;
+ if (map['depth'] == true) result |= 0x02;
+ if (map['stencil'] == true) result |= 0x4;
+ if (map['antialias'] == true) result |= 0x08;
+ if (map['premultipliedAlpha'] == true) result |= 0x10;
+ if (map['preserveDrawingBuffer'] == true) result |= 0x20;
+
+ return result;
+ }
+
static void populateMap(Map result, List list) {
for (int i = 0; i < list.length; i += 2) {
result[list[i]] = list[i + 1];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698