Index: src/plugin/AdblockPlusDomTraverser.cpp |
diff --git a/src/plugin/AdblockPlusDomTraverser.cpp b/src/plugin/AdblockPlusDomTraverser.cpp |
index 24fea82fc92d95ecacd757854815b03c66e3fb91..9cbadd86b91dd743ffb9225d81e9d6dbeffe385b 100644 |
--- 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(const PluginFilterPtr& pluginFilter) : CPluginDomTraverserBase(pluginFilter) |
{ |
} |
@@ -51,10 +51,7 @@ bool CPluginDomTraverser::OnElement(IHTMLElement* pEl, const std::wstring& tag, |
return false; |
} |
- // 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 = m_pluginFilter->IsElementHidden(tag, pEl, m_domain, indent); |
if (cache->m_isHidden) |
{ |
HideElement(pEl, tag, L"", false, indent); |
@@ -71,7 +68,7 @@ bool CPluginDomTraverser::OnElement(IHTMLElement* pEl, const std::wstring& tag, |
if (!src.empty()) |
{ |
// If src should be blocked, set style display:none on image |
- cache->m_isHidden = client->ShouldBlock(src, |
+ cache->m_isHidden = CPluginClient::GetInstance()->ShouldBlock(src, |
AdblockPlus::FilterEngine::ContentType::CONTENT_TYPE_IMAGE, m_documentUrl); |
if (cache->m_isHidden) |
{ |