void BaseChooserOnlyDateAndTimeInputType::updateAppearance() { Node* node = element().userAgentShadowRoot()->firstChild(); if (!node || !node->isHTMLElement()) return; String displayValue = visibleValue(); if (displayValue.isEmpty()) { // Need to put something to keep text baseline. displayValue = " "; } toHTMLElement(node)->setInnerText(displayValue, ASSERT_NO_EXCEPTION); }
void BaseChooserOnlyDateAndTimeInputType::updateView() { Node* node = element().userAgentShadowRoot()->firstChild(); if (!node || !node->isHTMLElement()) return; String displayValue; if (!element().suggestedValue().isNull()) displayValue = element().suggestedValue(); else displayValue = visibleValue(); if (displayValue.isEmpty()) { // Need to put something to keep text baseline. displayValue = " "; } toHTMLElement(node)->setTextContent(displayValue); }