mshtml: Removed unused function get_child_text_node().

This commit is contained in:
Gerald Pfeifer 2007-09-29 17:04:12 +02:00 committed by Alexandre Julliard
parent fe534ddde1
commit 47032fd07c
1 changed files with 0 additions and 65 deletions

View File

@ -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;