OLD | NEW |
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 return client && CPluginSettings::GetInstance()->IsPluginEnabled() && !client-
>IsUrlWhiteListed(m_domain); | 115 return client && CPluginSettings::GetInstance()->IsPluginEnabled() && !client-
>IsUrlWhiteListed(m_domain); |
116 } | 116 } |
117 | 117 |
118 | 118 |
119 void CPluginDomTraverser::HideElement(IHTMLElement* pEl, const CString& type, co
nst CString& url, bool isDebug, CString& indent) | 119 void CPluginDomTraverser::HideElement(IHTMLElement* pEl, const CString& type, co
nst CString& url, bool isDebug, CString& indent) |
120 { | 120 { |
121 CComPtr<IHTMLStyle> pStyle; | 121 CComPtr<IHTMLStyle> pStyle; |
122 | 122 |
123 if (SUCCEEDED(pEl->get_style(&pStyle)) && pStyle) | 123 if (SUCCEEDED(pEl->get_style(&pStyle)) && pStyle) |
124 { | 124 { |
125 #ifdef ENABLE_DEBUG_RESULT | |
126 CComBSTR bstrDisplay; | 125 CComBSTR bstrDisplay; |
127 | 126 |
128 if (SUCCEEDED(pStyle->get_display(&bstrDisplay)) && bstrDisplay && CString(b
strDisplay) == L"none") | 127 if (SUCCEEDED(pStyle->get_display(&bstrDisplay)) && bstrDisplay && CString(b
strDisplay) == L"none") |
129 { | 128 { |
130 return; | 129 return; |
131 } | 130 } |
132 #endif // ENABLE_DEBUG_RESULT | |
133 | 131 |
134 static const CComBSTR sbstrNone(L"none"); | 132 static const CComBSTR sbstrNone(L"none"); |
135 | 133 |
136 if (SUCCEEDED(pStyle->put_display(sbstrNone))) | 134 if (SUCCEEDED(pStyle->put_display(sbstrNone))) |
137 { | 135 { |
138 DEBUG_HIDE_EL(indent + L"HideEl::Hiding " + type + L" url:" + url) | 136 DEBUG_HIDE_EL(indent + L"HideEl::Hiding " + type + L" url:" + url) |
139 | 137 |
140 #ifdef ENABLE_DEBUG_RESULT | 138 #ifdef ENABLE_DEBUG_RESULT |
141 if (isDebug) | 139 if (isDebug) |
142 { | 140 { |
143 CPluginDebug::DebugResultHiding(type, url, "-"); | 141 CPluginDebug::DebugResultHiding(type, url, "-"); |
144 } | 142 } |
145 #endif // ENABLE_DEBUG_RESULT | 143 #endif // ENABLE_DEBUG_RESULT |
146 } | 144 } |
147 } | 145 } |
148 } | 146 } |
OLD | NEW |