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

Delta Between Two Patch Sets: src/plugin/AdblockPlusDomTraverser.cpp

Issue 5316782940225536: Issue 1557 - Update to the recent libadblockplus to reduce additional updates in the logic later. (Closed)
Left Patch Set: fix Created Jan. 30, 2015, 1:17 p.m.
Right Patch Set: rebase and remove member of CFilter Created Feb. 4, 2015, 12:50 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/plugin/AdblockPlusClient.cpp ('k') | src/plugin/PluginFilter.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 { 60 {
61 HideElement(pEl, tag, L"", false, indent); 61 HideElement(pEl, tag, L"", false, indent);
62 return false; 62 return false;
63 } 63 }
64 64
65 // Images 65 // Images
66 if (tag == "img") 66 if (tag == "img")
67 { 67 {
68 CComVariant vAttr; 68 CComVariant vAttr;
69 69
70 if (SUCCEEDED(pEl->getAttribute(L"src", 0, &vAttr)) && vAttr.vt == VT_BSTR & & ::SysStringLen(vAttr.bstrVal) > 0) 70 if (SUCCEEDED(pEl->getAttribute(ATL::CComBSTR(L"src"), 0, &vAttr)) && vAttr. vt == VT_BSTR && ::SysStringLen(vAttr.bstrVal) > 0)
71 { 71 {
72 std::wstring src(vAttr.bstrVal, SysStringLen(vAttr.bstrVal)); 72 std::wstring src(vAttr.bstrVal, SysStringLen(vAttr.bstrVal));
73 UnescapeUrl(src); 73 UnescapeUrl(src);
74 74
75 // If src should be blocked, set style display:none on image 75 // If src should be blocked, set style display:none on image
76 cache->m_isHidden = client->ShouldBlock(src, 76 cache->m_isHidden = client->ShouldBlock(src,
77 AdblockPlus::FilterEngine::ContentType::CONTENT_TYPE_IMAGE, m_domain); 77 AdblockPlus::FilterEngine::ContentType::CONTENT_TYPE_IMAGE, m_domain);
78 if (cache->m_isHidden) 78 if (cache->m_isHidden)
79 { 79 {
80 HideElement(pEl, "image", src, true, indent); 80 HideElement(pEl, "image", src, true, indent);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 #ifdef ENABLE_DEBUG_RESULT 155 #ifdef ENABLE_DEBUG_RESULT
156 if (isDebug) 156 if (isDebug)
157 { 157 {
158 CPluginDebug::DebugResultHiding(type, ToCString(url), "-"); 158 CPluginDebug::DebugResultHiding(type, ToCString(url), "-");
159 } 159 }
160 #endif // ENABLE_DEBUG_RESULT 160 #endif // ENABLE_DEBUG_RESULT
161 } 161 }
162 } 162 }
163 } 163 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld