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

Unified Diff: third_party/WebKit/Source/core/html/forms/RangeInputType.cpp

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/RangeInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp b/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp
index 6a324d8ce8f8f922a91d32059968e2bf03ff9f5e..ca18f3aa53a0ef9bd8806f4848f74123d0af9ce2 100644
--- a/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp
@@ -140,7 +140,11 @@ StepRange RangeInputType::createStepRange(AnyStepHandling anyStepHandling) const
const Decimal maximum = ensureMaximum(parseToNumber(element().fastGetAttribute(maxAttr), rangeDefaultMaximum), minimum, rangeDefaultMaximum);
const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr));
- return StepRange(stepBase, minimum, maximum, step, stepDescription);
+ // Range type always has range limitations because it has default
+ // minimum/maximum.
+ // https://html.spec.whatwg.org/multipage/forms.html#range-state-(type=range):concept-input-min-default
+ const bool hasRangeLimitations = true;
+ return StepRange(stepBase, minimum, maximum, hasRangeLimitations, step, stepDescription);
}
bool RangeInputType::isSteppable() const
« no previous file with comments | « third_party/WebKit/Source/core/html/forms/InputType.cpp ('k') | third_party/WebKit/Source/core/html/forms/StepRange.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698