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

Unified Diff: third_party/WebKit/Source/platform/LengthFunctions.cpp

Issue 1970563002: Compute snap offsets according to CSS Scroll Snap Spec Level 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « third_party/WebKit/Source/platform/LengthFunctions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/LengthFunctions.cpp
diff --git a/third_party/WebKit/Source/platform/LengthFunctions.cpp b/third_party/WebKit/Source/platform/LengthFunctions.cpp
index 8b4a68f0ced5e7da63cb9d207bdb9b31c1a35d65..0c5dcaa03cdadc347027c7c8073f001fc8928037 100644
--- a/third_party/WebKit/Source/platform/LengthFunctions.cpp
+++ b/third_party/WebKit/Source/platform/LengthFunctions.cpp
@@ -24,6 +24,7 @@
#include "platform/LengthFunctions.h"
#include "platform/LayoutUnit.h"
+#include "platform/LengthPoint.h"
#include "platform/LengthSize.h"
namespace blink {
@@ -122,4 +123,9 @@ FloatSize floatSizeForLengthSize(const LengthSize& lengthSize, const FloatSize&
return FloatSize(floatValueForLength(lengthSize.width(), boxSize.width()), floatValueForLength(lengthSize.height(), boxSize.height()));
}
+FloatPoint floatPointForLengthPoint(const LengthPoint& LengthPoint, const FloatSize& boxSize)
+{
+ return FloatPoint(floatValueForLength(LengthPoint.x(), boxSize.width()), floatValueForLength(LengthPoint.y(), boxSize.height()));
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/LengthFunctions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698