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

Unified Diff: third_party/WebKit/Source/core/html/forms/StepRange.h

Issue 2033323002: :in-range and :out-of-range CSS selectors should check 'have range limitations.' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/html/forms/StepRange.h
diff --git a/third_party/WebKit/Source/core/html/forms/StepRange.h b/third_party/WebKit/Source/core/html/forms/StepRange.h
index fba22a07d56b1f0169e611ed3bbb1346309db1ad..0111651a90e969f464e05afb6a5766bf5eb95088 100644
--- a/third_party/WebKit/Source/core/html/forms/StepRange.h
+++ b/third_party/WebKit/Source/core/html/forms/StepRange.h
@@ -71,12 +71,15 @@ public:
StepRange();
StepRange(const StepRange&);
- StepRange(const Decimal& stepBase, const Decimal& minimum, const Decimal& maximum, const Decimal& step, const StepDescription&);
+ StepRange(const Decimal& stepBase, const Decimal& minimum, const Decimal& maximum, bool hasRangeLimitations, const Decimal& step, const StepDescription&);
+
Decimal alignValueForStep(const Decimal& currentValue, const Decimal& newValue) const;
Decimal clampValue(const Decimal& value) const;
bool hasStep() const { return m_hasStep; }
Decimal maximum() const { return m_maximum; }
Decimal minimum() const { return m_minimum; }
+ // https://html.spec.whatwg.org/multipage/forms.html#have-range-limitations
+ bool hasRangeLimitations() const { return m_hasRangeLimitations; }
static Decimal parseStep(AnyStepHandling, const StepDescription&, const String&);
Decimal step() const { return m_step; }
Decimal stepBase() const { return m_stepBase; }
@@ -114,6 +117,7 @@ private:
const Decimal m_stepBase;
const StepDescription m_stepDescription;
const bool m_hasStep;
+ const bool m_hasRangeLimitations;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/html/forms/RangeInputType.cpp ('k') | third_party/WebKit/Source/core/html/forms/StepRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698