Index: third_party/WebKit/Source/platform/mojo/WebGeometryStructTraits.cpp |
diff --git a/third_party/WebKit/Source/platform/mojo/WebGeometryStructTraits.cpp b/third_party/WebKit/Source/platform/mojo/WebGeometryStructTraits.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..876ec3f72c3a3917ae50ca6a6120f30882abb069 |
--- /dev/null |
+++ b/third_party/WebKit/Source/platform/mojo/WebGeometryStructTraits.cpp |
@@ -0,0 +1,19 @@ |
+// Copyright 2016 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 "platform/mojo/WebGeometryStructTraits.h" |
+ |
+namespace mojo { |
+ |
+// static |
+bool StructTraits<gfx::mojom::blink::Size::DataView, ::blink::WebSize>::Read( |
+ gfx::mojom::blink::Size::DataView data, |
+ ::blink::WebSize* out) { |
+ if (data.width() < 0 || data.height() < 0) |
+ return false; |
+ out->width = data.width(); |
+ out->height = data.height(); |
+ return true; |
+} |
+} // namespace mojo |