Index: Source/core/html/HTMLTextFormControlElement.cpp |
diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp |
index cc43426ee4cd41bf8b8e2a13a5e6ab7f742d3832..d3d26151370b8d1ded176b162c2219d26754b51d 100644 |
--- a/Source/core/html/HTMLTextFormControlElement.cpp |
+++ b/Source/core/html/HTMLTextFormControlElement.cpp |
@@ -48,7 +48,6 @@ |
namespace WebCore { |
using namespace HTMLNames; |
-using namespace std; |
HTMLTextFormControlElement::HTMLTextFormControlElement(const QualifiedName& tagName, Document& doc, HTMLFormElement* form) |
: HTMLFormControlElementWithState(tagName, doc, form) |
@@ -164,12 +163,12 @@ void HTMLTextFormControlElement::updatePlaceholderVisibility(bool placeholderVal |
void HTMLTextFormControlElement::setSelectionStart(int start) |
{ |
- setSelectionRange(start, max(start, selectionEnd()), selectionDirection()); |
+ setSelectionRange(start, std::max(start, selectionEnd()), selectionDirection()); |
} |
void HTMLTextFormControlElement::setSelectionEnd(int end) |
{ |
- setSelectionRange(min(end, selectionStart()), end, selectionDirection()); |
+ setSelectionRange(std::min(end, selectionStart()), end, selectionDirection()); |
} |
void HTMLTextFormControlElement::setSelectionDirection(const String& direction) |
@@ -179,7 +178,7 @@ void HTMLTextFormControlElement::setSelectionDirection(const String& direction) |
void HTMLTextFormControlElement::select() |
{ |
- setSelectionRange(0, numeric_limits<int>::max(), SelectionHasNoDirection); |
+ setSelectionRange(0, std::numeric_limits<int>::max(), SelectionHasNoDirection); |
} |
bool HTMLTextFormControlElement::shouldDispatchFormControlChangeEvent(String& oldValue, String& newValue) |
@@ -283,8 +282,8 @@ void HTMLTextFormControlElement::setSelectionRange(int start, int end, TextField |
if (!renderer() || !renderer()->isTextControl()) |
return; |
- end = max(end, 0); |
- start = min(max(start, 0), end); |
+ end = std::max(end, 0); |
+ start = std::min(std::max(start, 0), end); |
if (!hasVisibleTextArea(renderer(), innerTextElement())) { |
cacheSelection(start, end, direction); |