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

Unified Diff: Source/platform/LengthFunctions.cpp

Issue 1188563005: Compute snap offsets (both repeat and element based) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clean up TODOs Created 5 years, 3 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: Source/platform/LengthFunctions.cpp
diff --git a/Source/platform/LengthFunctions.cpp b/Source/platform/LengthFunctions.cpp
index 5894d0bb406376173c56cdd6f0282e87501b1ea4..22d6c2f92bed55e901b87490ad7cbbf119eccc98 100644
--- a/Source/platform/LengthFunctions.cpp
+++ b/Source/platform/LengthFunctions.cpp
@@ -25,6 +25,7 @@
#include "platform/LengthFunctions.h"
#include "platform/LayoutUnit.h"
+#include "platform/LengthPoint.h"
#include "platform/LengthSize.h"
namespace blink {
@@ -129,4 +130,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
« Source/core/page/scrolling/SnapCoordinator.cpp ('K') | « Source/platform/LengthFunctions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698