Hello community,

here is the log from the commit of package kwebkitpart for openSUSE:Factory 
checked in at 2014-06-02 07:00:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kwebkitpart (Old)
 and      /work/SRC/openSUSE:Factory/.kwebkitpart.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kwebkitpart"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kwebkitpart/kwebkitpart.changes  2013-10-30 
15:43:40.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kwebkitpart.new/kwebkitpart.changes     
2014-06-02 07:00:31.000000000 +0200
@@ -1,0 +2,9 @@
+Thu May 29 22:32:33 UTC 2014 - [email protected]
+
+- Added patches from upstream:
+  0001-Fixed-context-based-ad-blocking-for-iframe-objects.patch,
+  0002-Copy-only-the-email-address-and-not-the-mailto-link.patch and
+  0003-Show-correct-SSL-information-on-redirection.patch
+  (kde#319177, kde#334961, kde#335389)
+
+-------------------------------------------------------------------

New:
----
  0001-Fixed-context-based-ad-blocking-for-iframe-objects.patch
  0002-Copy-only-the-email-address-and-not-the-mailto-link.patch
  0003-Show-correct-SSL-information-on-redirection.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kwebkitpart.spec ++++++
--- /var/tmp/diff_new_pack.dcOCu9/_old  2014-06-02 07:00:32.000000000 +0200
+++ /var/tmp/diff_new_pack.dcOCu9/_new  2014-06-02 07:00:32.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package kwebkitpart
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,12 @@
 Source:         %{name}-%{version}.tar.xz
 Source1:        %{name}-lang.tar.bz2
 Source2:        README.html.bz2
+# PATCH-FIX-UPSTREAM 
0001-Fixed-context-based-ad-blocking-for-iframe-objects.patch -- kde#319177
+Patch0:         0001-Fixed-context-based-ad-blocking-for-iframe-objects.patch
+# PATCH-FIX-UPSTREAM 
0002-Copy-only-the-email-address-and-not-the-mailto-link.patch -- kde#334961
+Patch1:         0002-Copy-only-the-email-address-and-not-the-mailto-link.patch
+# PATCH-FIX-UPSTREAM 0003-Show-correct-SSL-information-on-redirection.patch -- 
kde#335389
+Patch2:         0003-Show-correct-SSL-information-on-redirection.patch
 BuildRequires:  libkde4-devel >= 4.8.3
 BuildRequires:  sqlite-devel
 Recommends:     kwebkitpart-lang
@@ -44,6 +50,9 @@
 %lang_package
 %prep
 %setup -q -n %{name}-%{version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 tar xjf $RPM_SOURCE_DIR/%{name}-lang.tar.bz2
 echo "add_subdirectory(lang)" >> CMakeLists.txt
 bunzip2 -d < %{S:2} > README.html

++++++ 0001-Fixed-context-based-ad-blocking-for-iframe-objects.patch ++++++
>From d399ced901bad73093a4c68804e0d934933bf1eb Mon Sep 17 00:00:00 2001
From: Dawit Alemayehu <[email protected]>
Date: Mon, 27 May 2013 14:09:46 -0400
Subject: [PATCH 1/5] Fixed context based ad blocking for iframe objects.

BUG: 319177
FIXED-IN: 1.3.4
---
 src/kwebkitpart_ext.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/kwebkitpart_ext.cpp b/src/kwebkitpart_ext.cpp
index a5d9a02..19c4f5d 100644
--- a/src/kwebkitpart_ext.cpp
+++ b/src/kwebkitpart_ext.cpp
@@ -393,16 +393,18 @@ void WebKitBrowserExtension::slotReloadFrame()
         
view()->page()->currentFrame()->load(view()->page()->currentFrame()->url());
 }
 
+static QString iframeUrl(QWebFrame* frame)
+{
+   return ((frame && frame->baseUrl().isValid()) ? frame->baseUrl() : 
frame->url()).toString();
+}
+
 void WebKitBrowserExtension::slotBlockIFrame()
 {
     if (!view())
         return;
 
     bool ok = false;
-
-    const QWebFrame* frame = view()->contextMenuResult().frame();
-    const QString urlStr = frame ? frame->url().toString() : QString();
-
+    const QString urlStr = iframeUrl(view()->contextMenuResult().frame());
     const QString url = KInputDialog::getText(i18n("Add URL to Filter"),
                                               i18n("Enter the URL:"),
                                               urlStr, &ok);
-- 
1.9.3

++++++ 0002-Copy-only-the-email-address-and-not-the-mailto-link.patch ++++++
>From 4d9b3e743991abfe61f8bff1af5d120516914588 Mon Sep 17 00:00:00 2001
From: Dawit Alemayehu <[email protected]>
Date: Sun, 18 May 2014 03:10:10 -0400
Subject: [PATCH 4/5] Copy only the email address and not the mailto link.

BUG: 334961
FIXED-IN: 1.3.4
---
 src/kwebkitpart_ext.cpp | 10 ++++++++++
 src/kwebkitpart_ext.h   |  1 +
 src/webview.cpp         |  4 ++--
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/kwebkitpart_ext.cpp b/src/kwebkitpart_ext.cpp
index 19c4f5d..226f875 100644
--- a/src/kwebkitpart_ext.cpp
+++ b/src/kwebkitpart_ext.cpp
@@ -520,6 +520,16 @@ void WebKitBrowserExtension::slotCopyLinkText()
     }
 }
 
+void WebKitBrowserExtension::slotCopyEmailAddress()
+{
+    if (view()) {
+        QMimeData* data = new QMimeData;
+        const QUrl url (view()->contextMenuResult().linkUrl());
+        data->setText(url.path());
+        QApplication::clipboard()->setMimeData(data, QClipboard::Clipboard);
+    }
+}
+
 void WebKitBrowserExtension::slotSaveLinkAs()
 {
     if (view())
diff --git a/src/kwebkitpart_ext.h b/src/kwebkitpart_ext.h
index 4e0828c..fe57c2f 100644
--- a/src/kwebkitpart_ext.h
+++ b/src/kwebkitpart_ext.h
@@ -85,6 +85,7 @@ public Q_SLOTS:
     void slotCopyLinkURL();
     void slotCopyLinkText();
     void slotSaveLinkAs();
+    void slotCopyEmailAddress();
 
     void slotViewDocumentSource();
     void slotViewFrameSource();
diff --git a/src/webview.cpp b/src/webview.cpp
index b6ba0e8..de03464 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -684,7 +684,7 @@ void 
WebView::linkActionPopupMenu(KParts::BrowserExtension::ActionGroupMap& link
     if (url.protocol() == "mailto") {
         action = new KAction(i18n("&Copy Email Address"), this);
         m_actionCollection->addAction(QL1S("copylinklocation"), action);
-        connect(action, SIGNAL(triggered(bool)), m_part->browserExtension(), 
SLOT(slotCopyLinkURL()));
+        connect(action, SIGNAL(triggered(bool)), m_part->browserExtension(), 
SLOT(slotCopyEmailAddress()));
         linkActions.append(action);
     } else {
         if (!m_result.isContentSelected()) {
@@ -1033,4 +1033,4 @@ void WebView::makeAccessKeyLabel(const QChar &accessKey, 
const QWebElement &elem
     label->move(point);
     m_accessKeyLabels.append(label);
     m_accessKeyNodes.insertMulti(accessKey, element);
-}
\ No newline at end of file
+}
-- 
1.9.3

++++++ 0003-Show-correct-SSL-information-on-redirection.patch ++++++
>From 719e1837089fea66b07885a47ebebcbedc5c89ea Mon Sep 17 00:00:00 2001
From: Dawit Alemayehu <[email protected]>
Date: Tue, 27 May 2014 08:25:58 -0400
Subject: [PATCH 5/5] Show correct SSL information on redirection. BUG: 335389
 FIXED-IN: 1.3.4

---
 src/webpage.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/webpage.cpp b/src/webpage.cpp
index 68ebd85..df1c41c 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -536,14 +536,16 @@ void WebPage::slotRequestFinished(QNetworkReply *reply)
     const bool shouldResetSslInfo = (m_sslInfo.isValid() && 
!domainSchemeMatch(requestUrl, m_sslInfo.url()));
     // Only deal with non-redirect responses...
     const QVariant redirectVar = 
reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
-    if (redirectVar.isValid()) {
+    const bool isMainFrameRequest = (frame == mainFrame());
+
+    if (isMainFrameRequest && redirectVar.isValid()) {
         
m_sslInfo.restoreFrom(reply->attribute(static_cast<QNetworkRequest::Attribute>(KIO::AccessManager::MetaData)),
                               reply->url(), shouldResetSslInfo);
         return;
     }
 
     const int errCode = errorCodeFromReply(reply);
-    const bool isMainFrameRequest = (frame == mainFrame());
+    kDebug() << frame << "is main frame request?" << isMainFrameRequest << 
requestUrl;
     // Handle any error...
     switch (errCode) {
         case 0:
-- 
1.9.3


-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to