| Index: third_party/WebKit/Source/platform/mojo/GeometryStructTraits.cpp
|
| diff --git a/third_party/WebKit/Source/platform/mojo/GeometryStructTraits.cpp b/third_party/WebKit/Source/platform/mojo/GeometryStructTraits.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..21de7c1032e9851dc6b9b8234a26ac75bd2f6c03
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/platform/mojo/GeometryStructTraits.cpp
|
| @@ -0,0 +1,20 @@
|
| +// 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/GeometryStructTraits.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
|
|
|