1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

AdBlock: Use display:block when hiding blocked iframes

visibility:hidden leaves empty space in page
This commit is contained in:
David Rosca 2014-12-17 13:27:53 +01:00
parent a750858ed7
commit 5cf4d0d6e0

View File

@ -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"));
}
}