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

Unified Diff: third_party/WebKit/Source/platform/mojo/GeometryStructTraits.cpp

Issue 2943983003: chrome/blink: Add functionality for in-product help for media elements. (Closed)
Patch Set: .. Created 3 years, 4 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: 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,

Powered by Google App Engine
This is Rietveld 408576698