Index: src/plugin/AdblockPlusDomTraverser.cpp
diff --git a/src/plugin/AdblockPlusDomTraverser.cpp b/src/plugin/AdblockPlusDomTraverser.cpp
index 296a209942052e479083599c7c8007684132d0f9..19dee36637f80d19ac39b96833897bef93a4173d 100644
--- a/src/plugin/AdblockPlusDomTraverser.cpp
+++ b/src/plugin/AdblockPlusDomTraverser.cpp
@@ -1,20 +1,20 @@
-/*
- * This file is part of Adblock Plus ,
- * Copyright (C) 2006-2015 Eyeo GmbH
- *
- * Adblock Plus is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Adblock Plus is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Adblock Plus. If not, see .
- */
-
+/*
+ * This file is part of Adblock Plus ,
+ * Copyright (C) 2006-2015 Eyeo GmbH
+ *
+ * Adblock Plus is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * Adblock Plus is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Adblock Plus. If not, see .
+ */
+
#include "PluginStdAfx.h"
#include "PluginClient.h"
@@ -66,7 +66,7 @@ bool CPluginDomTraverser::OnElement(IHTMLElement* pEl, const CString& tag, CPlug
{
CComVariant vAttr;
- if (SUCCEEDED(pEl->getAttribute(L"src", 0, &vAttr)) && vAttr.vt == VT_BSTR && ::SysStringLen(vAttr.bstrVal) > 0)
+ if (SUCCEEDED(pEl->getAttribute(ATL::CComBSTR(L"src"), 0, &vAttr)) && vAttr.vt == VT_BSTR && ::SysStringLen(vAttr.bstrVal) > 0)
{
std::wstring src(vAttr.bstrVal, SysStringLen(vAttr.bstrVal));
UnescapeUrl(src);
Index: src/plugin/PluginDomTraverserBase.h
diff --git a/src/plugin/PluginDomTraverserBase.h b/src/plugin/PluginDomTraverserBase.h
index 546e0b70a862b723b24f175a916b82dddafd2f90..923efd41c57f21f2417f9b1b84a5e4cb24ac3c02 100644
--- a/src/plugin/PluginDomTraverserBase.h
+++ b/src/plugin/PluginDomTraverserBase.h
@@ -1,20 +1,20 @@
-/*
- * This file is part of Adblock Plus ,
- * Copyright (C) 2006-2015 Eyeo GmbH
- *
- * Adblock Plus is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Adblock Plus is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Adblock Plus. If not, see .
- */
-
+/*
+ * This file is part of Adblock Plus ,
+ * Copyright (C) 2006-2015 Eyeo GmbH
+ *
+ * Adblock Plus is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * Adblock Plus is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Adblock Plus. If not, see .
+ */
+
#ifndef _PLUGIN_DOM_TRAVERSER_BASE_H_
#define _PLUGIN_DOM_TRAVERSER_BASE_H_
@@ -136,7 +136,7 @@ void CPluginDomTraverserBase::TraverseDocument(IWebBrowser2* pBrowser, bool i
VARIANT_BOOL isBusy;
if (SUCCEEDED(pBrowser->get_Busy(&isBusy)))
{
- if (isBusy)
+ if (isBusy != VARIANT_FALSE)
{
return;
}
@@ -171,7 +171,7 @@ void CPluginDomTraverserBase::TraverseDocument(IWebBrowser2* pBrowser, bool i
else
{
CComPtr pBodyCollection;
- if (FAILED(pDoc->getElementsByTagName(L"body", &pBodyCollection)) || !pBodyCollection)
+ if (FAILED(pDoc->getElementsByTagName(ATL::CComBSTR(L"body"), &pBodyCollection)) || !pBodyCollection)
{
return;
}
@@ -194,7 +194,7 @@ void CPluginDomTraverserBase::TraverseDocument(IWebBrowser2* pBrowser, bool i
{
CComVariant vCacheIndex;
- if (FAILED(pBodyEl->getAttribute(L"abp", 0, &vCacheIndex)) || vCacheIndex.vt == VT_NULL)
+ if (FAILED(pBodyEl->getAttribute(ATL::CComBSTR(L"abp"), 0, &vCacheIndex)) || vCacheIndex.vt == VT_NULL)
{
ClearCache();
}
@@ -220,7 +220,7 @@ void CPluginDomTraverserBase::TraverseDocument(IWebBrowser2* pBrowser, bool i
// eg. http://gamecopyworld.com/
long frameCount = 0;
CComPtr pFrameCollection;
- if (SUCCEEDED(pDoc->getElementsByTagName(L"frame", &pFrameCollection)) && pFrameCollection)
+ if (SUCCEEDED(pDoc->getElementsByTagName(ATL::CComBSTR(L"frame"), &pFrameCollection)) && pFrameCollection)
{
pFrameCollection->get_length(&frameCount);
}
@@ -258,7 +258,7 @@ void CPluginDomTraverserBase::TraverseDocument(IWebBrowser2* pBrowser, bool i
{
long frameCount = 0;
CComPtr pFrameCollection;
- if (SUCCEEDED(pDoc->getElementsByTagName(L"iframe", &pFrameCollection)) && pFrameCollection)
+ if (SUCCEEDED(pDoc->getElementsByTagName(ATL::CComBSTR(L"iframe"), &pFrameCollection)) && pFrameCollection)
{
pFrameCollection->get_length(&frameCount);
}
@@ -277,7 +277,7 @@ void CPluginDomTraverserBase::TraverseDocument(IWebBrowser2* pBrowser, bool i
{
CComVariant vAttr;
- if (SUCCEEDED(pFrameEl->getAttribute(L"src", 0, &vAttr)) && vAttr.vt == VT_BSTR && ::SysStringLen(vAttr.bstrVal) > 0)
+ if (SUCCEEDED(pFrameEl->getAttribute(ATL::CComBSTR(L"scr"), 0, &vAttr)) && vAttr.vt == VT_BSTR && ::SysStringLen(vAttr.bstrVal) > 0)
{
CString srcLegacy = vAttr.bstrVal;
@@ -322,7 +322,7 @@ void CPluginDomTraverserBase::TraverseChild(IHTMLElement* pEl, IWebBrowser2*
m_criticalSection.Lock();
{
CComVariant vCacheIndex;
- if (isCached && SUCCEEDED(pEl->getAttribute(L"abp", 0, &vCacheIndex)) && vCacheIndex.vt == VT_I4)
+ if (isCached && SUCCEEDED(pEl->getAttribute(ATL::CComBSTR(L"abp"), 0, &vCacheIndex)) && vCacheIndex.vt == VT_I4)
{
cacheIndex = vCacheIndex.intVal;
@@ -353,7 +353,7 @@ void CPluginDomTraverserBase::TraverseChild(IHTMLElement* pEl, IWebBrowser2*
vCacheIndex.vt = VT_I4;
vCacheIndex.intVal = cacheIndex;
- pEl->setAttribute(L"abp", vCacheIndex);
+ pEl->setAttribute(ATL::CComBSTR(L"abp"), vCacheIndex);
}
}
m_criticalSection.Unlock();