Title: [132683] trunk/Source/Platform
- Revision
- 132683
- Author
- dan...@chromium.org
- Date
- 2012-10-26 12:15:39 -0700 (Fri, 26 Oct 2012)
Log Message
[chromium] Add implicit conversions between WebFloatPoint and gfx::PointF
https://bugs.webkit.org/show_bug.cgi?id=100435
Reviewed by James Robinson.
This is similar to other Web geometry types, but the WebFloatPoint is
missing it.
* chromium/public/WebFloatPoint.h:
(WebFloatPoint):
(WebKit::WebFloatPoint::WebFloatPoint):
(WebKit::WebFloatPoint::operator=):
(WebKit::WebFloatPoint::operator gfx::PointF):
Modified Paths
Diff
Modified: trunk/Source/Platform/ChangeLog (132682 => 132683)
--- trunk/Source/Platform/ChangeLog 2012-10-26 19:06:00 UTC (rev 132682)
+++ trunk/Source/Platform/ChangeLog 2012-10-26 19:15:39 UTC (rev 132683)
@@ -1,3 +1,19 @@
+2012-10-26 Dana Jansens <dan...@chromium.org>
+
+ [chromium] Add implicit conversions between WebFloatPoint and gfx::PointF
+ https://bugs.webkit.org/show_bug.cgi?id=100435
+
+ Reviewed by James Robinson.
+
+ This is similar to other Web geometry types, but the WebFloatPoint is
+ missing it.
+
+ * chromium/public/WebFloatPoint.h:
+ (WebFloatPoint):
+ (WebKit::WebFloatPoint::WebFloatPoint):
+ (WebKit::WebFloatPoint::operator=):
+ (WebKit::WebFloatPoint::operator gfx::PointF):
+
2012-10-25 Jonathan Backer <bac...@chromium.org>
CHROMIUM: Add a method to WebLayerTreeView API
Modified: trunk/Source/Platform/chromium/public/WebFloatPoint.h (132682 => 132683)
--- trunk/Source/Platform/chromium/public/WebFloatPoint.h 2012-10-26 19:06:00 UTC (rev 132682)
+++ trunk/Source/Platform/chromium/public/WebFloatPoint.h 2012-10-26 19:15:39 UTC (rev 132683)
@@ -35,6 +35,8 @@
#if WEBKIT_IMPLEMENTATION
#include "FloatPoint.h"
+#else
+#include <ui/gfx/point_f.h>
#endif
namespace WebKit {
@@ -73,6 +75,25 @@
{
return WebCore::FloatPoint(x, y);
}
+#else
+ WebFloatPoint(const gfx::PointF& p)
+ : x(p.x())
+ , y(p.y())
+ {
+ }
+
+ WebFloatPoint& operator=(const gfx::PointF& p)
+ {
+ x = p.x();
+ y = p.y();
+ return *this;
+ }
+
+ operator gfx::PointF() const
+ {
+ return gfx::PointF(x, y);
+ }
+
#endif
};
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes