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

Unified Diff: src/plugin/AdblockPlusDomTraverser.cpp

Issue 5316782940225536: Issue 1557 - Update to the recent libadblockplus to reduce additional updates in the logic later. (Closed)
Patch Set: fix accoring to comments Created Jan. 13, 2015, 12:59 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/plugin/AdblockPlusDomTraverser.cpp
diff --git a/src/plugin/AdblockPlusDomTraverser.cpp b/src/plugin/AdblockPlusDomTraverser.cpp
index 64e13ed6c69b8fc90e9d9941646788332cbacd1b..b5d9f770a444f650fbea62fbcbc058f415df5116 100644
--- a/src/plugin/AdblockPlusDomTraverser.cpp
+++ b/src/plugin/AdblockPlusDomTraverser.cpp
@@ -17,7 +17,8 @@ bool CPluginDomTraverser::OnIFrame(IHTMLElement* pEl, const CString& url, CStrin
CPluginClient* client = CPluginClient::GetInstance();
// If src should be blocked, set style display:none on iframe
- bool isBlocked = client->ShouldBlock(to_wstring(url), CFilter::contentTypeSubdocument, m_domain);
+ bool isBlocked = client->ShouldBlock(ToWstring(url),
+ AdblockPlus::FilterEngine::ContentType::CONTENT_TYPE_SUBDOCUMENT, m_domain);
if (isBlocked)
{
HideElement(pEl, "iframe", url, true, indent);
@@ -37,7 +38,7 @@ bool CPluginDomTraverser::OnElement(IHTMLElement* pEl, const CString& tag, CPlug
// Check if element is hidden
CPluginClient* client = CPluginClient::GetInstance();
- cache->m_isHidden = client->IsElementHidden(to_wstring(tag), pEl, m_domain, to_wstring(indent), m_tab->m_filter.get());
+ cache->m_isHidden = client->IsElementHidden(ToWstring(tag), pEl, m_domain, ToWstring(indent), m_tab->m_filter.get());
if (cache->m_isHidden)
{
HideElement(pEl, tag, "", false, indent);
@@ -55,7 +56,8 @@ bool CPluginDomTraverser::OnElement(IHTMLElement* pEl, const CString& tag, CPlug
CPluginClient::UnescapeUrl(src);
// If src should be blocked, set style display:none on image
- cache->m_isHidden = client->ShouldBlock(to_wstring(src), CFilter::contentTypeImage, m_domain);
+ cache->m_isHidden = client->ShouldBlock(ToWstring(src),
+ AdblockPlus::FilterEngine::ContentType::CONTENT_TYPE_IMAGE, m_domain);
if (cache->m_isHidden)
{
HideElement(pEl, "image", src, true, indent);

Powered by Google App Engine
This is Rietveld