Commit 47032fd0 authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

mshtml: Removed unused function get_child_text_node().

parent fe534ddd
......@@ -385,71 +385,6 @@ static void set_font_size(HTMLDocument *This, LPCWSTR size)
nsIDOMDocument_Release(nsdoc);
}
static BOOL is_visible_text_node(nsIDOMNode *node)
{
nsIDOMCharacterData *char_data;
nsAString data_str;
LPCWSTR data, ptr;
PRUint32 len;
nsIDOMNode_QueryInterface(node, &IID_nsIDOMCharacterData, (void**)&char_data);
nsIDOMCharacterData_GetLength(char_data, &len);
nsAString_Init(&data_str, NULL);
nsIDOMCharacterData_GetData(char_data, &data_str);
nsAString_GetData(&data_str, &data, NULL);
if(*data == '\n') {
len--;
for(ptr=data+1; ptr && isspaceW(*ptr); ptr++)
len--;
}
nsAString_Finish(&data_str);
nsIDOMCharacterData_Release(char_data);
return len != 0;
}
static nsIDOMNode *get_child_text_node(nsIDOMNode *node, BOOL first)
{
nsIDOMNode *iter, *iter2;
if(first)
nsIDOMNode_GetFirstChild(node, &iter);
else
nsIDOMNode_GetLastChild(node, &iter);
while(iter) {
PRUint16 node_type;
nsIDOMNode_GetNodeType(iter, &node_type);
switch(node_type) {
case TEXT_NODE:
if(is_visible_text_node(iter))
return iter;
case ELEMENT_NODE:
iter2 = get_child_text_node(iter, first);
if(iter2) {
nsIDOMNode_Release(iter);
return iter2;
}
}
if(first)
nsIDOMNode_GetNextSibling(iter, &iter2);
else
nsIDOMNode_GetPreviousSibling(iter, &iter2);
nsIDOMNode_Release(iter);
iter = iter2;
}
return NULL;
}
static void handle_arrow_key(HTMLDocument *This, nsIDOMKeyEvent *event, const char * const cmds[4])
{
int i=0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment