input->setNeedsValidityCheck();
} else {
input->setValueInternal(newValue, DispatchNoEvent);
- input->setNeedsStyleRecalc();
+ input->setNeedsStyleRecalc(SubtreeStyleChange);
input->dispatchFormControlInputEvent();
+ input->dispatchFormControlChangeEvent();
}
input->notifyFormStateChanged();
input->updateClearButtonVisibility();
edit->stepUp();
}
-void BaseMultipleFieldsDateAndTimeInputType::spinButtonDidReleaseMouseCapture()
-{
- element().dispatchFormControlChangeEvent();
-}
-
bool BaseMultipleFieldsDateAndTimeInputType::isPickerIndicatorOwnerDisabledOrReadOnly() const
{
return element().isDisabledOrReadOnly();
unsigned end;
if (date.parseDate(value, 0, end) && end == value.length())
edit->setOnlyYearMonthDay(date);
- element().dispatchFormControlChangeEvent();
}
void BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue(double value)
ContainerNode* container = element().userAgentShadowRoot();
container->appendChild(DateTimeEditElement::create(document, *this));
- updateView();
+ element().updateView();
container->appendChild(ClearButtonElement::create(document, *this));
container->appendChild(SpinButtonElement::create(document, *this));
m_isDestroyingShadowSubtree = false;
}
-void BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent(Element* oldFocusedElement, FocusDirection direction)
+void BaseMultipleFieldsDateAndTimeInputType::handleFocusEvent(Element* oldFocusedElement, FocusType type)
{
DateTimeEditElement* edit = dateTimeEditElement();
if (!edit || m_isDestroyingShadowSubtree)
return;
- if (direction == FocusDirectionBackward) {
+ if (type == FocusTypeBackward) {
if (element().document().page())
- element().document().page()->focusController().advanceFocus(direction);
- } else if (direction == FocusDirectionNone || direction == FocusDirectionMouse || direction == FocusDirectionPage) {
+ element().document().page()->focusController().advanceFocus(type);
+ } else if (type == FocusTypeNone || type == FocusTypeMouse || type == FocusTypePage) {
edit->focusByOwner(oldFocusedElement);
} else {
edit->focusByOwner();
return element().computeInheritedLanguage();
}
-void BaseMultipleFieldsDateAndTimeInputType::editControlDidChangeValueByKeyboard()
-{
- element().dispatchFormControlChangeEvent();
-}
-
void BaseMultipleFieldsDateAndTimeInputType::minOrMaxAttributeChanged()
{
updateView();
InputType::setValue(sanitizedValue, valueChanged, eventBehavior);
DateTimeEditElement* edit = dateTimeEditElement();
if (valueChanged || (sanitizedValue.isEmpty() && edit && edit->anyEditableFieldsHaveValues())) {
- updateView();
+ element().updateView();
element().setNeedsValidityCheck();
}
}
showPickerIndicator();
return;
}
- if (RuntimeEnabledFeatures::dataListElementEnabled()) {
- if (element().hasValidDataListOptions())
- showPickerIndicator();
- else
- hidePickerIndicator();
- }
+ if (element().hasValidDataListOptions())
+ showPickerIndicator();
+ else
+ hidePickerIndicator();
}
void BaseMultipleFieldsDateAndTimeInputType::hidePickerIndicator()