void MultipleFieldsTemporalInputTypeView::showPickerIndicator() {
  if (m_pickerIndicatorIsVisible)
    return;
  m_pickerIndicatorIsVisible = true;
  DCHECK(pickerIndicatorElement());
  pickerIndicatorElement()->removeInlineStyleProperty(CSSPropertyDisplay);
}
void BaseMultipleFieldsDateAndTimeInputType::showPickerIndicator()
{
    if (m_pickerIndicatorIsVisible)
        return;
    m_pickerIndicatorIsVisible = true;
    ASSERT(pickerIndicatorElement());
    pickerIndicatorElement()->removeInlineStyleProperty(CSSPropertyDisplay);
}
void MultipleFieldsTemporalInputTypeView::hidePickerIndicator() {
  if (!m_pickerIndicatorIsVisible)
    return;
  m_pickerIndicatorIsVisible = false;
  DCHECK(pickerIndicatorElement());
  pickerIndicatorElement()->setInlineStyleProperty(CSSPropertyDisplay,
                                                   CSSValueNone);
}
void BaseMultipleFieldsDateAndTimeInputType::hidePickerIndicator()
{
    if (!m_pickerIndicatorIsVisible)
        return;
    m_pickerIndicatorIsVisible = false;
    ASSERT(pickerIndicatorElement());
    pickerIndicatorElement()->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone);
}
void BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent(KeyboardEvent* event)
{
    if (m_pickerIndicatorIsVisible
        && ((event->keyIdentifier() == "Down" && event->getModifierState("Alt")) || (RenderTheme::theme().shouldOpenPickerWithF4Key() && event->keyIdentifier() == "F4"))) {
        if (PickerIndicatorElement* element = pickerIndicatorElement())
            element->openPopup();
        event->setDefaultHandled();
    } else {
        forwardEvent(event);
    }
}
BaseMultipleFieldsDateAndTimeInputType::~BaseMultipleFieldsDateAndTimeInputType()
{
#if !ENABLE(OILPAN)
    if (SpinButtonElement* element = spinButtonElement())
        element->removeSpinButtonOwner();
    if (ClearButtonElement* element = clearButtonElement())
        element->removeClearButtonOwner();
    if (DateTimeEditElement* element = dateTimeEditElement())
        element->removeEditControlOwner();
    if (PickerIndicatorElement* element = pickerIndicatorElement())
        element->removePickerIndicatorOwner();
#endif
}
void MultipleFieldsTemporalInputTypeView::handleKeydownEvent(
    KeyboardEvent* event) {
  if (!element().isFocused())
    return;
  if (m_pickerIndicatorIsVisible &&
      ((event->key() == "ArrowDown" && event->getModifierState("Alt")) ||
       (LayoutTheme::theme().shouldOpenPickerWithF4Key() &&
        event->key() == "F4"))) {
    if (PickerIndicatorElement* element = pickerIndicatorElement())
      element->openPopup();
    event->setDefaultHandled();
  } else {
    forwardEvent(event);
  }
}
void MultipleFieldsTemporalInputTypeView::destroyShadowSubtree() {
  DCHECK(!m_isDestroyingShadowSubtree);
  m_isDestroyingShadowSubtree = true;
  if (SpinButtonElement* element = spinButtonElement())
    element->removeSpinButtonOwner();
  if (ClearButtonElement* element = clearButtonElement())
    element->removeClearButtonOwner();
  if (DateTimeEditElement* element = dateTimeEditElement())
    element->removeEditControlOwner();
  if (PickerIndicatorElement* element = pickerIndicatorElement())
    element->removePickerIndicatorOwner();

  // If a field element has focus, set focus back to the <input> itself before
  // deleting the field. This prevents unnecessary focusout/blur events.
  if (containsFocusedShadowElement())
    element().focus();

  InputTypeView::destroyShadowSubtree();
  m_isDestroyingShadowSubtree = false;
}
AXObject* MultipleFieldsTemporalInputTypeView::popupRootAXObject() {
  if (PickerIndicatorElement* picker = pickerIndicatorElement())
    return picker->popupRootAXObject();
  return nullptr;
}
void MultipleFieldsTemporalInputTypeView::closePopupView() {
  if (PickerIndicatorElement* picker = pickerIndicatorElement())
    picker->closePopup();
}
AXObject* BaseMultipleFieldsDateAndTimeInputType::popupRootAXObject()
{
    if (PickerIndicatorElement* picker = pickerIndicatorElement())
        return picker->popupRootAXObject();
    return nullptr;
}