return false;
}
+bool InputType::tooShort(const String&, HTMLTextFormControlElement::NeedsToCheckDirtyFlag) const
+{
+ return false;
+}
+
bool InputType::patternMismatch(const String&) const
{
return false;
if (element().tooLong())
return locale().validationMessageTooLongText(value.length(), element().maxLength());
+ if (element().tooShort())
+ return locale().validationMessageTooShortText(value.length(), element().minLength());
+
if (!isSteppable())
return emptyString();
{
if (FrameHost* host = element().document().frameHost())
return &host->chrome();
- return 0;
+ return nullptr;
}
Locale& InputType::locale() const
FileList* InputType::files()
{
- return 0;
+ return nullptr;
}
-void InputType::setFiles(PassRefPtrWillBeRawPtr<FileList>)
+void InputType::setFiles(FileList*)
{
}
void InputType::setValue(const String& sanitizedValue, bool valueChanged, TextFieldEventBehavior eventBehavior)
{
element().setValueInternal(sanitizedValue, eventBehavior);
- element().setNeedsStyleRecalc(SubtreeStyleChange);
+ element().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::ControlValue));
if (!valueChanged)
return;
switch (eventBehavior) {
return HTMLInputElement::maximumLength;
}
+int InputType::minLength() const
+{
+ return 0;
+}
+
bool InputType::supportsPlaceholder() const
{
return false;
ColorChooserClient* InputType::colorChooserClient()
{
- return 0;
+ return nullptr;
}
void InputType::applyStep(const Decimal& current, int count, AnyStepHandling anyStepHandling, TextFieldEventBehavior eventBehavior, ExceptionState& exceptionState)
if (count < 0)
newValue = base + ((current - base) / step).floor() * step;
else if (count > 0)
- newValue = base + ((current - base) / step).ceiling() * step;
+ newValue = base + ((current - base) / step).ceil() * step;
else
newValue = current;
setValueAsDecimal(newValue, eventBehavior, exceptionState);
}
if (AXObjectCache* cache = element().document().existingAXObjectCache())
- cache->postNotification(&element(), AXObjectCache::AXValueChanged, true);
+ cache->handleValueChanged(&element());
}
bool InputType::getAllowedValueStep(Decimal* step) const