}\\r
}\r
\r
-inline void getCurrentStyleInfoFromHTMLDOMNode(IHTMLDOMNode* pHTMLDOMNode, bool& invisible, bool& isBlock) {\r
+inline void getCurrentStyleInfoFromHTMLDOMNode(IHTMLDOMNode* pHTMLDOMNode, bool& invisible, bool& isBlock, wstring& listStyle) {\r
BSTR tempBSTR=NULL;\r
IHTMLElement2* pHTMLElement2=NULL;\r
int res=pHTMLDOMNode->QueryInterface(IID_IHTMLElement2,(void**)&pHTMLElement2);\r
} else {\r
LOG_DEBUG(L"Failed to get display");\r
}\r
+ BSTR _listStyle;\r
+ pHTMLCurrentStyle->get_listStyleType(&_listStyle);\r
+ if(_listStyle) {\r
+ listStyle.append(_listStyle);\r
+ SysFreeString(_listStyle);\r
+ }\r
if (pHTMLCurrentStyle) pHTMLCurrentStyle->Release();\r
}\r
\r
//Find out block and visibility style\r
bool invisible=false;\r
bool isBlock=true;\r
- getCurrentStyleInfoFromHTMLDOMNode(pHTMLDOMNode, invisible, isBlock);\r
-\r
+ wstring listStyle;\r
+ getCurrentStyleInfoFromHTMLDOMNode(pHTMLDOMNode, invisible, isBlock,listStyle);\r
LOG_DEBUG(L"Trying to get IHTMLDOMNode::nodeName");\r
if(pHTMLDOMNode->get_nodeName(&tempBSTR)!=S_OK||!tempBSTR) {\r
LOG_DEBUG(L"Failed to get IHTMLDOMNode::nodeName");\r
bool isInteractive=isEditable||(IAStates&STATE_SYSTEM_FOCUSABLE)||(IAStates&STATE_SYSTEM_LINKED)||(attribsMap.find(L"HTMLAttrib::onclick")!=attribsMap.end())||(attribsMap.find(L"HTMLAttrib::onmouseup")!=attribsMap.end())||(attribsMap.find(L"HTMLAttrib::onmousedown")!=attribsMap.end());\r
//Set up numbering for lists\r
int LIIndex=0;\r
- if(nodeName.compare(L"OL")==0) {\r
+ if(nodeName.compare(L"OL")==0||nodeName.compare(L"UL")==0) {\r
//Ordered lists should number their list items\r
LIIndex=1;\r
LIIndexPtr=&LIIndex;\r
- } else if((nodeName.compare(L"UL")==0||nodeName.compare(L"DL")==0)) {\r
+ } else if(nodeName.compare(L"DL")==0) {\r
//Unordered lists should not be numbered\r
LIIndexPtr=NULL;\r
}\r
contentString=L" ";\r
} else if(nodeName.compare(L"LI")==0) {\r
renderChildren=true;\r
- if(LIIndexPtr!=NULL) {\r
+ if(listStyle.compare(L"disc")==0||listStyle.compare(L"circle")==0||listStyle.compare(L"square")==0) {\r
tempStringStream.str(L"");\r
- tempStringStream<<*LIIndexPtr<<L". ";\r
+ tempStringStream<<L"\x2022 "; //Bullet\r
contentString=tempStringStream.str();\r
- ++(*LIIndexPtr);\r
- } else {\r
+ } else if(LIIndexPtr!=NULL&&!listStyle.empty()&&listStyle.compare(L"none")!=0) {\r
tempStringStream.str(L"");\r
- tempStringStream<<L"\x2022 "; //Bullet\r
+ tempStringStream<<*LIIndexPtr<<L". ";\r
contentString=tempStringStream.str();\r
+ ++(*LIIndexPtr);\r
}\r
} else if(nodeName.compare(L"TABLE")==0) {\r
renderChildren=true;\r