Chromium Code Reviews| Index: Source/core/style/StyleScrollSnapData.cpp |
| diff --git a/Source/platform/SecureTextInput.cpp b/Source/core/style/StyleScrollSnapData.cpp |
| similarity index 52% |
| copy from Source/platform/SecureTextInput.cpp |
| copy to Source/core/style/StyleScrollSnapData.cpp |
| index bf97c348ec7a90c9cad13feafb8447fb1ed50c02..db42257f3766daece2164039a2719e940e8ca78c 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,49 @@ |
| */ |
| #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) |
| + : RefCounted<StyleScrollSnapData>() |
|
Timothy Loh
2015/06/04 03:58:27
don't need to explicitly call this
majidvp
2015/06/04 22:41:40
Done.
|
| + , 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 |