Index: src/plugin/AdblockPlusDomTraverser.cpp |
=================================================================== |
--- a/src/plugin/AdblockPlusDomTraverser.cpp |
+++ b/src/plugin/AdblockPlusDomTraverser.cpp |
@@ -23,7 +23,7 @@ |
#include "..\shared\Utils.h" |
-CPluginDomTraverser::CPluginDomTraverser(CPluginTab* tab) : CPluginDomTraverserBase(tab) |
+CPluginDomTraverser::CPluginDomTraverser(CPluginFilter* filterSet) : CPluginDomTraverserBase(filterSet) |
{ |
} |
@@ -52,9 +52,7 @@ |
} |
// Check if element is hidden |
- CPluginClient* client = CPluginClient::GetInstance(); |
- |
- cache->m_isHidden = client->IsElementHidden(tag, pEl, m_domain, indent, &(m_tab->m_filter)); |
+ cache->m_isHidden = filterSet->IsElementHidden(tag, pEl, m_domain, indent); |
if (cache->m_isHidden) |
{ |
HideElement(pEl, tag, L"", false, indent); |
@@ -71,6 +69,7 @@ |
if (!src.empty()) |
{ |
// If src should be blocked, set style display:none on image |
+ CPluginClient* client = CPluginClient::GetInstance(); |
cache->m_isHidden = client->ShouldBlock(src, |
AdblockPlus::FilterEngine::ContentType::CONTENT_TYPE_IMAGE, m_documentUrl); |
if (cache->m_isHidden) |