diff options
Diffstat (limited to 'Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp')
-rw-r--r-- | Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp index ab9fb1382..00dc0c488 100644 --- a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp +++ b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp @@ -390,7 +390,10 @@ QString QWebPageAdapter::selectedText() const QString QWebPageAdapter::selectedHtml() const { - return page->focusController().focusedOrMainFrame().editor().selectedRange()->toHTML(); + RefPtr<Range> range = page->focusController().focusedOrMainFrame().editor().selectedRange(); + if (!range) + return QString(); + return range->toHTML(); } bool QWebPageAdapter::isContentEditable() const @@ -434,6 +437,9 @@ bool QWebPageAdapter::findText(const QString& subString, FindFlag options) if (options & FindBeginsInSelection) webCoreFindOptions |= WebCore::StartInSelection; + if (options & FindAtWordEndingsOnly) + webCoreFindOptions |= WebCore::AtWordEnds; + if (options & HighlightAllOccurrences) { if (subString.isEmpty()) { page->unmarkAllTextMatches(); |