Differential D15210 Diff 41909 head/www/qt5-webkit/files/patch-Source_WebKit_qt_WebCoreSupport_QWebPageAdapter.cpp
Changeset View
Changeset View
Standalone View
Standalone View
head/www/qt5-webkit/files/patch-Source_WebKit_qt_WebCoreSupport_QWebPageAdapter.cpp
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
Fix crash in QWebPage::selectedHtml() when selectedRange is nullptr | |||||
obtained from: https://github.com/annulen/webkit/commit/0e75f3272d149bc64899c161f150eb341a2417af | |||||
--- Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp.orig 2017-06-09 14:11:36 UTC | |||||
+++ 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 |