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

Unified Diff: third_party/WebKit/Source/core/style/ScrollSnapPoints.h

Issue 2913403002: Move ScrollSnapPoints to its own file. (Closed)
Patch Set: Rebase Created 3 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
Index: third_party/WebKit/Source/core/style/ScrollSnapPoints.h
diff --git a/third_party/WebKit/Source/core/style/ScrollSnapPoints.h b/third_party/WebKit/Source/core/style/ScrollSnapPoints.h
new file mode 100644
index 0000000000000000000000000000000000000000..473265b60494c6c62c302e845b74e13659b946e0
--- /dev/null
+++ b/third_party/WebKit/Source/core/style/ScrollSnapPoints.h
@@ -0,0 +1,35 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ScrollSnapPoints_h
+#define ScrollSnapPoints_h
+
+#include <memory>
+#include "platform/Length.h"
+
+namespace blink {
+
+struct ScrollSnapPoints {
+ DISALLOW_NEW();
+
+ ScrollSnapPoints()
+ : repeat_offset(100, kPercent), has_repeat(false), uses_elements(false) {}
+
+ bool operator==(const ScrollSnapPoints& other) const {
+ return repeat_offset == other.repeat_offset &&
+ has_repeat == other.has_repeat &&
+ uses_elements == other.uses_elements;
+ }
+ bool operator!=(const ScrollSnapPoints& other) const {
+ return !(*this == other);
+ }
+
+ Length repeat_offset;
+ bool has_repeat;
+ bool uses_elements;
+};
+
+} // namespace blink
+
+#endif // ScrollSnapPoints_h
« no previous file with comments | « third_party/WebKit/Source/core/style/BUILD.gn ('k') | third_party/WebKit/Source/core/style/StyleScrollSnapData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698