Index: src/plugin/PluginFilter.cpp |
=================================================================== |
--- a/src/plugin/PluginFilter.cpp |
+++ b/src/plugin/PluginFilter.cpp |
@@ -388,27 +388,24 @@ |
case ETraverserComplexType::TRAVERSER_TYPE_IMMEDIATE: |
hr = S_FALSE; |
CComQIPtr<IHTMLDOMNode> pPrevSiblingNode = pEl; |
+ long type = 0; |
+ while (pPrevSiblingNode && type != 1) |
+ { |
+ IHTMLDOMNode* tmpNode; |
+ pPrevSiblingNode->get_previousSibling(&tmpNode); |
+ pPrevSiblingNode.Attach(tmpNode); |
+ if (pPrevSiblingNode) |
+ { |
+ hr = pPrevSiblingNode->get_nodeType(&type); |
+ if (hr != S_OK) |
+ pPrevSiblingNode.Release(); |
+ } |
+ } |
+ |
if (pPrevSiblingNode) |
- { |
- long type; |
- do |
- { |
- IHTMLDOMNode* tmpNode; |
- pPrevSiblingNode->get_previousSibling(&tmpNode); |
- pPrevSiblingNode.Attach(tmpNode); |
- if (pPrevSiblingNode) |
- { |
- hr = pPrevSiblingNode->get_nodeType(&type); |
- if (hr != S_OK) |
- pPrevSiblingNode.Release(); |
- } |
- } while (pPrevSiblingNode && type != 1); |
- |
- if (pPrevSiblingNode) |
- hr = pPrevSiblingNode.QueryInterface(&pDomPredecessor); |
- else |
- return false; |
- } |
+ hr = pPrevSiblingNode.QueryInterface(&pDomPredecessor); |
+ else |
+ return false; |
break; |
} |
if (hr != S_OK) |