Index: Source/core/html/forms/SearchInputType.cpp |
diff --git a/Source/core/html/forms/SearchInputType.cpp b/Source/core/html/forms/SearchInputType.cpp |
index a2bd867997807a442074f7b3701fc2f2207a3ca5..b8b56c40d28e3e2ea452e747d72432641aa2c5ca 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); |
+ 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) |