Index: Source/core/dom/Range.cpp |
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp |
index 344fc42d6970d9be55a7631bed5187c8f9164b97..31f24a347f3000d21e7b7235a16e73d1a731d726 100644 |
--- a/Source/core/dom/Range.cpp |
+++ b/Source/core/dom/Range.cpp |
@@ -53,6 +53,7 @@ |
namespace WebCore { |
+using namespace std; |
using namespace HTMLNames; |
DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, rangeCounter, ("Range")); |
@@ -934,8 +935,8 @@ |
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()) ? 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; |
+ 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; |
builder.append(data, start, end - start); |
} |
} |
@@ -1339,7 +1340,7 @@ |
continue; |
RenderText* renderText = toRenderText(r); |
int startOffset = node == startContainer ? m_start.offset() : 0; |
- int endOffset = node == endContainer ? m_end.offset() : std::numeric_limits<int>::max(); |
+ int endOffset = node == endContainer ? m_end.offset() : numeric_limits<int>::max(); |
bool isFixed = false; |
renderText->absoluteRectsForRange(rects, startOffset, endOffset, useSelectionHeight, &isFixed); |
allFixed &= isFixed; |
@@ -1367,7 +1368,7 @@ |
continue; |
RenderText* renderText = toRenderText(r); |
int startOffset = node == startContainer ? m_start.offset() : 0; |
- int endOffset = node == endContainer ? m_end.offset() : std::numeric_limits<int>::max(); |
+ int endOffset = node == endContainer ? m_end.offset() : numeric_limits<int>::max(); |
bool isFixed = false; |
renderText->absoluteQuadsForRange(quads, startOffset, endOffset, useSelectionHeight, &isFixed); |
allFixed &= isFixed; |