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

Unified Diff: webkit/compositor_bindings/webcore_convert.cc

Issue 10915165: Don't depend on WEBKIT_IMPLEMENTATION guarded geometry conversion c'tors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add new files to gyp Created 8 years, 3 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 | « webkit/compositor_bindings/webcore_convert.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/compositor_bindings/webcore_convert.cc
diff --git a/webkit/compositor_bindings/webcore_convert.cc b/webkit/compositor_bindings/webcore_convert.cc
new file mode 100644
index 0000000000000000000000000000000000000000..15af89116d63cdbe30ce18e7e2a7f38a8afb4f3d
--- /dev/null
+++ b/webkit/compositor_bindings/webcore_convert.cc
@@ -0,0 +1,48 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+
+#include "webcore_convert.h"
+
+namespace WebKit {
+
+WebCore::FloatRect convert(const WebFloatRect& rect)
+{
+ return WebCore::FloatRect(rect.x, rect.y, rect.width, rect.height);
+}
+
+WebCore::FloatPoint convert(const WebFloatPoint& point)
+{
+ return WebCore::FloatPoint(point.x, point.y);
+}
+
+WebCore::IntRect convert(const WebRect& rect)
+{
+ return WebCore::IntRect(rect.x, rect.y, rect.width, rect.height);
+}
+
+WebCore::IntPoint convert(const WebPoint& point)
+{
+ return WebCore::IntPoint(point.x, point.y);
+}
+
+WebCore::IntSize convert(const WebSize& size)
+{
+ return WebCore::IntSize(size.width, size.height);
+}
+
+WebRect convert(const WebCore::IntRect& rect)
+{
+ return WebRect(rect.x(), rect.y(), rect.width(), rect.height());
+}
+
+WebSize convert(const WebCore::IntSize& size)
+{
+ return WebSize(size.width(), size.height());
+}
+
+}
+
+
« no previous file with comments | « webkit/compositor_bindings/webcore_convert.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698