Index: Source/WebKit2/WebProcess/WebPage/WebPage.cpp |
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp |
index 036f6d1b9314e66da6ac3d0227c0c7e5a3dd4836..43a78e3df63cbc7db7b8fb1e12bb5224517c5651 100644 |
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp |
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp |
@@ -803,35 +803,6 @@ WebContextMenu* WebPage::contextMenu() |
return m_contextMenu.get(); |
} |
-void WebPage::getLocationAndLengthFromRange(Range* range, uint64_t& location, uint64_t& length) |
-{ |
- location = notFound; |
- length = 0; |
- |
- if (!range || !range->startContainer()) |
- return; |
- |
- Element* selectionRoot = range->ownerDocument()->frame()->selection()->rootEditableElement(); |
- Element* scope = selectionRoot ? selectionRoot : range->ownerDocument()->documentElement(); |
- |
- // Mouse events may cause TSM to attempt to create an NSRange for a portion of the view |
- // that is not inside the current editable region. These checks ensure we don't produce |
- // potentially invalid data when responding to such requests. |
- if (range->startContainer() != scope && !range->startContainer()->isDescendantOf(scope)) |
- return; |
- if (range->endContainer() != scope && !range->endContainer()->isDescendantOf(scope)) |
- return; |
- |
- RefPtr<Range> testRange = Range::create(scope->document(), scope, 0, range->startContainer(), range->startOffset()); |
- ASSERT(testRange->startContainer() == scope); |
- location = TextIterator::rangeLength(testRange.get()); |
- |
- ExceptionCode ec; |
- testRange->setEnd(range->endContainer(), range->endOffset(), ec); |
- ASSERT(testRange->startContainer() == scope); |
- length = TextIterator::rangeLength(testRange.get()) - location; |
-} |
- |
// Events |
static const WebEvent* g_currentEvent = 0; |