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

Unified Diff: public/platform/WebDoublePoint.h

Issue 629583002: Make compositor and blink talk in fractional scroll offset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 | « Source/web/tests/ScrollingCoordinatorChromiumTest.cpp ('k') | public/platform/WebLayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebDoublePoint.h
diff --git a/public/platform/WebDoublePoint.h b/public/platform/WebDoublePoint.h
index 8a98799136f655e3a7f8c44d3865be06dfc83581..d666e13379a0d23e55f6525c7c49c6c271ace9f8 100644
--- a/public/platform/WebDoublePoint.h
+++ b/public/platform/WebDoublePoint.h
@@ -31,6 +31,12 @@
#ifndef WebDoublePoint_h
#define WebDoublePoint_h
+#include "WebCommon.h"
+
+#if INSIDE_BLINK
+#include "platform/geometry/DoublePoint.h"
+#endif
+
namespace blink {
struct WebDoublePoint {
@@ -48,6 +54,20 @@ struct WebDoublePoint {
, y(y)
{
}
+
+#if INSIDE_BLINK
+ WebDoublePoint(const DoublePoint& p)
+ : x(p.x())
+ , y(p.y())
+ {
+ }
+
+ operator DoublePoint() const
+ {
+ return DoublePoint(x, y);
+ }
+#endif
+
};
inline bool operator==(const WebDoublePoint& a, const WebDoublePoint& b)
« no previous file with comments | « Source/web/tests/ScrollingCoordinatorChromiumTest.cpp ('k') | public/platform/WebLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698