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());
}
예제 #2
0
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());
}
예제 #3
0
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);
}