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

Unified Diff: Source/core/dom/Range.cpp

Issue 329183002: Removing "using" declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed Trybot Errors 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/dom/Node.cpp ('k') | Source/core/dom/Text.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Range.cpp
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp
index 31f24a347f3000d21e7b7235a16e73d1a731d726..344fc42d6970d9be55a7631bed5187c8f9164b97 100644
--- a/Source/core/dom/Range.cpp
+++ b/Source/core/dom/Range.cpp
@@ -53,7 +53,6 @@
namespace WebCore {
-using namespace std;
using namespace HTMLNames;
DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, rangeCounter, ("Range"));
@@ -935,8 +934,8 @@ String Range::toString() const
if (type == Node::TEXT_NODE || type == Node::CDATA_SECTION_NODE) {
String data = toCharacterData(n)->data();
int length = data.length();
- int start = (n == m_start.container()) ? min(max(0, m_start.offset()), length) : 0;
- int end = (n == m_end.container()) ? min(max(start, m_end.offset()), length) : length;
+ int start = (n == m_start.container()) ? std::min(std::max(0, m_start.offset()), length) : 0;
+ int end = (n == m_end.container()) ? std::min(std::max(start, m_end.offset()), length) : length;
builder.append(data, start, end - start);
}
}
@@ -1340,7 +1339,7 @@ void Range::textRects(Vector<IntRect>& rects, bool useSelectionHeight, RangeInFi
continue;
RenderText* renderText = toRenderText(r);
int startOffset = node == startContainer ? m_start.offset() : 0;
- int endOffset = node == endContainer ? m_end.offset() : numeric_limits<int>::max();
+ int endOffset = node == endContainer ? m_end.offset() : std::numeric_limits<int>::max();
bool isFixed = false;
renderText->absoluteRectsForRange(rects, startOffset, endOffset, useSelectionHeight, &isFixed);
allFixed &= isFixed;
@@ -1368,7 +1367,7 @@ void Range::textQuads(Vector<FloatQuad>& quads, bool useSelectionHeight, RangeIn
continue;
RenderText* renderText = toRenderText(r);
int startOffset = node == startContainer ? m_start.offset() : 0;
- int endOffset = node == endContainer ? m_end.offset() : numeric_limits<int>::max();
+ int endOffset = node == endContainer ? m_end.offset() : std::numeric_limits<int>::max();
bool isFixed = false;
renderText->absoluteQuadsForRange(quads, startOffset, endOffset, useSelectionHeight, &isFixed);
allFixed &= isFixed;
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/dom/Text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698