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

Unified Diff: Source/core/style/StyleScrollSnapData.cpp

Issue 1148873005: Parsing CSS properties for scroll snap points (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix comment Created 5 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/core/style/StyleScrollSnapData.h ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/style/StyleScrollSnapData.cpp
diff --git a/Source/platform/SecureTextInput.cpp b/Source/core/style/StyleScrollSnapData.cpp
similarity index 53%
copy from Source/platform/SecureTextInput.cpp
copy to Source/core/style/StyleScrollSnapData.cpp
index bf97c348ec7a90c9cad13feafb8447fb1ed50c02..e422e9242ca584d0c1d365d3d12f69cd30f2daae 100644
--- a/Source/platform/SecureTextInput.cpp
+++ b/Source/core/style/StyleScrollSnapData.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -24,28 +24,48 @@
*/
#include "config.h"
+#include "StyleScrollSnapData.h"
-#if OS(MACOSX)
-#include "platform/SecureTextInput.h"
-
-#import <Carbon/Carbon.h>
+#include "core/style/ComputedStyle.h"
namespace blink {
-void enableSecureTextInput()
+ScrollSnapPoints::ScrollSnapPoints()
+ : repeatOffset(100, Percent)
+ , hasRepeat(false)
+ , usesElements(false)
{
- if (IsSecureEventInputEnabled())
- return;
- EnableSecureEventInput();
}
-void disableSecureTextInput()
+bool operator==(const ScrollSnapPoints& a, const ScrollSnapPoints& b)
{
- if (!IsSecureEventInputEnabled())
- return;
- DisableSecureEventInput();
+ return a.repeatOffset == b.repeatOffset
+ && a.hasRepeat == b.hasRepeat
+ && a.usesElements == b.usesElements;
}
-} // namespace blink
+StyleScrollSnapData::StyleScrollSnapData()
+ : m_xPoints(ComputedStyle::initialScrollSnapPointsX())
+ , m_yPoints(ComputedStyle::initialScrollSnapPointsY())
+ , m_destination(ComputedStyle::initialScrollSnapDestination())
+ , m_coordinates(ComputedStyle::initialScrollSnapCoordinate())
+{
+}
-#endif // OS(MACOSX)
+StyleScrollSnapData::StyleScrollSnapData(const StyleScrollSnapData& other)
+ : m_xPoints(other.m_xPoints)
+ , m_yPoints(other.m_yPoints)
+ , m_destination(other.m_destination)
+ , m_coordinates(other.m_coordinates)
+{
+}
+
+bool operator==(const StyleScrollSnapData& a, const StyleScrollSnapData& b)
+{
+ return a.m_xPoints == b.m_xPoints
+ && a.m_yPoints == b.m_yPoints
+ && a.m_destination == b.m_destination
+ && a.m_coordinates == b.m_coordinates;
+}
+
+} // namespace blink
« no previous file with comments | « Source/core/style/StyleScrollSnapData.h ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698