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

Side by Side Diff: src/plugin/AdblockPlusDomTraverser.cpp

Issue 6299667012780032: Issues #696,1231,1264,1265 - Improve handling in PassthroughApp (Closed)
Patch Set: rebase Created Oct. 17, 2014, 12:51 p.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 | « no previous file | src/plugin/PluginFilter.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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 posEnd = posBegin >= 0 ? sObjectHtml.Find(L"\"", posBegin + 7) : -1; 101 posEnd = posBegin >= 0 ? sObjectHtml.Find(L"\"", posBegin + 7) : -1;
102 } 102 }
103 } 103 }
104 } 104 }
105 105
106 return true; 106 return true;
107 } 107 }
108 108
109 109
110 bool CPluginDomTraverser::IsEnabled() 110 bool CPluginDomTraverser::IsEnabled()
111 { 111 {
112 CPluginClient* client = CPluginClient::GetInstance(); 112 CPluginClient* client = CPluginClient::GetInstance();
113
114 return client && CPluginSettings::GetInstance()->IsPluginEnabled() && !client- >IsWhitelistedUrl(m_domain); 113 return client && CPluginSettings::GetInstance()->IsPluginEnabled() && !client- >IsWhitelistedUrl(m_domain);
115 } 114 }
116 115
117 116
118 void CPluginDomTraverser::HideElement(IHTMLElement* pEl, const CString& type, co nst CString& url, bool isDebug, CString& indent) 117 void CPluginDomTraverser::HideElement(IHTMLElement* pEl, const CString& type, co nst CString& url, bool isDebug, CString& indent)
119 { 118 {
120 CComPtr<IHTMLStyle> pStyle; 119 CComPtr<IHTMLStyle> pStyle;
121 120
122 if (SUCCEEDED(pEl->get_style(&pStyle)) && pStyle) 121 if (SUCCEEDED(pEl->get_style(&pStyle)) && pStyle)
123 { 122 {
(...skipping 12 matching lines...) Expand all
136 135
137 #ifdef ENABLE_DEBUG_RESULT 136 #ifdef ENABLE_DEBUG_RESULT
138 if (isDebug) 137 if (isDebug)
139 { 138 {
140 CPluginDebug::DebugResultHiding(type, url, "-"); 139 CPluginDebug::DebugResultHiding(type, url, "-");
141 } 140 }
142 #endif // ENABLE_DEBUG_RESULT 141 #endif // ENABLE_DEBUG_RESULT
143 } 142 }
144 } 143 }
145 } 144 }
OLDNEW
« no previous file with comments | « no previous file | src/plugin/PluginFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld