@@ -337,10 +337,7 @@ void TextFieldInputType::createShadowSubtreeAndUpdateInnerTextElementEditability
337337 m_innerText = TextControlInnerTextElement::create (document, isInnerTextElementEditable);
338338
339339 if (!createsContainer) {
340- if (source == ContainerNode::ChildChange::Source::Parser)
341- element ()->userAgentShadowRoot ()->parserAppendChild (*m_innerText);
342- else
343- element ()->userAgentShadowRoot ()->appendChild (*m_innerText);
340+ element ()->userAgentShadowRoot ()->appendChild (source, *m_innerText);
344341 updatePlaceholderText ();
345342 return ;
346343 }
@@ -350,10 +347,7 @@ void TextFieldInputType::createShadowSubtreeAndUpdateInnerTextElementEditability
350347
351348 if (shouldHaveSpinButton) {
352349 m_innerSpinButton = SpinButtonElement::create (document, *this );
353- if (source == ContainerNode::ChildChange::Source::Parser)
354- m_container->parserAppendChild (*m_innerSpinButton);
355- else
356- m_container->appendChild (*m_innerSpinButton);
350+ m_container->appendChild (source, *m_innerSpinButton);
357351 }
358352
359353 if (shouldHaveCapsLockIndicator) {
@@ -364,10 +358,7 @@ void TextFieldInputType::createShadowSubtreeAndUpdateInnerTextElementEditability
364358 bool shouldDrawCapsLockIndicator = this ->shouldDrawCapsLockIndicator ();
365359 m_capsLockIndicator->setInlineStyleProperty (CSSPropertyDisplay, shouldDrawCapsLockIndicator ? CSSValueBlock : CSSValueNone, true );
366360
367- if (source == ContainerNode::ChildChange::Source::Parser)
368- m_container->parserAppendChild (*m_capsLockIndicator);
369- else
370- m_container->appendChild (*m_capsLockIndicator);
361+ m_container->appendChild (source, *m_capsLockIndicator);
371362 }
372363 updateAutoFillButton ();
373364}
0 commit comments