| Index: Source/web/WebLocalFrameImpl.cpp
|
| diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
|
| index 0f7d09def92a947eb0c685d170f8c73e68a76815..f90b6c4a7fb96da3c289ddbba405f0da10f30c13 100644
|
| --- a/Source/web/WebLocalFrameImpl.cpp
|
| +++ b/Source/web/WebLocalFrameImpl.cpp
|
| @@ -94,6 +94,7 @@
|
| #include "core/editing/InputMethodController.h"
|
| #include "core/editing/PlainTextRange.h"
|
| #include "core/editing/SpellChecker.h"
|
| +#include "core/editing/SurroundingText.h"
|
| #include "core/editing/TextAffinity.h"
|
| #include "core/editing/TextIterator.h"
|
| #include "core/editing/htmlediting.h"
|
| @@ -1300,6 +1301,16 @@ void WebLocalFrameImpl::setCaretVisible(bool visible)
|
| frame()->selection().setCaretVisible(visible);
|
| }
|
|
|
| +WebString WebLocalFrameImpl::textSurroundingSelection(int maxLength, int* startOffset, int* endOffset) const
|
| +{
|
| + ASSERT(maxLength > 0);
|
| +
|
| + SurroundingText surroundingText(frame()->selection().start(), frame()->selection().end(), maxLength);
|
| + *startOffset = surroundingText.startOffsetInContent();
|
| + *endOffset = surroundingText.endOffsetInContent();
|
| + return surroundingText.content();
|
| +}
|
| +
|
| VisiblePosition WebLocalFrameImpl::visiblePositionForWindowPoint(const WebPoint& point)
|
| {
|
| FloatPoint unscaledPoint(point);
|
|
|