void PasswordInputType::createShadowSubtree() { BaseTextInputType::createShadowSubtree(); if (!isPasswordGenerationEnabled()) return; RefPtr<PasswordGeneratorButtonElement> generatorButton = PasswordGeneratorButtonElement::create(element().document()); if (!isPasswordGenerationDecorationEnabled()) generatorButton->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); containerElement()->appendChild(generatorButton.release()); }
void SearchInputType::createShadowSubtree() { TextFieldInputType::createShadowSubtree(); Element* container = containerElement(); Element* viewPort = element().userAgentShadowRoot()->getElementById( ShadowElementNames::editingViewPort()); DCHECK(container); DCHECK(viewPort); container->insertBefore( SearchFieldCancelButtonElement::create(element().document()), viewPort->nextSibling()); }
void SearchInputType::createShadowSubtree() { ASSERT(!m_resultsButton); ASSERT(!m_cancelButton); TextFieldInputType::createShadowSubtree(); HTMLElement* container = containerElement(); HTMLElement* textWrapper = innerBlockElement(); ASSERT(container); ASSERT(textWrapper); ExceptionCode ec = 0; m_resultsButton = SearchFieldResultsButtonElement::create(element()->document()); container->insertBefore(m_resultsButton, textWrapper, ec); m_cancelButton = SearchFieldCancelButtonElement::create(element()->document()); container->insertBefore(m_cancelButton, textWrapper->nextSibling(), ec); }