From 5cf4d0d6e00c81dcb993d06b2f9b259d569db495 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Wed, 17 Dec 2014 13:27:53 +0100 Subject: [PATCH] AdBlock: Use display:block when hiding blocked iframes visibility:hidden leaves empty space in page --- src/lib/webkit/webpage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/webkit/webpage.cpp b/src/lib/webkit/webpage.cpp index 2ab34e1cc..11bb26cbe 100644 --- a/src/lib/webkit/webpage.cpp +++ b/src/lib/webkit/webpage.cpp @@ -828,12 +828,12 @@ bool WebPage::extension(Extension extension, const ExtensionOption* option, Exte QWebElement docElement = erPage->mainFrame()->documentElement(); QWebElementCollection elements; - elements.append(docElement.findAll("iframe")); + elements.append(docElement.findAll(QSL("iframe"))); foreach (QWebElement element, elements) { - const QString src = element.attribute("src"); + const QString src = element.attribute(QSL("src")); if (!src.isEmpty() && exOption->url.toString().contains(src)) { - element.setStyleProperty("visibility", "hidden"); + element.setStyleProperty(QSL("display"), QSL("none")); } }