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; |