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

Unified Diff: Source/platform/geometry/FloatSize.h

Issue 298133003: Expose fractional TouchEvent coordinates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make layout test output stable across platforms Created 6 years, 6 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/platform/geometry/FloatPoint.h ('k') | Source/platform/scroll/ScrollView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/geometry/FloatSize.h
diff --git a/Source/platform/geometry/FloatSize.h b/Source/platform/geometry/FloatSize.h
index fc14bfdac89f7714bb2114149e3825b3d3722246..da6fc8d1c450bb55b48b86de4b1c52632ae8b950 100644
--- a/Source/platform/geometry/FloatSize.h
+++ b/Source/platform/geometry/FloatSize.h
@@ -102,6 +102,16 @@ public:
return FloatSize(m_height, m_width);
}
+ FloatSize scaledBy(float scale) const
+ {
+ return scaledBy(scale, scale);
+ }
+
+ FloatSize scaledBy(float scaleX, float scaleY) const
+ {
+ return FloatSize(m_width * scaleX, m_height * scaleY);
+ }
+
#if OS(MACOSX)
explicit FloatSize(const CGSize&); // don't do this implicitly since it's lossy
operator CGSize() const;
« no previous file with comments | « Source/platform/geometry/FloatPoint.h ('k') | Source/platform/scroll/ScrollView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698