[kwebkitpart] revert workaround for kde bug#313005
Rex Dieter
rdieter at fedoraproject.org
Fri May 17 13:55:15 UTC 2013
commit 9587d2a19cba9e5a718dbc851fe18036d0cd008f
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Fri May 17 08:55:13 2013 -0500
revert workaround for kde bug#313005
...QtWebKit-2.3-s-behavior-change-when-emitt.patch | 65 ++++++++++++++++++++
kwebkitpart.spec | 9 +++-
2 files changed, 73 insertions(+), 1 deletions(-)
---
diff --git a/0001-Workaround-QtWebKit-2.3-s-behavior-change-when-emitt.patch b/0001-Workaround-QtWebKit-2.3-s-behavior-change-when-emitt.patch
new file mode 100644
index 0000000..2a43b10
--- /dev/null
+++ b/0001-Workaround-QtWebKit-2.3-s-behavior-change-when-emitt.patch
@@ -0,0 +1,65 @@
+From d786bbdcb48634777809461b4900ab309b9f690f Mon Sep 17 00:00:00 2001
+From: Dawit Alemayehu <adawit at kde.org>
+Date: Sat, 23 Feb 2013 11:27:53 -0500
+Subject: [PATCH 1/2] Workaround QtWebKit 2.3's behavior change when emitting
+ 'QWebPage::geometryChangeRequested'. For some reason it
+ now sends a default width and height of 100 on new
+ window creation even when the site did not specify
+ those dimensions.
+
+NOTE: This workaround will cause a regression if a site attempts to create a popup window
+using Javascripts with the following parameters: x=0,y=0,width=100,height=100. Under that
+circumstance, the window will end up being created as another tab in konqueror instead of
+a popup window.
+
+BUG: 313005
+FIXED-IN: 1.3 branch
+---
+ src/webpage.cpp | 22 +++++++++++++++++++++-
+ 1 file changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/src/webpage.cpp b/src/webpage.cpp
+index 9cd6dcf..1d50386 100644
+--- a/src/webpage.cpp
++++ b/src/webpage.cpp
+@@ -944,9 +944,23 @@ bool NewWindowPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequ
+ return WebPage::acceptNavigationRequest(frame, request, type);
+ }
+
++/** TODO: Figure out if there is a way for QtWebKit to actually tell
++ * us whether we should create a popup window (dialog) or a regular
++ * new window. Right now that is simply broken because the parameter
++ * passed to QWebPage::createWindow is hard-coded in QtWebKit's code!
++ */
++#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 3, 0))
++static bool shouldApplyQtWebKit23Workaround(const QRect &rect)
++{
++ return (rect.x() == 0 &&
++ rect.y() == 0 &&
++ rect.width() == 100 &&
++ rect.height() == 100);
++}
++#endif
++
+ void NewWindowPage::slotGeometryChangeRequested(const QRect & rect)
+ {
+- //kDebug() << rect;
+ if (!rect.isValid())
+ return;
+
+@@ -955,6 +969,12 @@ void NewWindowPage::slotGeometryChangeRequested(const QRect & rect)
+ return;
+ }
+
++#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 3, 0))
++ else if (shouldApplyQtWebKit23Workaround(rect)) {
++ return;
++ }
++#endif
++
+ m_windowArgs.setX(rect.x());
+ m_windowArgs.setY(rect.y());
+ m_windowArgs.setWidth(qMax(rect.width(), 100));
+--
+1.7.11.7
+
diff --git a/kwebkitpart.spec b/kwebkitpart.spec
index 73f05d5..5f03ae7 100644
--- a/kwebkitpart.spec
+++ b/kwebkitpart.spec
@@ -2,7 +2,7 @@
Name: kwebkitpart
Summary: A KPart based on QtWebKit
Version: 1.3.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
URL: https://projects.kde.org/projects/extragear/base/kwebkitpart
@@ -10,6 +10,8 @@ URL: https://projects.kde.org/projects/extragear/base/kwebkitpart
Source0: kwebkitpart-%{version}.tar.bz2
## upstream patches
+# revert, per https://bugs.kde.org/show_bug.cgi?id=313005#c6
+Patch0001: 0001-Workaround-QtWebKit-2.3-s-behavior-change-when-emitt.patch
#define git_patches 1
%if 0%{?git_patches}
BuildRequires: git-core
@@ -43,6 +45,8 @@ git commit -a -q -m "%{version} baseline."
# Apply all the patches
git am -p1 %{patches} < /dev/null
+%else
+%patch0001 -R -p1 -b .0001
%endif
%if 0%{?fedora} && 0%{?fedora} < 18
@@ -89,6 +93,9 @@ fi
%changelog
+* Fri May 17 2013 Rex Dieter <rdieter at fedoraproject.org> 1.3.2-2
+- revert workaround for kde bug#313005
+
* Sat Mar 09 2013 Rex Dieter <rdieter at fedoraproject.org> 1.3.2-1
- 1.3.2
More information about the scm-commits
mailing list