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 BaseMultipleFieldsDateAndTimeInputType::updateClearButtonVisibility()
{
    ClearButtonElement* clearButton = clearButtonElement();
    if (!clearButton)
        return;

    if (element().isRequired() || !dateTimeEditElement()->anyEditableFieldsHaveValues()) {
        clearButton->setInlineStyleProperty(CSSPropertyOpacity, 0.0, CSSPrimitiveValue::CSS_NUMBER);
        clearButton->setInlineStyleProperty(CSSPropertyPointerEvents, CSSValueNone);
    } else {
        clearButton->removeInlineStyleProperty(CSSPropertyOpacity);
        clearButton->removeInlineStyleProperty(CSSPropertyPointerEvents);
    }
}
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;
}