StepRange RangeInputType::createStepRange(AnyStepHandling anyStepHandling) const { DEPRECATED_DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (rangeDefaultStep, rangeDefaultStepBase, rangeStepScaleFactor)); const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), rangeDefaultMinimum); const Decimal maximum = ensureMaximum(parseToNumber(element().fastGetAttribute(maxAttr), rangeDefaultMaximum), minimum, rangeDefaultMaximum); const AtomicString& precisionValue = element().fastGetAttribute(precisionAttr); if (!precisionValue.isNull()) { const Decimal step = equalIgnoringCase(precisionValue, "float") ? Decimal::nan() : 1; return StepRange(minimum, minimum, maximum, step, stepDescription); } const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr)); return StepRange(minimum, minimum, maximum, step, stepDescription); }
StepRange InputType::createStepRange(AnyStepHandling anyStepHandling, const Decimal& stepBaseDefault, const Decimal& minimumDefault, const Decimal& maximumDefault, const StepRange::StepDescription& stepDescription) const { const Decimal stepBase = findStepBase(stepBaseDefault); const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), minimumDefault); const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), maximumDefault); const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr)); return StepRange(stepBase, minimum, maximum, step, stepDescription); }
StepRange DateTimeLocalInputType::createStepRange(AnyStepHandling anyStepHandling) const { DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (dateTimeLocalDefaultStep, dateTimeLocalDefaultStepBase, dateTimeLocalStepScaleFactor, StepRange::ScaledStepValueShouldBeInteger)); const Decimal stepBase = parseToNumber(element()->fastGetAttribute(minAttr), 0); const Decimal minimum = parseToNumber(element()->fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumDateTime())); const Decimal maximum = parseToNumber(element()->fastGetAttribute(maxAttr), Decimal::fromDouble(DateComponents::maximumDateTime())); const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element()->fastGetAttribute(stepAttr)); return StepRange(stepBase, minimum, maximum, step, stepDescription); }
HRESULT CordbStepper::Step(BOOL bStepIn) { if (m_thread == NULL) return CORDBG_E_PROCESS_TERMINATED; CORDBSyncFromWin32StopIfNecessary(GetProcess()); CORDBRequireProcessStateOKAndSync(GetProcess(), GetAppDomain()); return StepRange(bStepIn, NULL, 0); }
StepRange WeekInputType::createStepRange(AnyStepHandling anyStepHandling) const { DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (weekDefaultStep, weekDefaultStepBase, weekStepScaleFactor, StepRange::ParsedStepValueShouldBeInteger)); const Decimal stepBase = findStepBase(weekDefaultStepBase); const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), Decimal::fromDouble(DateComponents::minimumWeek())); const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), Decimal::fromDouble(DateComponents::maximumWeek())); const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr)); return StepRange(stepBase, minimum, maximum, step, stepDescription); }
StepRange NumberInputType::createStepRange(AnyStepHandling anyStepHandling) const { DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (numberDefaultStep, numberDefaultStepBase, numberStepScaleFactor)); const Decimal stepBase = parseToDecimalForNumberType(element()->fastGetAttribute(minAttr), numberDefaultStepBase); // FIXME: We should use numeric_limits<double>::max for number input type. const Decimal floatMax = Decimal::fromDouble(numeric_limits<float>::max()); const Decimal minimum = parseToNumber(element()->fastGetAttribute(minAttr), -floatMax); const Decimal maximum = parseToNumber(element()->fastGetAttribute(maxAttr), floatMax); const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element()->fastGetAttribute(stepAttr)); return StepRange(stepBase, minimum, maximum, step, stepDescription); }
StepRange NumberInputType::createStepRange(AnyStepHandling anyStepHandling) const { DEFINE_STATIC_LOCAL(const StepRange::StepDescription, stepDescription, (numberDefaultStep, numberDefaultStepBase, numberStepScaleFactor)); unsigned stepBaseDecimalPlaces; double stepBaseValue = parseToNumberWithDecimalPlaces(element()->fastGetAttribute(minAttr), numberDefaultStepBase, &stepBaseDecimalPlaces); StepRange::NumberWithDecimalPlaces stepBase(stepBaseValue, min(stepBaseDecimalPlaces, 16u)); double minimum = parseToNumber(element()->fastGetAttribute(minAttr), -numeric_limits<float>::max()); double maximum = parseToNumber(element()->fastGetAttribute(maxAttr), numeric_limits<float>::max()); StepRange::NumberWithDecimalPlacesOrMissing step = StepRange::parseStep(anyStepHandling, stepDescription, element()->fastGetAttribute(stepAttr)); return StepRange(stepBase, minimum, maximum, step, stepDescription); }
StepRange InputType::createStepRange(AnyStepHandling anyStepHandling, const Decimal& stepBaseDefault, const Decimal& minimumDefault, const Decimal& maximumDefault, const StepRange::StepDescription& stepDescription) const { bool hasRangeLimitations = false; const Decimal stepBase = findStepBase(stepBaseDefault); Decimal minimum = parseToNumberOrNaN(element().fastGetAttribute(minAttr)); if (minimum.isFinite()) hasRangeLimitations = true; else minimum = minimumDefault; Decimal maximum = parseToNumberOrNaN(element().fastGetAttribute(maxAttr)); if (maximum.isFinite()) hasRangeLimitations = true; else maximum = maximumDefault; const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr)); return StepRange(stepBase, minimum, maximum, hasRangeLimitations, step, stepDescription); }
StepRange RangeInputType::createStepRange( AnyStepHandling anyStepHandling) const { DEFINE_STATIC_LOCAL( const StepRange::StepDescription, stepDescription, (rangeDefaultStep, rangeDefaultStepBase, rangeStepScaleFactor)); const Decimal stepBase = findStepBase(rangeDefaultStepBase); const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), rangeDefaultMinimum); const Decimal maximum = ensureMaximum( parseToNumber(element().fastGetAttribute(maxAttr), rangeDefaultMaximum), minimum, rangeDefaultMaximum); const Decimal step = StepRange::parseStep( anyStepHandling, stepDescription, element().fastGetAttribute(stepAttr)); // 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); }
StepRange InputType::createStepRange(AnyStepHandling) const { ASSERT_NOT_REACHED(); return StepRange(); }