From 41765e9b951477aee6942de6cb1404336ab001c9 Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Sat, 28 Jan 2017 18:25:12 +0200 Subject: [PATCH] [fbreader] Ignore images with display:none --- .../fbreader/fbreader/src/formats/xhtml/XHTMLReader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fbreader/fbreader/fbreader/src/formats/xhtml/XHTMLReader.cpp b/fbreader/fbreader/fbreader/src/formats/xhtml/XHTMLReader.cpp index b0cdc47..e9144f0 100644 --- a/fbreader/fbreader/fbreader/src/formats/xhtml/XHTMLReader.cpp +++ b/fbreader/fbreader/fbreader/src/formats/xhtml/XHTMLReader.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2004-2010 Geometer Plus - * Copyright (C) 2016 Slava Monich + * Copyright (C) 2016-2017 Slava Monich * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -282,8 +282,8 @@ XHTMLTagImageAction::XHTMLTagImageAction(const std::string &attributeName) { } void XHTMLTagImageAction::doAtStart(XHTMLReader &reader, const char **xmlattributes) { - // Ignore transparent images - if (!reader.myParseStack.back().opacity) { + // Ignore transparent and hidden images + if (!reader.myParseStack.back().opacity || reader.myStyleStack.back().DisplayNone) { return; }