Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: Shared/AdblockPlusDomTraverser.cpp

Issue 9998007: Initial libadblockplus integration (Closed)
Patch Set: More integration, reflecting latest libadblockplus changes Created April 9, 2013, 5:48 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Shared/AdblockPlusClient.cpp ('k') | Shared/PluginClassThread.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include "PluginClient.h" 3 #include "PluginClient.h"
4 #include "PluginFilter.h" 4 #include "PluginFilter.h"
5 #include "PluginSettings.h" 5 #include "PluginSettings.h"
6 6
7 #include "AdblockPlusDomTraverser.h" 7 #include "AdblockPlusDomTraverser.h"
8 8
9 9
10 CPluginDomTraverser::CPluginDomTraverser(CPluginTab* tab) : CPluginDomTraverserB ase(tab) 10 CPluginDomTraverser::CPluginDomTraverser(CPluginTab* tab) : CPluginDomTraverserB ase(tab)
(...skipping 19 matching lines...) Expand all
30 bool CPluginDomTraverser::OnElement(IHTMLElement* pEl, const CString& tag, CPlug inDomTraverserCache* cache, bool isDebug, CString& indent) 30 bool CPluginDomTraverser::OnElement(IHTMLElement* pEl, const CString& tag, CPlug inDomTraverserCache* cache, bool isDebug, CString& indent)
31 { 31 {
32 if (cache->m_isHidden) 32 if (cache->m_isHidden)
33 { 33 {
34 return false; 34 return false;
35 } 35 }
36 36
37 // Check if element is hidden 37 // Check if element is hidden
38 CPluginClient* client = CPluginClient::GetInstance(); 38 CPluginClient* client = CPluginClient::GetInstance();
39 39
40 cache->m_isHidden = client->IsElementHidden(tag, pEl, m_domain, indent); 40 cache->m_isHidden = client->IsElementHidden(tag, pEl, m_domain, indent, m_tab- >m_filter.get());
41 if (cache->m_isHidden) 41 if (cache->m_isHidden)
42 { 42 {
43 HideElement(pEl, tag, "", false, indent); 43 HideElement(pEl, tag, "", false, indent);
44 return false; 44 return false;
45 } 45 }
46 46
47 // Images 47 // Images
48 if (tag == "img") 48 if (tag == "img")
49 { 49 {
50 CComVariant vAttr; 50 CComVariant vAttr;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 #ifdef ENABLE_DEBUG_RESULT 140 #ifdef ENABLE_DEBUG_RESULT
141 if (isDebug) 141 if (isDebug)
142 { 142 {
143 CPluginDebug::DebugResultHiding(type, url, "-"); 143 CPluginDebug::DebugResultHiding(type, url, "-");
144 } 144 }
145 #endif // ENABLE_DEBUG_RESULT 145 #endif // ENABLE_DEBUG_RESULT
146 } 146 }
147 } 147 }
148 } 148 }
OLDNEW
« no previous file with comments | « Shared/AdblockPlusClient.cpp ('k') | Shared/PluginClassThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld