summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/StepRange.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/StepRange.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/html/StepRange.h')
-rw-r--r--Source/WebCore/html/StepRange.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/WebCore/html/StepRange.h b/Source/WebCore/html/StepRange.h
index 697a7b53d..84aa75a7f 100644
--- a/Source/WebCore/html/StepRange.h
+++ b/Source/WebCore/html/StepRange.h
@@ -18,8 +18,7 @@
*
*/
-#ifndef StepRange_h
-#define StepRange_h
+#pragma once
#include "Decimal.h"
#include <wtf/Forward.h>
@@ -27,10 +26,13 @@
namespace WebCore {
-class HTMLInputElement;
-
enum AnyStepHandling { RejectAny, AnyIsDefaultStep };
+enum class RangeLimitations {
+ Valid,
+ Invalid
+};
+
class StepRange {
public:
enum StepValueShouldBe {
@@ -71,11 +73,12 @@ public:
StepRange();
StepRange(const StepRange&);
- StepRange(const Decimal& stepBase, const Decimal& minimum, const Decimal& maximum, const Decimal& step, const StepDescription&);
+ StepRange(const Decimal& stepBase, RangeLimitations, const Decimal& minimum, const Decimal& maximum, const Decimal& step, const StepDescription&);
Decimal acceptableError() const;
Decimal alignValueForStep(const Decimal& currentValue, const Decimal& newValue) const;
Decimal clampValue(const Decimal& value) const;
bool hasStep() const { return m_hasStep; }
+ bool hasRangeLimitations() const { return m_hasRangeLimitations; }
Decimal maximum() const { return m_maximum; }
Decimal minimum() const { return m_minimum; }
static Decimal parseStep(AnyStepHandling, const StepDescription&, const String&);
@@ -114,9 +117,8 @@ private:
const Decimal m_step;
const Decimal m_stepBase;
const StepDescription m_stepDescription;
- const bool m_hasStep;
+ const bool m_hasRangeLimitations { false };
+ const bool m_hasStep { false };
};
-}
-
-#endif // StepRange_h
+} // namespace WebCore