Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Update
kwebkitpart
0001-Fixed-context-based-ad-blocking-for-iframe...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Fixed-context-based-ad-blocking-for-iframe-objects.patch of Package kwebkitpart
From d399ced901bad73093a4c68804e0d934933bf1eb Mon Sep 17 00:00:00 2001 From: Dawit Alemayehu <adawit@kde.org> 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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor