aboutsummaryrefslogtreecommitdiff
path: root/www/qt5-webkit
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2018-04-26 21:04:46 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2018-04-26 21:04:46 +0000
commit10791c23e93b56461249752b32441b4a30eb882d (patch)
tree660ba944911150f130c88f5f224892e588de3247 /www/qt5-webkit
parent50b477f015bee9b5c31796458d5179970b6adab2 (diff)
downloadports-10791c23e93b56461249752b32441b4a30eb882d.tar.gz
ports-10791c23e93b56461249752b32441b4a30eb882d.zip
Import upstream commit fixing a crash caused by a null pointer
dereference. Approved by: kde (tcberner) Obtained from: https://github.com/annulen/webkit/commit/0e75f3272d149bc64899c161f150eb341a2417af MFH: 2018Q2 Differential Revision: https://reviews.freebsd.org/D15210
Notes
Notes: svn path=/head/; revision=468386
Diffstat (limited to 'www/qt5-webkit')
-rw-r--r--www/qt5-webkit/Makefile2
-rw-r--r--www/qt5-webkit/files/patch-Source_WebKit_qt_WebCoreSupport_QWebPageAdapter.cpp18
2 files changed, 19 insertions, 1 deletions
diff --git a/www/qt5-webkit/Makefile b/www/qt5-webkit/Makefile
index 6a9c53212483..6332e27d63b0 100644
--- a/www/qt5-webkit/Makefile
+++ b/www/qt5-webkit/Makefile
@@ -2,7 +2,7 @@
PORTNAME= webkit
DISTVERSION= 5.212.0-alpha2
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= www
MASTER_SITES= https://github.com/annulen/${PORTNAME}/releases/download/${DISTNAME}/
PKGNAMEPREFIX= qt5-
diff --git a/www/qt5-webkit/files/patch-Source_WebKit_qt_WebCoreSupport_QWebPageAdapter.cpp b/www/qt5-webkit/files/patch-Source_WebKit_qt_WebCoreSupport_QWebPageAdapter.cpp
new file mode 100644
index 000000000000..fdec82b73e3a
--- /dev/null
+++ b/www/qt5-webkit/files/patch-Source_WebKit_qt_WebCoreSupport_QWebPageAdapter.cpp
@@ -0,0 +1,18 @@
+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