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

Unified Diff: Source/core/html/canvas/Canvas2DContextAttributes.cpp

Issue 14298018: This CL implements the first draft of Canvas 2D Context Attributes, aka getContext('2d', { alpha: f… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased to ToT; test cleanup Created 7 years, 8 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/core/html/canvas/Canvas2DContextAttributes.cpp
diff --git a/Source/modules/quota/StorageQuota.cpp b/Source/core/html/canvas/Canvas2DContextAttributes.cpp
similarity index 73%
copy from Source/modules/quota/StorageQuota.cpp
copy to Source/core/html/canvas/Canvas2DContextAttributes.cpp
index f69d4835df2fc7be6a0f213e822421fa63f022c0..1e8c33e49aef09ca9d0924a254c5fcadf8f18820 100644
--- a/Source/modules/quota/StorageQuota.cpp
+++ b/Source/core/html/canvas/Canvas2DContextAttributes.cpp
@@ -1,19 +1,15 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (c) 2013, Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
- *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -30,17 +26,32 @@
#include "config.h"
-#include "modules/quota/StorageQuota.h"
+#include "Canvas2DContextAttributes.h"
namespace WebCore {
-StorageQuota::StorageQuota(Type type)
- : m_type(type)
+Canvas2DContextAttributes::Canvas2DContextAttributes()
+ : m_alpha(true)
+{
+}
+
+Canvas2DContextAttributes::~Canvas2DContextAttributes()
+{
+}
+
+PassRefPtr<Canvas2DContextAttributes> Canvas2DContextAttributes::create()
+{
+ return adoptRef(new Canvas2DContextAttributes());
+}
+
+bool Canvas2DContextAttributes::alpha() const
{
+ return m_alpha;
}
-StorageQuota::~StorageQuota()
+void Canvas2DContextAttributes::setAlpha(bool alpha)
{
+ m_alpha = alpha;
}
} // namespace WebCore
« no previous file with comments | « Source/core/html/canvas/Canvas2DContextAttributes.h ('k') | Source/core/html/canvas/Canvas2DContextAttributes.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698