Chromium Code Reviews| Index: Source/core/html/forms/SearchInputType.cpp |
| diff --git a/Source/core/html/forms/SearchInputType.cpp b/Source/core/html/forms/SearchInputType.cpp |
| index 7bd41263b88cdd09654541190ed69b0238de3428..415513eb56c6f8d6ad59cd05695a4990c2ea0de5 100644 |
| --- a/Source/core/html/forms/SearchInputType.cpp |
| +++ b/Source/core/html/forms/SearchInputType.cpp |
| @@ -95,8 +95,14 @@ void SearchInputType::createShadowSubtree() |
| ASSERT(container); |
| ASSERT(viewPort); |
| - container->insertBefore(SearchFieldDecorationElement::create(element().document()), viewPort); |
| - container->insertBefore(SearchFieldCancelButtonElement::create(element().document()), viewPort->nextSibling()); |
| + AtomicString dirAttributeValue = element().fastGetAttribute(dirAttr); |
|
tkent
2013/10/28 10:17:09
This works only for <input type=search dir=rtl>, a
|
| + if (dirAttributeValue.isEmpty() || equalIgnoringCase(dirAttributeValue, "ltr")) { |
| + container->insertBefore(SearchFieldDecorationElement::create(element().document()), viewPort); |
| + container->insertBefore(SearchFieldCancelButtonElement::create(element().document()), viewPort->nextSibling()); |
| + } else { |
| + container->insertBefore(SearchFieldCancelButtonElement::create(element().document()), viewPort); |
| + container->insertBefore(SearchFieldDecorationElement::create(element().document()), viewPort->nextSibling()); |
| + } |
| } |
| void SearchInputType::handleKeydownEvent(KeyboardEvent* event) |