 Issue 6567422169448448:
  Issue 119 - Switch to injecting CSS for element hiding  (Closed)
    
  
    Issue 6567422169448448:
  Issue 119 - Switch to injecting CSS for element hiding  (Closed) 
  | Index: src/plugin/PluginFilter.cpp | 
| diff --git a/src/plugin/PluginFilter.cpp b/src/plugin/PluginFilter.cpp | 
| index 7bbd8fa461428d66ae94029091fc359e0b66615c..09ece3b52518277a8980d84878a350724de5def3 100644 | 
| --- a/src/plugin/PluginFilter.cpp | 
| +++ b/src/plugin/PluginFilter.cpp | 
| @@ -646,9 +646,10 @@ bool CPluginFilter::IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, | 
| return false; | 
| } | 
| -bool CPluginFilter::LoadHideFilters(std::vector<std::wstring> filters) | 
| +bool CPluginFilter::LoadHideFilters(const std::vector<std::wstring>& filters) | 
| { | 
| ClearFilters(); | 
| + m_hideFilters = filters; | 
| bool isRead = false; | 
| CPluginClient* client = CPluginClient::GetInstance(); | 
| @@ -656,7 +657,7 @@ bool CPluginFilter::LoadHideFilters(std::vector<std::wstring> filters) | 
| int pos = 0; | 
| CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap); | 
| { | 
| - for (std::vector<std::wstring>::iterator it = filters.begin(); it < filters.end(); ++it) | 
| + for (std::vector<std::wstring>::const_iterator it = filters.begin(); it < filters.end(); ++it) | 
| { | 
| CString filter((*it).c_str()); | 
| // If the line is not commented out | 
| @@ -700,6 +701,7 @@ void CPluginFilter::ClearFilters() | 
| m_elementHideTags.clear(); | 
| m_elementHideTagsId.clear(); | 
| m_elementHideTagsClass.clear(); | 
| + m_hideFilters.clear(); | 
| } | 
| } | 
| @@ -746,3 +748,9 @@ bool CPluginFilter::ShouldBlock(const std::wstring& src, int contentType, const | 
| #endif | 
| return false; | 
| } | 
| + | 
| +const std::vector<std::wstring>& CPluginFilter::getHideFilters() const | 
| +{ | 
| + DWORD res = WaitForSingleObject(hideFiltersLoadedEvent, ENGINE_STARTUP_TIMEOUT); | 
| 
Oleksandr
2015/02/04 20:59:57
It's hard to understand this from the scattered re
 
sergei
2015/04/13 08:06:58
`hideFiltersLoadedEvent` is not introduced in thes
 | 
| + return m_hideFilters; | 
| +} |