Gerald Pfeifer : mshtml: Removed unused function get_child_text_node().
Alexandre Julliard
julliard at winehq.org
Tue Oct 2 06:52:40 CDT 2007
Module: wine
Branch: master
Commit: 47032fd07c1e94548e00fcf0433f446e5e1046e5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=47032fd07c1e94548e00fcf0433f446e5e1046e5
Author: Gerald Pfeifer <gerald at pfeifer.com>
Date: Sat Sep 29 17:04:12 2007 +0200
mshtml: Removed unused function get_child_text_node().
---
dlls/mshtml/editor.c | 65 --------------------------------------------------
1 files changed, 0 insertions(+), 65 deletions(-)
diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c
index 000299a..239bba5 100644
--- a/dlls/mshtml/editor.c
+++ b/dlls/mshtml/editor.c
@@ -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;
More information about the wine-cvs
mailing list