LEFT | RIGHT |
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 Loading... |
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 Loading... |
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 } |
LEFT | RIGHT |