Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1018)

Unified Diff: Source/core/html/HTMLTextFormControlElement.cpp

Issue 334593005: Removing using declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLSourceElement.cpp ('k') | Source/core/html/HTMLTrackElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « Source/core/html/HTMLSourceElement.cpp ('k') | Source/core/html/HTMLTrackElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698