diff options
Diffstat (limited to 'openembedded/packages/gtkhtml2/files/add-end-element-signal.patch')
| -rw-r--r-- | openembedded/packages/gtkhtml2/files/add-end-element-signal.patch | 141 |
1 files changed, 0 insertions, 141 deletions
diff --git a/openembedded/packages/gtkhtml2/files/add-end-element-signal.patch b/openembedded/packages/gtkhtml2/files/add-end-element-signal.patch deleted file mode 100644 index 66bfc16fd5..0000000000 --- a/openembedded/packages/gtkhtml2/files/add-end-element-signal.patch +++ /dev/null | |||
| @@ -1,141 +0,0 @@ | |||
| 1 | Index: libgtkhtml/document/htmldocument.c | ||
| 2 | =================================================================== | ||
| 3 | --- libgtkhtml/document/htmldocument.c.orig 2006-02-11 05:21:28.000000000 +0000 | ||
| 4 | +++ libgtkhtml/document/htmldocument.c 2006-02-11 15:41:06.000000000 +0000 | ||
| 5 | @@ -48,6 +48,7 @@ enum { | ||
| 6 | |||
| 7 | /* DOM change events */ | ||
| 8 | NODE_INSERTED, | ||
| 9 | + NODE_FINISHED, | ||
| 10 | NODE_REMOVED, | ||
| 11 | TEXT_UPDATED, | ||
| 12 | STYLE_UPDATED, | ||
| 13 | @@ -536,6 +537,12 @@ html_document_new_node (HtmlParser *pars | ||
| 14 | } | ||
| 15 | |||
| 16 | static void | ||
| 17 | +html_document_finished_node (HtmlParser *parser, DomNode *node, HtmlDocument *document) | ||
| 18 | +{ | ||
| 19 | + g_signal_emit (G_OBJECT (document), document_signals [NODE_FINISHED], 0, node); | ||
| 20 | +} | ||
| 21 | + | ||
| 22 | +static void | ||
| 23 | html_document_finalize (GObject *object) | ||
| 24 | { | ||
| 25 | HtmlDocument *document = HTML_DOCUMENT (object); | ||
| 26 | @@ -639,6 +646,16 @@ html_document_class_init (HtmlDocumentCl | ||
| 27 | g_cclosure_marshal_VOID__OBJECT, | ||
| 28 | G_TYPE_NONE, 1, | ||
| 29 | DOM_TYPE_NODE); | ||
| 30 | + | ||
| 31 | + document_signals [NODE_FINISHED] = | ||
| 32 | + g_signal_new ("node_finished", | ||
| 33 | + G_TYPE_FROM_CLASS (object_class), | ||
| 34 | + G_SIGNAL_RUN_LAST, | ||
| 35 | + G_STRUCT_OFFSET (HtmlDocumentClass, node_finished), | ||
| 36 | + NULL, NULL, | ||
| 37 | + g_cclosure_marshal_VOID__OBJECT, | ||
| 38 | + G_TYPE_NONE, 1, | ||
| 39 | + DOM_TYPE_NODE); | ||
| 40 | |||
| 41 | document_signals [NODE_REMOVED] = | ||
| 42 | g_signal_new ("node_removed", | ||
| 43 | @@ -818,6 +835,9 @@ html_document_open_stream (HtmlDocument | ||
| 44 | g_signal_connect (document->parser, "done_parsing", | ||
| 45 | (GCallback) html_document_done_parsing, | ||
| 46 | document); | ||
| 47 | + g_signal_connect (document->parser, "finished_node", | ||
| 48 | + (GCallback) html_document_finished_node, | ||
| 49 | + document); | ||
| 50 | |||
| 51 | document->state = HTML_DOCUMENT_STATE_PARSING; | ||
| 52 | return TRUE; | ||
| 53 | Index: libgtkhtml/document/htmldocument.h | ||
| 54 | =================================================================== | ||
| 55 | --- libgtkhtml/document/htmldocument.h.orig 2006-02-11 05:21:28.000000000 +0000 | ||
| 56 | +++ libgtkhtml/document/htmldocument.h 2006-02-11 15:35:38.000000000 +0000 | ||
| 57 | @@ -80,6 +80,7 @@ struct _HtmlDocumentClass { | ||
| 58 | |||
| 59 | /* DOM change events */ | ||
| 60 | void (*node_inserted) (HtmlDocument *document, DomNode *node); | ||
| 61 | + void (*node_finished) (HtmlDocument *document, DomNode *node); | ||
| 62 | void (*node_removed) (HtmlDocument *document, DomNode *node); | ||
| 63 | void (*text_updated) (HtmlDocument *document, DomNode *node); | ||
| 64 | void (*style_updated) (HtmlDocument *document, DomNode *node, HtmlStyleChange style_change); | ||
| 65 | Index: libgtkhtml/document/htmlparser.c | ||
| 66 | =================================================================== | ||
| 67 | --- libgtkhtml/document/htmlparser.c.orig 2006-01-17 11:50:54.000000000 +0000 | ||
| 68 | +++ libgtkhtml/document/htmlparser.c 2006-02-11 17:21:20.000000000 +0000 | ||
| 69 | @@ -28,6 +28,7 @@ enum { | ||
| 70 | NEW_NODE, | ||
| 71 | DONE_PARSING, | ||
| 72 | PARSED_DOCUMENT_NODE, | ||
| 73 | + FINISHED_NODE, | ||
| 74 | LAST_SIGNAL | ||
| 75 | }; | ||
| 76 | |||
| 77 | @@ -84,8 +85,13 @@ static void | ||
| 78 | html_endElement (void *ctx, const xmlChar *name) | ||
| 79 | { | ||
| 80 | HtmlParser *parser = HTML_PARSER (ctx); | ||
| 81 | + DomNode *node; | ||
| 82 | |||
| 83 | xmlSAX2EndElement (parser->xmlctxt, name); | ||
| 84 | + | ||
| 85 | + node = dom_Node_mkref (xmlGetLastChild (parser->xmlctxt->node)); | ||
| 86 | + if (node) | ||
| 87 | + g_signal_emit (G_OBJECT (parser), parser_signals [FINISHED_NODE], 0, node); | ||
| 88 | } | ||
| 89 | |||
| 90 | static void | ||
| 91 | @@ -241,6 +247,15 @@ html_parser_class_init (HtmlParserClass | ||
| 92 | g_cclosure_marshal_VOID__VOID, | ||
| 93 | G_TYPE_NONE, 0); | ||
| 94 | |||
| 95 | + parser_signals [FINISHED_NODE] = | ||
| 96 | + g_signal_new ("finished_node", | ||
| 97 | + G_TYPE_FROM_CLASS (object_class), | ||
| 98 | + G_SIGNAL_RUN_LAST, | ||
| 99 | + G_STRUCT_OFFSET (HtmlParserClass, finished_node), | ||
| 100 | + NULL, NULL, | ||
| 101 | + g_cclosure_marshal_VOID__OBJECT, | ||
| 102 | + G_TYPE_NONE, 1, | ||
| 103 | + DOM_TYPE_NODE); | ||
| 104 | } | ||
| 105 | |||
| 106 | static void | ||
| 107 | @@ -281,11 +296,11 @@ html_parser_set_type (HtmlParser *parser | ||
| 108 | /* FIXME: Free parser if existing */ | ||
| 109 | if (parser_type == HTML_PARSER_TYPE_HTML) { | ||
| 110 | parser->xmlctxt = htmlCreatePushParserCtxt (SAXHandler, parser, | ||
| 111 | - parser->chars, parser->res, NULL, 0); | ||
| 112 | + NULL, 0, NULL, 0); | ||
| 113 | } | ||
| 114 | else { | ||
| 115 | parser->xmlctxt = xmlCreatePushParserCtxt (SAXHandler, parser, | ||
| 116 | - parser->chars, parser->res, NULL); | ||
| 117 | + NULL, 0, NULL); | ||
| 118 | } | ||
| 119 | |||
| 120 | |||
| 121 | Index: libgtkhtml/document/htmlparser.h | ||
| 122 | =================================================================== | ||
| 123 | --- libgtkhtml/document/htmlparser.h.orig 2006-01-17 11:50:54.000000000 +0000 | ||
| 124 | +++ libgtkhtml/document/htmlparser.h 2006-02-11 18:57:51.000000000 +0000 | ||
| 125 | @@ -57,8 +57,6 @@ struct _HtmlParser { | ||
| 126 | |||
| 127 | /* Used by libxml */ | ||
| 128 | xmlParserCtxtPtr xmlctxt; | ||
| 129 | - int res; | ||
| 130 | - char chars[10]; | ||
| 131 | |||
| 132 | gboolean blocking; | ||
| 133 | DomNode *blocking_node; | ||
| 134 | @@ -71,6 +69,7 @@ struct _HtmlParserClass { | ||
| 135 | void (* done_parsing) (HtmlParser *parser); | ||
| 136 | void (* new_node) (HtmlParser *parser, DomNode *node); | ||
| 137 | void (* parsed_document_node) (HtmlParser *parser, DomDocument *document); | ||
| 138 | + void (* finished_node) (HtmlParser *parser, DomNode *node); | ||
| 139 | }; | ||
| 140 | typedef struct _HtmlParserClass HtmlParserClass; | ||
| 141 | |||
