| Index: Source/web/WebSurroundingText.cpp
|
| diff --git a/Source/web/WebSurroundingText.cpp b/Source/web/WebSurroundingText.cpp
|
| index 58383dcdf89ddcb3c6455ad813fe0d1384c26c1e..ce7c681cfc0ff1128e71a77ca15127311858de8b 100644
|
| --- a/Source/web/WebSurroundingText.cpp
|
| +++ b/Source/web/WebSurroundingText.cpp
|
| @@ -48,6 +48,12 @@ void WebSurroundingText::initialize(const WebNode& webNode, const WebPoint& node
|
| m_private.reset(new SurroundingText(VisiblePosition(node->renderer()->positionForPoint(static_cast<IntPoint>(nodePoint))).deepEquivalent().parentAnchoredEquivalent(), maxLength));
|
| }
|
|
|
| +void WebSurroundingText::initialize(const WebRange& webRange, size_t maxLength)
|
| +{
|
| + if (RefPtrWillBeRawPtr<Range> range = static_cast<PassRefPtrWillBeRawPtr<Range> >(webRange))
|
| + m_private.reset(new SurroundingText(*range, maxLength));
|
| +}
|
| +
|
| WebString WebSurroundingText::textContent() const
|
| {
|
| return m_private->content();
|
| @@ -59,6 +65,16 @@ size_t WebSurroundingText::hitOffsetInTextContent() const
|
| return m_private->startOffsetInContent();
|
| }
|
|
|
| +size_t WebSurroundingText::startOffsetInTextContent() const
|
| +{
|
| + return m_private->startOffsetInContent();
|
| +}
|
| +
|
| +size_t WebSurroundingText::endOffsetInTextContent() const
|
| +{
|
| + return m_private->endOffsetInContent();
|
| +}
|
| +
|
| WebRange WebSurroundingText::rangeFromContentOffsets(size_t startOffsetInContent, size_t endOffsetInContent)
|
| {
|
| return m_private->rangeFromContentOffsets(startOffsetInContent, endOffsetInContent);
|
|
|