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 |
index fbc1a81eafdb8bbc25ca6ebea3089ba8d1967653..66ace43061edcaba9ce62ab959b3cad7a26999c6 100644 |
--- a/third_party/WebKit/Source/platform/mojo/GeometryStructTraits.cpp |
+++ b/third_party/WebKit/Source/platform/mojo/GeometryStructTraits.cpp |
@@ -19,6 +19,19 @@ bool StructTraits<gfx::mojom::RectFDataView, ::blink::WebFloatRect>::Read( |
return true; |
} |
+// static |
+bool StructTraits<gfx::mojom::RectDataView, ::blink::WebRect>::Read( |
+ gfx::mojom::RectDataView data, |
+ ::blink::WebRect* out) { |
+ if (data.width() < 0 || data.height() < 0) |
+ return false; |
+ out->x = data.x(); |
+ out->y = data.y(); |
+ out->width = data.width(); |
+ out->height = data.height(); |
+ return true; |
+} |
+ |
// static |
bool StructTraits<gfx::mojom::PointFDataView, ::blink::WebFloatPoint>::Read( |
gfx::mojom::PointFDataView data, |