diff options
| -rw-r--r-- | openembedded/packages/gtkhtml2/files/add-end-element-signal.patch | 141 | ||||
| -rw-r--r-- | openembedded/packages/gtkhtml2/files/at-import_box-pos.patch | 686 | ||||
| -rw-r--r-- | openembedded/packages/gtkhtml2/files/css-media.patch | 466 | ||||
| -rw-r--r-- | openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch | 59 | ||||
| -rw-r--r-- | openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch | 91 | ||||
| -rw-r--r-- | openembedded/packages/gtkhtml2/files/fix-margin-inherit.patch | 25 | ||||
| -rw-r--r-- | openembedded/packages/gtkhtml2/files/fix-recreation2.patch | 93 | ||||
| -rw-r--r-- | openembedded/packages/gtkhtml2/files/fix-style-change.patch | 29 | ||||
| -rwxr-xr-x | openembedded/packages/gtkhtml2/gtkhtml2_cvs.bb | 15 | ||||
| -rwxr-xr-x | openembedded/packages/web/web_svn.bb (renamed from openembedded/packages/web/web_snap20060213.bb) | 5 |
10 files changed, 9 insertions, 1601 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 | |||
diff --git a/openembedded/packages/gtkhtml2/files/at-import_box-pos.patch b/openembedded/packages/gtkhtml2/files/at-import_box-pos.patch deleted file mode 100644 index fb31d057a4..0000000000 --- a/openembedded/packages/gtkhtml2/files/at-import_box-pos.patch +++ /dev/null | |||
| @@ -1,686 +0,0 @@ | |||
| 1 | Index: libgtkhtml/css/cssmatcher.c | ||
| 2 | =================================================================== | ||
| 3 | --- libgtkhtml/css/cssmatcher.c.orig 2006-02-04 20:10:47.000000000 +0000 | ||
| 4 | +++ libgtkhtml/css/cssmatcher.c 2006-02-05 18:19:15.000000000 +0000 | ||
| 5 | @@ -79,7 +79,7 @@ css_matcher_match_simple_selector (CssSi | ||
| 6 | element_name = html_atom_list_get_atom (html_atom_list, node->name); | ||
| 7 | |||
| 8 | /* Look at the element name */ | ||
| 9 | - if (!simple->is_star && simple->element_name != element_name) | ||
| 10 | + if ((!simple->is_star) && (simple->element_name != element_name)) | ||
| 11 | return FALSE; | ||
| 12 | |||
| 13 | str = xmlGetProp (node, "id"); | ||
| 14 | @@ -2384,7 +2384,7 @@ css_matcher_sheet_stream_close (HtmlStre | ||
| 15 | CssStylesheet *ss; | ||
| 16 | |||
| 17 | if (html_stream_get_written (stream) != 0) { | ||
| 18 | - ss = css_parser_parse_stylesheet (context->str->str, context->str->len); | ||
| 19 | + ss = css_parser_parse_stylesheet (context->str->str, context->str->len, NULL); | ||
| 20 | |||
| 21 | context->stat->s.import_rule.fetched = TRUE; | ||
| 22 | |||
| 23 | @@ -2781,7 +2781,7 @@ css_matcher_get_style (HtmlDocument *doc | ||
| 24 | css_matcher_html_to_css (doc, style, node); | ||
| 25 | |||
| 26 | if (!default_stylesheet) { | ||
| 27 | - default_stylesheet = css_parser_parse_stylesheet (html_css, strlen (html_css)); | ||
| 28 | + default_stylesheet = css_parser_parse_stylesheet (html_css, strlen (html_css), NULL); | ||
| 29 | } | ||
| 30 | |||
| 31 | css_matcher_apply_stylesheet (doc, default_stylesheet, node, &declaration_list, CSS_STYLESHEET_DEFAULT, pseudo); | ||
| 32 | @@ -2800,7 +2800,7 @@ css_matcher_get_style (HtmlDocument *doc | ||
| 33 | prop = xmlGetProp (node, "style"); | ||
| 34 | |||
| 35 | if (prop) { | ||
| 36 | - CssRuleset *rs = css_parser_parse_style_attr (prop, strlen (prop)); | ||
| 37 | + CssRuleset *rs = css_parser_parse_style_attr (prop, strlen (prop), NULL); | ||
| 38 | gint i; | ||
| 39 | |||
| 40 | if (rs) { | ||
| 41 | Index: libgtkhtml/css/cssparser.c | ||
| 42 | =================================================================== | ||
| 43 | --- libgtkhtml/css/cssparser.c.orig 2006-02-04 20:10:47.000000000 +0000 | ||
| 44 | +++ libgtkhtml/css/cssparser.c 2006-02-05 18:19:15.000000000 +0000 | ||
| 45 | @@ -49,7 +49,7 @@ const gchar *css_dimensions[] = { | ||
| 46 | |||
| 47 | const gint css_n_dimensions = sizeof (css_dimensions) / sizeof (css_dimensions[0]); | ||
| 48 | |||
| 49 | -static gint css_parser_parse_value (const gchar *buffer, gint start_pos, gint end_pos, CssValue **ret_val); | ||
| 50 | +static gint css_parser_parse_value (const gchar *buffer, gint start_pos, gint end_pos, CssValue **ret_val, const gchar *base_url); | ||
| 51 | |||
| 52 | /* FIXME: Needs more whitespace types */ | ||
| 53 | static gint | ||
| 54 | @@ -443,7 +443,7 @@ css_parser_parse_number (const gchar *bu | ||
| 55 | } | ||
| 56 | |||
| 57 | static gint | ||
| 58 | -css_parser_parse_term (const gchar *buffer, gint start_pos, gint end_pos, CssValue **ret_val) | ||
| 59 | +css_parser_parse_term (const gchar *buffer, gint start_pos, gint end_pos, CssValue **ret_val, const gchar *base_url) | ||
| 60 | { | ||
| 61 | gint pos; | ||
| 62 | HtmlAtom atom; | ||
| 63 | @@ -481,7 +481,7 @@ css_parser_parse_term (const gchar *buff | ||
| 64 | return -1; | ||
| 65 | } | ||
| 66 | |||
| 67 | - pos = css_parser_parse_value (buffer, save_pos + 1, func_end, &val); | ||
| 68 | + pos = css_parser_parse_value (buffer, save_pos + 1, func_end, &val, base_url); | ||
| 69 | |||
| 70 | if (pos == -1) { | ||
| 71 | /* | ||
| 72 | @@ -495,10 +495,48 @@ css_parser_parse_term (const gchar *buff | ||
| 73 | pos = func_end; | ||
| 74 | } | ||
| 75 | if (pos != -1) { | ||
| 76 | - if (ret_val) | ||
| 77 | + if (ret_val) { | ||
| 78 | *ret_val = css_value_function_new (atom, val); | ||
| 79 | - else | ||
| 80 | + | ||
| 81 | + if ((*ret_val)->v.function->name == HTML_ATOM_URL && | ||
| 82 | + (*ret_val)->v.function->args) { | ||
| 83 | + gchar *str = css_value_to_string ((*ret_val)->v.function->args); | ||
| 84 | + | ||
| 85 | + if (base_url && str) { | ||
| 86 | + regex_t reg; | ||
| 87 | + | ||
| 88 | + regcomp (®, "^[a-zA-Z][a-zA-Z0-9.+-]*:", REG_NOSUB); | ||
| 89 | + if (((*ret_val)->v.function->args->v.s[0] != '/') && (regexec (®, (*ret_val)->v.function->args->v.s, 0, NULL, 0))) { | ||
| 90 | + gchar *temp_base, *eptr; | ||
| 91 | + | ||
| 92 | + temp_base = g_strdup(base_url); | ||
| 93 | + eptr = strrchr(temp_base, '?'); | ||
| 94 | + | ||
| 95 | + if (eptr != NULL) | ||
| 96 | + *eptr = '\0'; | ||
| 97 | + | ||
| 98 | + eptr = strrchr(temp_base, '/'); | ||
| 99 | + if (eptr != NULL) { | ||
| 100 | + gchar *temp_arg = g_strdup((*ret_val)->v.function->args->v.s); | ||
| 101 | + | ||
| 102 | + *eptr = '\0'; | ||
| 103 | + | ||
| 104 | + g_free((*ret_val)->v.function->args->v.s); | ||
| 105 | + (*ret_val)->v.function->args->v.s = g_strconcat(temp_base, "/", temp_arg, NULL); | ||
| 106 | + g_free(temp_arg); | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + g_free(temp_base); | ||
| 110 | + } | ||
| 111 | + regfree (®); | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + g_free (str); | ||
| 115 | + } | ||
| 116 | + } | ||
| 117 | + else { | ||
| 118 | css_value_unref (val); | ||
| 119 | + } | ||
| 120 | } | ||
| 121 | |||
| 122 | /* This is due to the ) */ | ||
| 123 | @@ -566,7 +604,7 @@ css_parser_parse_term (const gchar *buff | ||
| 124 | } | ||
| 125 | |||
| 126 | static gint | ||
| 127 | -css_parser_parse_value (const gchar *buffer, gint start_pos, gint end_pos, CssValue **ret_val) | ||
| 128 | +css_parser_parse_value (const gchar *buffer, gint start_pos, gint end_pos, CssValue **ret_val, const gchar *base_url) | ||
| 129 | { | ||
| 130 | gint pos = start_pos; | ||
| 131 | gint n = 0; | ||
| 132 | @@ -589,7 +627,7 @@ css_parser_parse_value (const gchar *buf | ||
| 133 | css_value_list_append (list, term, list_sep); | ||
| 134 | } | ||
| 135 | |||
| 136 | - pos = css_parser_parse_term (buffer, pos, end_pos, &term); | ||
| 137 | + pos = css_parser_parse_term (buffer, pos, end_pos, &term, base_url); | ||
| 138 | |||
| 139 | if (pos == -1) { | ||
| 140 | if (list) | ||
| 141 | @@ -618,7 +656,7 @@ css_parser_parse_value (const gchar *buf | ||
| 142 | } | ||
| 143 | else { | ||
| 144 | /* Try and parse the term to see if it's valid */ | ||
| 145 | - if (css_parser_parse_term (buffer, pos, end_pos, NULL) == -1) { | ||
| 146 | + if (css_parser_parse_term (buffer, pos, end_pos, NULL, base_url) == -1) { | ||
| 147 | if (term) | ||
| 148 | css_value_unref (term); | ||
| 149 | if (list) | ||
| 150 | @@ -1005,7 +1043,7 @@ css_parser_parse_selectors (const gchar | ||
| 151 | } | ||
| 152 | |||
| 153 | static gint | ||
| 154 | -css_parser_parse_declaration (const gchar *buffer, gint start_pos, gint end_pos, CssDeclaration **ret_val) | ||
| 155 | +css_parser_parse_declaration (const gchar *buffer, gint start_pos, gint end_pos, CssDeclaration **ret_val, const gchar *base_url) | ||
| 156 | { | ||
| 157 | CssValue *value; | ||
| 158 | CssDeclaration *result; | ||
| 159 | @@ -1040,7 +1078,7 @@ css_parser_parse_declaration (const gcha | ||
| 160 | |||
| 161 | pos = css_parser_parse_whitespace (buffer, pos, prio_pos); | ||
| 162 | |||
| 163 | - pos = css_parser_parse_value (buffer, pos, prio_pos, &value); | ||
| 164 | + pos = css_parser_parse_value (buffer, pos, prio_pos, &value, base_url); | ||
| 165 | |||
| 166 | if (pos == -1) { | ||
| 167 | return end_pos; | ||
| 168 | @@ -1063,7 +1101,7 @@ css_parser_parse_declaration (const gcha | ||
| 169 | } | ||
| 170 | |||
| 171 | static CssDeclaration ** | ||
| 172 | -css_parser_parse_declarations (const gchar *buffer, gint start_pos, gint end_pos, gint *num_decl) | ||
| 173 | +css_parser_parse_declarations (const gchar *buffer, gint start_pos, gint end_pos, gint *num_decl, const gchar *base_url) | ||
| 174 | { | ||
| 175 | gint pos = start_pos; | ||
| 176 | gint cur_pos = start_pos; | ||
| 177 | @@ -1079,7 +1117,7 @@ css_parser_parse_declarations (const gch | ||
| 178 | |||
| 179 | pos = css_parser_parse_to_char (buffer, ';', pos, end_pos); | ||
| 180 | |||
| 181 | - pos = css_parser_parse_declaration (buffer, cur_pos, pos, &declaration); | ||
| 182 | + pos = css_parser_parse_declaration (buffer, cur_pos, pos, &declaration, base_url); | ||
| 183 | |||
| 184 | if (declaration) { | ||
| 185 | if (n_decl == n_decl_max) | ||
| 186 | @@ -1100,7 +1138,7 @@ css_parser_parse_declarations (const gch | ||
| 187 | } | ||
| 188 | |||
| 189 | static gint | ||
| 190 | -css_parser_parse_ruleset (const gchar *buffer, gint start_pos, gint end_pos, CssRuleset **ret_val) | ||
| 191 | +css_parser_parse_ruleset (const gchar *buffer, gint start_pos, gint end_pos, CssRuleset **ret_val, const gchar *base_url) | ||
| 192 | { | ||
| 193 | gint cur_pos; | ||
| 194 | gint pos; | ||
| 195 | @@ -1143,7 +1181,7 @@ css_parser_parse_ruleset (const gchar *b | ||
| 196 | } | ||
| 197 | cur_pos = css_parser_parse_whitespace (buffer, cur_pos, end_pos); | ||
| 198 | |||
| 199 | - decl = css_parser_parse_declarations (buffer, cur_pos, pos, &n_decl); | ||
| 200 | + decl = css_parser_parse_declarations (buffer, cur_pos, pos, &n_decl, base_url); | ||
| 201 | |||
| 202 | pos++; | ||
| 203 | |||
| 204 | @@ -1186,7 +1224,8 @@ css_parser_prepare_stylesheet (const gch | ||
| 205 | } | ||
| 206 | else if (str[pos] == '/' && | ||
| 207 | pos + 1 <= len && | ||
| 208 | - str[pos + 1] == '/') { | ||
| 209 | + str[pos + 1] == '/' && | ||
| 210 | + (pos == 0 || str[pos-1] != ':')) { | ||
| 211 | while (pos < len && | ||
| 212 | str[pos] != '\n') | ||
| 213 | pos++; | ||
| 214 | @@ -1204,7 +1243,7 @@ css_parser_prepare_stylesheet (const gch | ||
| 215 | } | ||
| 216 | |||
| 217 | static gint | ||
| 218 | -css_parser_parse_atkeyword (const gchar *buffer, gint start_pos, gint end_pos, CssStatement **ret_val) | ||
| 219 | +css_parser_parse_atkeyword (const gchar *buffer, gint start_pos, gint end_pos, CssStatement **ret_val, const gchar *base_url) | ||
| 220 | { | ||
| 221 | gint pos = start_pos; | ||
| 222 | gint tmp_pos, cur_pos; | ||
| 223 | @@ -1257,14 +1296,14 @@ css_parser_parse_atkeyword (const gchar | ||
| 224 | tmp_pos++; | ||
| 225 | |||
| 226 | |||
| 227 | - rs = g_new (CssRuleset *, n_rs_max); | ||
| 228 | + rs = g_new0 (CssRuleset *, n_rs_max); | ||
| 229 | |||
| 230 | /* g_print ("wheee: \"%s\"\n", g_strndup (buffer + cur_pos, tmp_pos - cur_pos )); */ | ||
| 231 | pos = cur_pos; | ||
| 232 | while (pos < tmp_pos) { | ||
| 233 | CssRuleset *ruleset; | ||
| 234 | |||
| 235 | - pos = css_parser_parse_ruleset (buffer, pos, tmp_pos, &ruleset); | ||
| 236 | + pos = css_parser_parse_ruleset (buffer, pos, tmp_pos, &ruleset, base_url); | ||
| 237 | |||
| 238 | if (n_rs == n_rs_max) | ||
| 239 | rs = g_realloc (rs, sizeof (CssRuleset *) * | ||
| 240 | @@ -1277,7 +1316,7 @@ css_parser_parse_atkeyword (const gchar | ||
| 241 | |||
| 242 | pos = css_parser_parse_whitespace (buffer, tmp_pos + 1, end_pos); | ||
| 243 | |||
| 244 | - result = g_new (CssStatement, 1); | ||
| 245 | + result = g_new0 (CssStatement, 1); | ||
| 246 | result->type = CSS_MEDIA_RULE; | ||
| 247 | result->s.media_rule.rs = rs; | ||
| 248 | result->s.media_rule.n_rs = n_rs; | ||
| 249 | @@ -1318,11 +1357,11 @@ css_parser_parse_atkeyword (const gchar | ||
| 250 | |||
| 251 | pos = css_parser_parse_whitespace (buffer, pos, cur_pos); | ||
| 252 | |||
| 253 | - decl = css_parser_parse_declarations (buffer, pos, cur_pos, &n_decl); | ||
| 254 | + decl = css_parser_parse_declarations (buffer, pos, cur_pos, &n_decl, base_url); | ||
| 255 | |||
| 256 | g_print ("N_decl is: %d\n", n_decl); | ||
| 257 | |||
| 258 | - result = g_new (CssStatement, 1); | ||
| 259 | + result = g_new0 (CssStatement, 1); | ||
| 260 | result->type = CSS_PAGE_RULE; | ||
| 261 | result->s.page_rule.name = name; | ||
| 262 | result->s.page_rule.pseudo = pseudo; | ||
| 263 | @@ -1337,8 +1376,8 @@ css_parser_parse_atkeyword (const gchar | ||
| 264 | pos = css_parser_parse_whitespace (buffer, pos + 1, end_pos); | ||
| 265 | cur_pos = css_parser_parse_to_char (buffer, '}', pos, end_pos); | ||
| 266 | |||
| 267 | - decl = css_parser_parse_declarations (buffer, pos, cur_pos, &n_decl); | ||
| 268 | - result = g_new (CssStatement, 1); | ||
| 269 | + decl = css_parser_parse_declarations (buffer, pos, cur_pos, &n_decl, base_url); | ||
| 270 | + result = g_new0 (CssStatement, 1); | ||
| 271 | result->type = CSS_FONT_FACE_RULE; | ||
| 272 | |||
| 273 | result->s.font_face_rule.n_decl = n_decl; | ||
| 274 | @@ -1349,8 +1388,61 @@ css_parser_parse_atkeyword (const gchar | ||
| 275 | return cur_pos + 1; | ||
| 276 | |||
| 277 | break; | ||
| 278 | + case HTML_ATOM_IMPORT: { | ||
| 279 | + gchar *import_url; | ||
| 280 | + const gchar *s_url, *e_url; | ||
| 281 | + | ||
| 282 | + cur_pos = css_parser_parse_to_char (buffer, ';', pos, end_pos); | ||
| 283 | + | ||
| 284 | + if (strchr (buffer + pos, '(')) { | ||
| 285 | + s_url = strchr (buffer + pos, '('); | ||
| 286 | + e_url = strchr (s_url, ')'); | ||
| 287 | + } else if (strchr (buffer + pos, '\"')) { | ||
| 288 | + s_url = strchr (buffer + pos, '\"'); | ||
| 289 | + e_url = strchr (s_url + 1, '\"'); | ||
| 290 | + } else if (strchr (buffer + pos, '\'')) { | ||
| 291 | + s_url = strchr (buffer + pos, '\''); | ||
| 292 | + e_url = strchr (s_url + 1, '\''); | ||
| 293 | + } | ||
| 294 | + | ||
| 295 | + if (!s_url || !e_url || ((e_url - s_url) < 1)) { | ||
| 296 | + g_warning ("Invalid @import line"); | ||
| 297 | + *ret_val = NULL; | ||
| 298 | + return cur_pos + 1; | ||
| 299 | + } | ||
| 300 | + | ||
| 301 | + s_url++; | ||
| 302 | + e_url--; | ||
| 303 | + | ||
| 304 | + if ((*s_url == '\"') && (*e_url == '\"')) { | ||
| 305 | + s_url++; | ||
| 306 | + e_url--; | ||
| 307 | + } else if ((*s_url == '\'') && (*e_url == '\'')) { | ||
| 308 | + s_url++; | ||
| 309 | + e_url--; | ||
| 310 | + } | ||
| 311 | + | ||
| 312 | + if (s_url > e_url) { | ||
| 313 | + g_warning ("Invalid @import line"); | ||
| 314 | + *ret_val = NULL; | ||
| 315 | + return cur_pos + 1; | ||
| 316 | + } | ||
| 317 | + | ||
| 318 | + import_url = g_strndup (s_url, strlen (s_url) - strlen (e_url) + 1); | ||
| 319 | + | ||
| 320 | + result = g_new0 (CssStatement, 1); | ||
| 321 | + result->type = CSS_IMPORT_RULE; | ||
| 322 | |||
| 323 | + result->s.import_rule.url = css_value_string_new (import_url); | ||
| 324 | + | ||
| 325 | + *ret_val = result; | ||
| 326 | + | ||
| 327 | + return cur_pos + 1; | ||
| 328 | + | ||
| 329 | + break; | ||
| 330 | + } | ||
| 331 | default: | ||
| 332 | + g_warning ("Unhandled keyword %d - %s", keyword, buffer); | ||
| 333 | /* Unknown keyword detected, skip to next block */ | ||
| 334 | while (pos < end_pos) { | ||
| 335 | /* Handle a dangling semi-colon */ | ||
| 336 | @@ -1373,7 +1465,7 @@ css_parser_parse_atkeyword (const gchar | ||
| 337 | } | ||
| 338 | |||
| 339 | CssRuleset * | ||
| 340 | -css_parser_parse_style_attr (const gchar *buffer, gint len) | ||
| 341 | +css_parser_parse_style_attr (const gchar *buffer, gint len, const gchar *base_url) | ||
| 342 | { | ||
| 343 | CssRuleset *result; | ||
| 344 | |||
| 345 | @@ -1382,7 +1474,7 @@ css_parser_parse_style_attr (const gchar | ||
| 346 | |||
| 347 | /* FIXME: Are comments allowed here? */ | ||
| 348 | |||
| 349 | - decl = css_parser_parse_declarations (buffer, 0, len, &n_decl); | ||
| 350 | + decl = css_parser_parse_declarations (buffer, 0, len, &n_decl, base_url); | ||
| 351 | |||
| 352 | if (!decl) | ||
| 353 | return NULL; | ||
| 354 | @@ -1397,9 +1489,8 @@ css_parser_parse_style_attr (const gchar | ||
| 355 | } | ||
| 356 | |||
| 357 | CssStylesheet * | ||
| 358 | -css_parser_parse_stylesheet (const gchar *str, gint len) | ||
| 359 | +css_parser_parse_stylesheet (const gchar *str, gint len, const gchar *base_url) | ||
| 360 | { | ||
| 361 | - CssStatement *statement; | ||
| 362 | CssStylesheet *result; | ||
| 363 | GSList *stat = NULL; | ||
| 364 | gchar *buffer; | ||
| 365 | @@ -1413,26 +1504,23 @@ css_parser_parse_stylesheet (const gchar | ||
| 366 | end_pos = len; | ||
| 367 | while (pos < len) { | ||
| 368 | if (buffer[pos] == '@') { | ||
| 369 | - pos = css_parser_parse_atkeyword (buffer, pos + 1, len, &statement); | ||
| 370 | -#if 0 | ||
| 371 | - if (statement) { | ||
| 372 | - if (n_stat == n_stat_max) | ||
| 373 | - stat = g_realloc (stat, sizeof (CssStatement) * | ||
| 374 | - (n_stat_max <<= 1)); | ||
| 375 | - stat[n_stat++] = statement; | ||
| 376 | + CssStatement *atstatement = NULL; | ||
| 377 | + pos = css_parser_parse_atkeyword (buffer, pos + 1, len, &atstatement, base_url); | ||
| 378 | + if (atstatement) { | ||
| 379 | + stat = g_slist_append (stat, atstatement); | ||
| 380 | } | ||
| 381 | -#endif | ||
| 382 | } | ||
| 383 | else { | ||
| 384 | CssRuleset *ruleset; | ||
| 385 | - pos = css_parser_parse_ruleset (buffer, pos, end_pos, &ruleset); | ||
| 386 | + pos = css_parser_parse_ruleset (buffer, pos, end_pos, &ruleset, base_url); | ||
| 387 | |||
| 388 | if (ruleset) { | ||
| 389 | - statement = g_new (CssStatement, 1); | ||
| 390 | - statement->type = CSS_RULESET; | ||
| 391 | - statement->s.ruleset = ruleset; | ||
| 392 | + CssStatement *rulestatement; | ||
| 393 | + rulestatement = g_new0 (CssStatement, 1); | ||
| 394 | + rulestatement->type = CSS_RULESET; | ||
| 395 | + rulestatement->s.ruleset = ruleset; | ||
| 396 | |||
| 397 | - stat = g_slist_append (stat, statement); | ||
| 398 | + stat = g_slist_append (stat, rulestatement); | ||
| 399 | } | ||
| 400 | |||
| 401 | if (pos == -1) | ||
| 402 | @@ -1444,7 +1532,7 @@ css_parser_parse_stylesheet (const gchar | ||
| 403 | |||
| 404 | g_free (buffer); | ||
| 405 | |||
| 406 | - result = g_new (CssStylesheet, 1); | ||
| 407 | + result = g_new0 (CssStylesheet, 1); | ||
| 408 | result->stat = stat; | ||
| 409 | |||
| 410 | return result; | ||
| 411 | Index: libgtkhtml/css/cssparser.h | ||
| 412 | =================================================================== | ||
| 413 | --- libgtkhtml/css/cssparser.h.orig 2006-02-04 20:10:47.000000000 +0000 | ||
| 414 | +++ libgtkhtml/css/cssparser.h 2006-02-05 18:19:15.000000000 +0000 | ||
| 415 | @@ -24,13 +24,14 @@ | ||
| 416 | #define __CSSPARSER_H__ | ||
| 417 | |||
| 418 | #include <glib.h> | ||
| 419 | +#include <regex.h> | ||
| 420 | |||
| 421 | #include "cssstylesheet.h" | ||
| 422 | |||
| 423 | G_BEGIN_DECLS | ||
| 424 | |||
| 425 | -CssStylesheet *css_parser_parse_stylesheet (const gchar *str, gint len); | ||
| 426 | -CssRuleset *css_parser_parse_style_attr (const gchar *buffer, gint len); | ||
| 427 | +CssStylesheet *css_parser_parse_stylesheet (const gchar *str, gint len, const gchar *base_url); | ||
| 428 | +CssRuleset *css_parser_parse_style_attr (const gchar *buffer, gint len, const gchar *base_url); | ||
| 429 | |||
| 430 | G_END_DECLS | ||
| 431 | |||
| 432 | Index: libgtkhtml/css/cssstylesheet.h | ||
| 433 | =================================================================== | ||
| 434 | --- libgtkhtml/css/cssstylesheet.h.orig 2006-02-04 20:10:47.000000000 +0000 | ||
| 435 | +++ libgtkhtml/css/cssstylesheet.h 2006-02-05 18:19:15.000000000 +0000 | ||
| 436 | @@ -181,6 +181,7 @@ struct _CssTail { | ||
| 437 | }; | ||
| 438 | |||
| 439 | struct _CssStylesheet { | ||
| 440 | + gchar *url; | ||
| 441 | gboolean disabled; | ||
| 442 | GSList *stat; | ||
| 443 | }; | ||
| 444 | Index: libgtkhtml/css/cssvalue.c | ||
| 445 | =================================================================== | ||
| 446 | --- libgtkhtml/css/cssvalue.c.orig 2006-02-04 20:10:47.000000000 +0000 | ||
| 447 | +++ libgtkhtml/css/cssvalue.c 2006-02-04 20:13:33.000000000 +0000 | ||
| 448 | @@ -64,7 +64,7 @@ css_value_function_new (HtmlAtom name, C | ||
| 449 | function->name = name; | ||
| 450 | function->args = args; | ||
| 451 | |||
| 452 | - result = g_new (CssValue, 1); | ||
| 453 | + result = g_new0 (CssValue, 1); | ||
| 454 | result->ref_count = 1; | ||
| 455 | result->value_type = CSS_FUNCTION; | ||
| 456 | result->v.function = function; | ||
| 457 | Index: libgtkhtml/document/htmldocument.c | ||
| 458 | =================================================================== | ||
| 459 | --- libgtkhtml/document/htmldocument.c.orig 2006-02-04 20:10:47.000000000 +0000 | ||
| 460 | +++ libgtkhtml/document/htmldocument.c 2006-02-05 18:19:17.000000000 +0000 | ||
| 461 | @@ -134,14 +134,42 @@ static void | ||
| 462 | html_document_stylesheet_stream_close (const gchar *buffer, gint len, gpointer data) | ||
| 463 | { | ||
| 464 | CssStylesheet *sheet; | ||
| 465 | - HtmlDocument *document = HTML_DOCUMENT (data); | ||
| 466 | + HtmlDocumentStreamData *stream_data = (HtmlDocumentStreamData *) data; | ||
| 467 | + HtmlDocument *document = stream_data->document; | ||
| 468 | HtmlStyleChange style_change; | ||
| 469 | - | ||
| 470 | + GSList *list; | ||
| 471 | + | ||
| 472 | if (!buffer) | ||
| 473 | return; | ||
| 474 | |||
| 475 | - sheet = css_parser_parse_stylesheet (buffer, len); | ||
| 476 | + sheet = css_parser_parse_stylesheet (buffer, len, (gchar *) stream_data->internal_data); | ||
| 477 | + g_free(stream_data->internal_data); | ||
| 478 | + stream_data->internal_data = NULL; | ||
| 479 | + | ||
| 480 | + for (list = sheet->stat; list; list = list->next) { | ||
| 481 | + CssStatement *statement = list->data; | ||
| 482 | + HtmlStream *stream; | ||
| 483 | + | ||
| 484 | + switch (statement->type) { | ||
| 485 | + case CSS_IMPORT_RULE: { | ||
| 486 | + HtmlDocumentStreamData *stream_data_import; | ||
| 487 | + gchar *url; | ||
| 488 | + | ||
| 489 | + url = css_value_to_string (statement->s.import_rule.url); | ||
| 490 | + stream_data_import = g_new (HtmlDocumentStreamData, 1); | ||
| 491 | + stream_data_import->document = stream_data->document; | ||
| 492 | + stream_data_import->internal_data = g_strdup(url); | ||
| 493 | + stream = html_stream_buffer_new (html_document_stylesheet_stream_close, stream_data_import); | ||
| 494 | + g_signal_emit (G_OBJECT (document), document_signals [REQUEST_URL], 0, url, stream); | ||
| 495 | + g_free (url); | ||
| 496 | + break; | ||
| 497 | + } | ||
| 498 | + default: | ||
| 499 | + break; | ||
| 500 | + } | ||
| 501 | + } | ||
| 502 | |||
| 503 | + g_free (stream_data); | ||
| 504 | document->stylesheets = g_slist_append (document->stylesheets, sheet); | ||
| 505 | |||
| 506 | /* Restyle the document */ | ||
| 507 | @@ -179,9 +207,15 @@ html_document_node_inserted_traverser (H | ||
| 508 | |||
| 509 | if (str && (strcasecmp (str, "stylesheet") == 0)) { | ||
| 510 | gchar *url = xmlGetProp (node->xmlnode, "href"); | ||
| 511 | - | ||
| 512 | if (url) { | ||
| 513 | - HtmlStream *stream = html_stream_buffer_new (html_document_stylesheet_stream_close, document); | ||
| 514 | + HtmlDocumentStreamData *stream_data; | ||
| 515 | + HtmlStream *stream; | ||
| 516 | + | ||
| 517 | + stream_data = g_new (HtmlDocumentStreamData, 1); | ||
| 518 | + stream_data->document = document; | ||
| 519 | + stream_data->internal_data = g_strdup(url); | ||
| 520 | + | ||
| 521 | + stream = html_stream_buffer_new (html_document_stylesheet_stream_close, stream_data); | ||
| 522 | |||
| 523 | g_signal_emit (G_OBJECT (document), document_signals [REQUEST_URL], 0, url, stream); | ||
| 524 | } | ||
| 525 | @@ -242,12 +276,39 @@ html_document_node_inserted_traverser (H | ||
| 526 | |||
| 527 | CssStylesheet *ss; | ||
| 528 | HtmlStyleChange style_change; | ||
| 529 | - | ||
| 530 | - ss = css_parser_parse_stylesheet (node->xmlnode->content, strlen (node->xmlnode->content)); | ||
| 531 | - document->stylesheets = g_slist_append (document->stylesheets, ss); | ||
| 532 | + GSList *list; | ||
| 533 | + | ||
| 534 | + ss = css_parser_parse_stylesheet (node->xmlnode->content, strlen (node->xmlnode->content), NULL); | ||
| 535 | + | ||
| 536 | + for (list = ss->stat; list; list = list->next) { | ||
| 537 | + CssStatement *statement = list->data; | ||
| 538 | + HtmlStream *stream; | ||
| 539 | + | ||
| 540 | + switch (statement->type) { | ||
| 541 | + case CSS_IMPORT_RULE: { | ||
| 542 | + gchar *cssurl; | ||
| 543 | + HtmlDocumentStreamData *stream_data; | ||
| 544 | + | ||
| 545 | + cssurl = css_value_to_string (statement->s.import_rule.url); | ||
| 546 | + | ||
| 547 | + stream_data = g_new (HtmlDocumentStreamData, 1); | ||
| 548 | + stream_data->document = document; | ||
| 549 | + stream_data->internal_data = g_strdup(cssurl); | ||
| 550 | + | ||
| 551 | + stream = html_stream_buffer_new (html_document_stylesheet_stream_close, stream_data); | ||
| 552 | + g_signal_emit (G_OBJECT (document), document_signals [REQUEST_URL], 0, cssurl, stream); | ||
| 553 | + g_free (cssurl); | ||
| 554 | + break; | ||
| 555 | + } | ||
| 556 | + default: | ||
| 557 | + break; | ||
| 558 | + } | ||
| 559 | + } | ||
| 560 | + | ||
| 561 | + document->stylesheets = g_slist_append ( document->stylesheets, ss); | ||
| 562 | |||
| 563 | /* Restyle the document */ | ||
| 564 | - style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), NULL, TRUE); | ||
| 565 | + style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement ( document->dom_document)), NULL, TRUE); | ||
| 566 | g_signal_emit (G_OBJECT (document), document_signals [STYLE_UPDATED], 0, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), style_change); | ||
| 567 | } | ||
| 568 | else if ((node->xmlnode->type == XML_TEXT_NODE || node->xmlnode->type == XML_COMMENT_NODE) && node->xmlnode->parent && strcasecmp (node->xmlnode->parent->name, "script") == 0) { | ||
| 569 | Index: libgtkhtml/document/htmldocument.h | ||
| 570 | =================================================================== | ||
| 571 | --- libgtkhtml/document/htmldocument.h.orig 2006-02-04 20:10:47.000000000 +0000 | ||
| 572 | +++ libgtkhtml/document/htmldocument.h 2006-02-05 18:19:17.000000000 +0000 | ||
| 573 | @@ -25,6 +25,7 @@ | ||
| 574 | |||
| 575 | typedef struct _HtmlDocument HtmlDocument; | ||
| 576 | typedef struct _HtmlDocumentClass HtmlDocumentClass; | ||
| 577 | +typedef struct _HtmlDocumentStreamData HtmlDocumentStreamData; | ||
| 578 | |||
| 579 | #include <gtk/gtk.h> | ||
| 580 | |||
| 581 | @@ -93,6 +94,10 @@ struct _HtmlDocumentClass { | ||
| 582 | gboolean (*dom_mouse_out) (HtmlDocument *document, DomEvent *event); | ||
| 583 | }; | ||
| 584 | |||
| 585 | +struct _HtmlDocumentStreamData { | ||
| 586 | + HtmlDocument *document; | ||
| 587 | + gpointer internal_data; | ||
| 588 | +}; | ||
| 589 | |||
| 590 | GType html_document_get_type (void); | ||
| 591 | |||
| 592 | Index: libgtkhtml/layout/htmlboxblock.c | ||
| 593 | =================================================================== | ||
| 594 | --- libgtkhtml/layout/htmlboxblock.c.orig 2006-02-04 20:10:47.000000000 +0000 | ||
| 595 | +++ libgtkhtml/layout/htmlboxblock.c 2006-02-04 20:13:33.000000000 +0000 | ||
| 596 | @@ -100,17 +100,21 @@ html_real_box_block_update_geometry (Htm | ||
| 597 | HtmlBoxBlock *block = HTML_BOX_BLOCK (self); | ||
| 598 | gint full_width; | ||
| 599 | |||
| 600 | +#if 0 | ||
| 601 | if (relayout->get_min_width || relayout->get_max_width) { | ||
| 602 | +#endif | ||
| 603 | |||
| 604 | /* Only expand the width of the block box if the width is of type "auto" */ | ||
| 605 | if (HTML_BOX_GET_STYLE (self)->box->width.type == HTML_LENGTH_AUTO && line->width > *boxwidth) { | ||
| 606 | - | ||
| 607 | + | ||
| 608 | *boxwidth = line->width; | ||
| 609 | block->containing_width = line->width; | ||
| 610 | self->width = *boxwidth + html_box_horizontal_mbp_sum (self); | ||
| 611 | block->force_relayout = TRUE; | ||
| 612 | } | ||
| 613 | +#if 0 | ||
| 614 | } | ||
| 615 | +#endif | ||
| 616 | full_width = MAX (line->width, line->full_width); | ||
| 617 | |||
| 618 | if (full_width > block->full_width) | ||
| 619 | Index: libgtkhtml/view/htmlevent.c | ||
| 620 | =================================================================== | ||
| 621 | --- libgtkhtml/view/htmlevent.c.orig 2006-02-04 20:10:47.000000000 +0000 | ||
| 622 | +++ libgtkhtml/view/htmlevent.c 2006-02-04 20:13:33.000000000 +0000 | ||
| 623 | @@ -46,14 +46,48 @@ html_event_find_parent_dom_node (HtmlBox | ||
| 624 | static gboolean | ||
| 625 | html_event_xy_in_box (HtmlBox *box, gint tx, gint ty, gint x, gint y) | ||
| 626 | { | ||
| 627 | + gint ox, oy; | ||
| 628 | + gboolean rv; | ||
| 629 | + | ||
| 630 | + ox = box->x; | ||
| 631 | + oy = box->y; | ||
| 632 | + | ||
| 633 | + rv = TRUE; | ||
| 634 | + | ||
| 635 | + if ((HTML_BOX_GET_STYLE (box)->position == HTML_POSITION_RELATIVE || | ||
| 636 | + HTML_BOX_GET_STYLE (box)->position == HTML_POSITION_ABSOLUTE)) { | ||
| 637 | + gint width = html_box_get_containing_block_width (box); | ||
| 638 | + gint height = html_box_get_containing_block_height (box); | ||
| 639 | + | ||
| 640 | + if (HTML_BOX_GET_STYLE (box)->surround->position.left.type != HTML_LENGTH_AUTO) | ||
| 641 | + box->x += html_length_get_value (&HTML_BOX_GET_STYLE (box)->surround->position.left, width); | ||
| 642 | + else if (HTML_BOX_GET_STYLE (box)->surround->position.right.type != HTML_LENGTH_AUTO) { | ||
| 643 | + if (HTML_BOX_GET_STYLE (box)->display == HTML_DISPLAY_INLINE) | ||
| 644 | + box->x -= html_length_get_value (&HTML_BOX_GET_STYLE (box)->surround->position.right, width); | ||
| 645 | + else | ||
| 646 | + box->x += width - box->width - html_length_get_value (&HTML_BOX_GET_STYLE (box)->surround->position.right, width); | ||
| 647 | + } | ||
| 648 | + if (HTML_BOX_GET_STYLE (box)->surround->position.top.type != HTML_LENGTH_AUTO) | ||
| 649 | + box->y += html_length_get_value (&HTML_BOX_GET_STYLE (box)->surround->position.top, height); | ||
| 650 | + | ||
| 651 | + else if (HTML_BOX_GET_STYLE (box)->surround->position.bottom.type != HTML_LENGTH_AUTO) { | ||
| 652 | + if (HTML_BOX_GET_STYLE (box)->display == HTML_DISPLAY_INLINE) | ||
| 653 | + box->y -= html_length_get_value (&HTML_BOX_GET_STYLE (box)->surround->position.bottom, height); | ||
| 654 | + else | ||
| 655 | + box->y += height - box->height - html_length_get_value (&HTML_BOX_GET_STYLE (box)->surround->position.bottom, height); | ||
| 656 | + } | ||
| 657 | + } | ||
| 658 | |||
| 659 | if (x < box->x + tx || | ||
| 660 | x > box->x + tx + box->width || | ||
| 661 | y < box->y + ty || | ||
| 662 | y > box->y + ty + box->height) | ||
| 663 | - return FALSE; | ||
| 664 | + rv = FALSE; | ||
| 665 | + | ||
| 666 | + box->x = ox; | ||
| 667 | + box->y = oy; | ||
| 668 | |||
| 669 | - return TRUE; | ||
| 670 | + return rv; | ||
| 671 | } | ||
| 672 | |||
| 673 | static void | ||
| 674 | @@ -64,12 +98,6 @@ html_event_find_box_traverser (HtmlBox * | ||
| 675 | box = self->children; | ||
| 676 | |||
| 677 | while (box) { | ||
| 678 | - | ||
| 679 | - /* Ignore positioned boxes, because their ->x and->y positions is not their correct positions */ | ||
| 680 | - if (HTML_BOX_GET_STYLE (box)->position != HTML_POSITION_STATIC) { | ||
| 681 | - box = box->next; | ||
| 682 | - continue; | ||
| 683 | - } | ||
| 684 | /* These boxes always has x = 0, y = 0, w = 0 and h = 0 so we have to do | ||
| 685 | * a special case for these */ | ||
| 686 | if (HTML_IS_BOX_INLINE (box) || HTML_IS_BOX_TABLE_ROW_GROUP (box) || HTML_IS_BOX_FORM (box)) { | ||
diff --git a/openembedded/packages/gtkhtml2/files/css-media.patch b/openembedded/packages/gtkhtml2/files/css-media.patch deleted file mode 100644 index c5500ca2d1..0000000000 --- a/openembedded/packages/gtkhtml2/files/css-media.patch +++ /dev/null | |||
| @@ -1,466 +0,0 @@ | |||
| 1 | Index: libgtkhtml/css/cssmatcher.c | ||
| 2 | =================================================================== | ||
| 3 | --- libgtkhtml/css/cssmatcher.c.orig 2006-02-11 05:18:03.000000000 +0000 | ||
| 4 | +++ libgtkhtml/css/cssmatcher.c 2006-02-11 05:21:28.000000000 +0000 | ||
| 5 | @@ -2411,7 +2411,8 @@ css_matcher_apply_stylesheet (HtmlDocume | ||
| 6 | CssStatement *stat = list->data; | ||
| 7 | gint j; | ||
| 8 | |||
| 9 | - if (stat->type == CSS_IMPORT_RULE) { | ||
| 10 | + switch (stat->type) { | ||
| 11 | + case CSS_IMPORT_RULE: { | ||
| 12 | if (stat->s.import_rule.fetched) { | ||
| 13 | if (stat->s.import_rule.sheet) { | ||
| 14 | css_matcher_apply_stylesheet (doc, stat->s.import_rule.sheet, node, declaration_list, type, pseudo); | ||
| 15 | @@ -2440,31 +2441,65 @@ css_matcher_apply_stylesheet (HtmlDocume | ||
| 16 | g_free (str); | ||
| 17 | #endif | ||
| 18 | } | ||
| 19 | + break; | ||
| 20 | } | ||
| 21 | - | ||
| 22 | - /* FIXME: We need to support more than just rulesets here */ | ||
| 23 | - if (stat->type != CSS_RULESET) | ||
| 24 | - continue; | ||
| 25 | - | ||
| 26 | - for (j = 0; j < stat->s.ruleset->n_sel; j++) { | ||
| 27 | - CssSelector *sel = stat->s.ruleset->sel[j]; | ||
| 28 | + | ||
| 29 | + case CSS_MEDIA_RULE: | ||
| 30 | + case CSS_RULESET: { | ||
| 31 | + CssRuleset **rs; | ||
| 32 | + gint k, l; | ||
| 33 | |||
| 34 | - if (css_matcher_match_selector (sel, node, pseudo)) { | ||
| 35 | - int i; | ||
| 36 | + if (stat->type == CSS_MEDIA_RULE) { | ||
| 37 | + CssValueEntry *entry = stat->s.media_rule.media_list->v.entry; | ||
| 38 | + const gchar *media = html_document_get_media_type (doc); | ||
| 39 | + gboolean has_media = FALSE; | ||
| 40 | |||
| 41 | - for (i = 0; i < stat->s.ruleset->n_decl; i++) { | ||
| 42 | - CssDeclaration *decl = stat->s.ruleset->decl[i]; | ||
| 43 | - CssDeclarationListEntry *entry = g_new (CssDeclarationListEntry, 1); | ||
| 44 | + if (!media) break; | ||
| 45 | + | ||
| 46 | + for (; entry; entry = entry->next) { | ||
| 47 | + const gchar *value = css_value_to_string (entry->value); | ||
| 48 | + if (strcasecmp (media, value) == 0) { | ||
| 49 | + has_media = TRUE; | ||
| 50 | + break; | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | + if (!has_media) break; | ||
| 54 | + | ||
| 55 | + rs = stat->s.media_rule.rs; | ||
| 56 | + k = stat->s.media_rule.n_rs; | ||
| 57 | + } else { | ||
| 58 | + rs = &stat->s.ruleset; | ||
| 59 | + k = 1; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + for (l = 0; l < k; l++) { | ||
| 63 | + for (j = 0; rs[l] && (j < rs[l]->n_sel); j++) { | ||
| 64 | + CssSelector *sel = rs[l]->sel[j]; | ||
| 65 | |||
| 66 | - entry->spec = sel->a * 1000000 + sel->b * 1000 + sel->c; | ||
| 67 | - entry->type = type; | ||
| 68 | - entry->decl = g_new (CssDeclaration, 1); | ||
| 69 | - entry->decl->property = decl->property; | ||
| 70 | - entry->decl->expr = css_value_ref (decl->expr); | ||
| 71 | - entry->decl->important = decl->important; | ||
| 72 | - *declaration_list = g_list_insert_sorted (*declaration_list, entry, css_declaration_list_sorter); | ||
| 73 | + if (css_matcher_match_selector (sel, node, pseudo)) { | ||
| 74 | + int i; | ||
| 75 | + | ||
| 76 | + for (i = 0; i < rs[l]->n_decl; i++) { | ||
| 77 | + CssDeclaration *decl = rs[l]->decl[i]; | ||
| 78 | + CssDeclarationListEntry *entry = g_new (CssDeclarationListEntry, 1); | ||
| 79 | + | ||
| 80 | + entry->spec = sel->a * 1000000 + sel->b * 1000 + sel->c; | ||
| 81 | + entry->type = type; | ||
| 82 | + entry->decl = g_new (CssDeclaration, 1); | ||
| 83 | + entry->decl->property = decl->property; | ||
| 84 | + entry->decl->expr = css_value_ref (decl->expr); | ||
| 85 | + entry->decl->important = decl->important; | ||
| 86 | + *declaration_list = g_list_insert_sorted (*declaration_list, entry, css_declaration_list_sorter); | ||
| 87 | + } | ||
| 88 | + } | ||
| 89 | } | ||
| 90 | } | ||
| 91 | + break; | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + default: | ||
| 95 | + g_warning ("Unhandled stylesheet"); | ||
| 96 | + break; | ||
| 97 | } | ||
| 98 | } | ||
| 99 | } | ||
| 100 | @@ -2781,7 +2816,7 @@ css_matcher_get_style (HtmlDocument *doc | ||
| 101 | css_matcher_html_to_css (doc, style, node); | ||
| 102 | |||
| 103 | if (!default_stylesheet) { | ||
| 104 | - default_stylesheet = css_parser_parse_stylesheet (html_css, strlen (html_css), NULL); | ||
| 105 | + default_stylesheet = css_parser_parse_stylesheet (html_css, strlen (html_css), NULL, NULL); | ||
| 106 | } | ||
| 107 | |||
| 108 | css_matcher_apply_stylesheet (doc, default_stylesheet, node, &declaration_list, CSS_STYLESHEET_DEFAULT, pseudo); | ||
| 109 | @@ -2800,25 +2835,31 @@ css_matcher_get_style (HtmlDocument *doc | ||
| 110 | prop = xmlGetProp (node, "style"); | ||
| 111 | |||
| 112 | if (prop) { | ||
| 113 | - CssRuleset *rs = css_parser_parse_style_attr (prop, strlen (prop), NULL); | ||
| 114 | - gint i; | ||
| 115 | + xmlChar *media_prop = xmlGetProp (node, "media"); | ||
| 116 | + const gchar *media = html_document_get_media_type (doc); | ||
| 117 | |||
| 118 | - if (rs) { | ||
| 119 | - for (i = 0; i < rs->n_decl; i++) { | ||
| 120 | - CssDeclarationListEntry *entry = g_new (CssDeclarationListEntry, 1); | ||
| 121 | - CssDeclaration *decl = rs->decl[i]; | ||
| 122 | - | ||
| 123 | - entry->type = CSS_STYLESHEET_STYLEDECL; | ||
| 124 | - entry->decl = g_new (CssDeclaration, 1); | ||
| 125 | - entry->decl->property = decl->property; | ||
| 126 | - entry->decl->expr = css_value_ref (decl->expr); | ||
| 127 | - entry->decl->important = decl->important; | ||
| 128 | - entry->spec = 0; | ||
| 129 | + if (!media_prop || (media && (strcasecmp (media, media_prop) == 0))) { | ||
| 130 | + CssRuleset *rs = css_parser_parse_style_attr (prop, strlen (prop), NULL); | ||
| 131 | + gint i; | ||
| 132 | + | ||
| 133 | + if (rs) { | ||
| 134 | + for (i = 0; i < rs->n_decl; i++) { | ||
| 135 | + CssDeclarationListEntry *entry = g_new (CssDeclarationListEntry, 1); | ||
| 136 | + CssDeclaration *decl = rs->decl[i]; | ||
| 137 | |||
| 138 | - declaration_list = g_list_insert_sorted (declaration_list, entry, css_declaration_list_sorter); | ||
| 139 | + entry->type = CSS_STYLESHEET_STYLEDECL; | ||
| 140 | + entry->decl = g_new (CssDeclaration, 1); | ||
| 141 | + entry->decl->property = decl->property; | ||
| 142 | + entry->decl->expr = css_value_ref (decl->expr); | ||
| 143 | + entry->decl->important = decl->important; | ||
| 144 | + entry->spec = 0; | ||
| 145 | + | ||
| 146 | + declaration_list = g_list_insert_sorted (declaration_list, entry, css_declaration_list_sorter); | ||
| 147 | + } | ||
| 148 | + css_ruleset_destroy (rs); | ||
| 149 | } | ||
| 150 | - css_ruleset_destroy (rs); | ||
| 151 | } | ||
| 152 | + if (media_prop) xmlFree (media_prop); | ||
| 153 | xmlFree (prop); | ||
| 154 | } | ||
| 155 | |||
| 156 | Index: libgtkhtml/document/htmldocument.c | ||
| 157 | =================================================================== | ||
| 158 | --- libgtkhtml/document/htmldocument.c.orig 2006-02-11 05:21:18.000000000 +0000 | ||
| 159 | +++ libgtkhtml/document/htmldocument.c 2006-02-11 05:21:28.000000000 +0000 | ||
| 160 | @@ -142,9 +142,7 @@ html_document_stylesheet_stream_close (c | ||
| 161 | if (!buffer) | ||
| 162 | return; | ||
| 163 | |||
| 164 | - sheet = css_parser_parse_stylesheet (buffer, len, (gchar *) stream_data->internal_data); | ||
| 165 | - g_free(stream_data->internal_data); | ||
| 166 | - stream_data->internal_data = NULL; | ||
| 167 | + sheet = css_parser_parse_stylesheet (buffer, len, (gchar *) stream_data->internal_data, stream_data->media); | ||
| 168 | |||
| 169 | for (list = sheet->stat; list; list = list->next) { | ||
| 170 | CssStatement *statement = list->data; | ||
| 171 | @@ -153,15 +151,13 @@ html_document_stylesheet_stream_close (c | ||
| 172 | switch (statement->type) { | ||
| 173 | case CSS_IMPORT_RULE: { | ||
| 174 | HtmlDocumentStreamData *stream_data_import; | ||
| 175 | - gchar *url; | ||
| 176 | |||
| 177 | - url = css_value_to_string (statement->s.import_rule.url); | ||
| 178 | stream_data_import = g_new (HtmlDocumentStreamData, 1); | ||
| 179 | stream_data_import->document = stream_data->document; | ||
| 180 | - stream_data_import->internal_data = g_strdup(url); | ||
| 181 | + stream_data_import->internal_data = css_value_to_string (statement->s.import_rule.url); | ||
| 182 | + stream_data_import->media = statement->s.import_rule.media ? statement->s.import_rule.media : g_strdup (stream_data->media); | ||
| 183 | stream = html_stream_buffer_new (html_document_stylesheet_stream_close, stream_data_import); | ||
| 184 | - g_signal_emit (G_OBJECT (document), document_signals [REQUEST_URL], 0, url, stream); | ||
| 185 | - g_free (url); | ||
| 186 | + g_signal_emit (G_OBJECT (document), document_signals [REQUEST_URL], 0, stream_data_import->internal_data, stream); | ||
| 187 | break; | ||
| 188 | } | ||
| 189 | default: | ||
| 190 | @@ -169,8 +165,11 @@ html_document_stylesheet_stream_close (c | ||
| 191 | } | ||
| 192 | } | ||
| 193 | |||
| 194 | - g_free (stream_data); | ||
| 195 | document->stylesheets = g_slist_append (document->stylesheets, sheet); | ||
| 196 | + | ||
| 197 | + g_free (stream_data->media); | ||
| 198 | + g_free(stream_data->internal_data); | ||
| 199 | + g_free (stream_data); | ||
| 200 | |||
| 201 | /* Restyle the document */ | ||
| 202 | style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), NULL, TRUE); | ||
| 203 | @@ -211,21 +210,22 @@ html_document_node_inserted_traverser (H | ||
| 204 | HtmlDocumentStreamData *stream_data; | ||
| 205 | HtmlStream *stream; | ||
| 206 | |||
| 207 | - stream_data = g_new (HtmlDocumentStreamData, 1); | ||
| 208 | + stream_data = g_new0 (HtmlDocumentStreamData, 1); | ||
| 209 | stream_data->document = document; | ||
| 210 | stream_data->internal_data = g_strdup(url); | ||
| 211 | + stream_data->media = xmlGetProp (node->xmlnode, "media"); | ||
| 212 | |||
| 213 | stream = html_stream_buffer_new (html_document_stylesheet_stream_close, stream_data); | ||
| 214 | |||
| 215 | g_signal_emit (G_OBJECT (document), document_signals [REQUEST_URL], 0, url, stream); | ||
| 216 | + g_free (url); | ||
| 217 | } | ||
| 218 | - g_free (url); | ||
| 219 | } else if (str && (strcasecmp (str, "icon") == 0)) { | ||
| 220 | gchar *url = xmlGetProp (node->xmlnode, "href"); | ||
| 221 | if (url) { | ||
| 222 | g_signal_emit (G_OBJECT (document), document_signals [REQUEST_ICON], 0, url); | ||
| 223 | + g_free (url); | ||
| 224 | } | ||
| 225 | - g_free (url); | ||
| 226 | } | ||
| 227 | g_free (str); | ||
| 228 | } | ||
| 229 | @@ -277,8 +277,10 @@ html_document_node_inserted_traverser (H | ||
| 230 | CssStylesheet *ss; | ||
| 231 | HtmlStyleChange style_change; | ||
| 232 | GSList *list; | ||
| 233 | + xmlChar *media = xmlGetProp (node->xmlnode->parent, "media"); | ||
| 234 | |||
| 235 | - ss = css_parser_parse_stylesheet (node->xmlnode->content, strlen (node->xmlnode->content), NULL); | ||
| 236 | + ss = css_parser_parse_stylesheet (node->xmlnode->content, strlen (node->xmlnode->content), NULL, media); | ||
| 237 | + if (media) xmlFree (media); | ||
| 238 | |||
| 239 | for (list = ss->stat; list; list = list->next) { | ||
| 240 | CssStatement *statement = list->data; | ||
| 241 | @@ -291,9 +293,10 @@ html_document_node_inserted_traverser (H | ||
| 242 | |||
| 243 | cssurl = css_value_to_string (statement->s.import_rule.url); | ||
| 244 | |||
| 245 | - stream_data = g_new (HtmlDocumentStreamData, 1); | ||
| 246 | + stream_data = g_new0 (HtmlDocumentStreamData, 1); | ||
| 247 | stream_data->document = document; | ||
| 248 | stream_data->internal_data = g_strdup(cssurl); | ||
| 249 | + stream_data->media = statement->s.import_rule.media; | ||
| 250 | |||
| 251 | stream = html_stream_buffer_new (html_document_stylesheet_stream_close, stream_data); | ||
| 252 | g_signal_emit (G_OBJECT (document), document_signals [REQUEST_URL], 0, cssurl, stream); | ||
| 253 | @@ -541,6 +544,9 @@ html_document_finalize (GObject *object) | ||
| 254 | |||
| 255 | if (document->parser) | ||
| 256 | g_object_unref (G_OBJECT (document->parser)); | ||
| 257 | + | ||
| 258 | + if (document->media_type) | ||
| 259 | + g_free (document->media_type); | ||
| 260 | |||
| 261 | parent_class->finalize (object); | ||
| 262 | } | ||
| 263 | @@ -748,6 +754,7 @@ html_document_init (HtmlDocument *docume | ||
| 264 | { | ||
| 265 | document->stylesheets = NULL; | ||
| 266 | document->image_factory = html_image_factory_new (); | ||
| 267 | + document->media_type = NULL; | ||
| 268 | |||
| 269 | g_signal_connect (G_OBJECT (document->image_factory), "request_image", | ||
| 270 | G_CALLBACK (html_document_request_image), document); | ||
| 271 | @@ -1159,3 +1166,24 @@ html_document_remove_stylesheet (HtmlDoc | ||
| 272 | return TRUE; | ||
| 273 | } | ||
| 274 | |||
| 275 | +void | ||
| 276 | +html_document_set_media_type (HtmlDocument *document, const gchar *type) | ||
| 277 | +{ | ||
| 278 | + HtmlStyleChange style_change; | ||
| 279 | + | ||
| 280 | + g_return_if_fail (HTML_IS_DOCUMENT (document)); | ||
| 281 | + | ||
| 282 | + if (document->media_type) | ||
| 283 | + g_free (document->media_type); | ||
| 284 | + | ||
| 285 | + document->media_type = g_strdup (type); | ||
| 286 | + | ||
| 287 | + style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), NULL, TRUE); | ||
| 288 | + g_signal_emit (G_OBJECT (document), document_signals [STYLE_UPDATED], 0, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), style_change); | ||
| 289 | +} | ||
| 290 | + | ||
| 291 | +const gchar * | ||
| 292 | +html_document_get_media_type (HtmlDocument *document) | ||
| 293 | +{ | ||
| 294 | + return document->media_type; | ||
| 295 | +} | ||
| 296 | Index: libgtkhtml/document/htmldocument.h | ||
| 297 | =================================================================== | ||
| 298 | --- libgtkhtml/document/htmldocument.h.orig 2006-02-11 05:20:51.000000000 +0000 | ||
| 299 | +++ libgtkhtml/document/htmldocument.h 2006-02-11 05:21:28.000000000 +0000 | ||
| 300 | @@ -64,6 +64,8 @@ struct _HtmlDocument { | ||
| 301 | DomNode *hover_node; | ||
| 302 | DomNode *active_node; | ||
| 303 | DomElement *focus_element; | ||
| 304 | + | ||
| 305 | + gchar *media_type; | ||
| 306 | }; | ||
| 307 | |||
| 308 | struct _HtmlDocumentClass { | ||
| 309 | @@ -97,6 +99,7 @@ struct _HtmlDocumentClass { | ||
| 310 | struct _HtmlDocumentStreamData { | ||
| 311 | HtmlDocument *document; | ||
| 312 | gpointer internal_data; | ||
| 313 | + gchar *media; | ||
| 314 | }; | ||
| 315 | |||
| 316 | GType html_document_get_type (void); | ||
| 317 | @@ -116,6 +119,10 @@ DomNode *html_document_find_anchor | ||
| 318 | void html_document_add_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet); | ||
| 319 | void html_document_remove_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet); | ||
| 320 | |||
| 321 | +void html_document_set_media_type (HtmlDocument *document, const gchar *type); | ||
| 322 | +const gchar *html_document_get_media_type (HtmlDocument *document); | ||
| 323 | + | ||
| 324 | + | ||
| 325 | G_END_DECLS | ||
| 326 | |||
| 327 | #endif /* __HTMLDOCUMENT_H__ */ | ||
| 328 | Index: libgtkhtml/css/cssparser.c | ||
| 329 | =================================================================== | ||
| 330 | --- libgtkhtml/css/cssparser.c.orig 2006-02-11 05:18:03.000000000 +0000 | ||
| 331 | +++ libgtkhtml/css/cssparser.c 2006-02-11 05:21:28.000000000 +0000 | ||
| 332 | @@ -688,6 +688,32 @@ css_parser_parse_value (const gchar *buf | ||
| 333 | return pos; | ||
| 334 | } | ||
| 335 | |||
| 336 | +static void | ||
| 337 | +css_parser_parse_media_list (const gchar *buffer, gint start_pos, gint end_pos, CssValue **ret_val) | ||
| 338 | +{ | ||
| 339 | + CssValue *list = NULL; | ||
| 340 | + while (start_pos < end_pos) { | ||
| 341 | + CssValue *val; | ||
| 342 | + HtmlAtom name; | ||
| 343 | + | ||
| 344 | + if (buffer[start_pos] == ',') | ||
| 345 | + start_pos++; | ||
| 346 | + | ||
| 347 | + start_pos = css_parser_parse_whitespace (buffer, start_pos, end_pos); | ||
| 348 | + | ||
| 349 | + if (start_pos >= end_pos) | ||
| 350 | + break; | ||
| 351 | + | ||
| 352 | + start_pos = css_parser_parse_ident (buffer, start_pos, end_pos, &name); | ||
| 353 | + val = css_value_ident_new (name); | ||
| 354 | + if (!list) list = css_value_list_new (); | ||
| 355 | + css_value_list_append (list, val, ','); | ||
| 356 | + | ||
| 357 | + start_pos = css_parser_parse_whitespace (buffer, start_pos, end_pos); | ||
| 358 | + } | ||
| 359 | + | ||
| 360 | + *ret_val = list; | ||
| 361 | +} | ||
| 362 | |||
| 363 | static gint | ||
| 364 | css_parser_parse_attr_selector (const gchar *buffer, gint start_pos, gint end_pos, CssTail *tail) | ||
| 365 | @@ -1329,7 +1355,7 @@ css_parser_parse_atkeyword (const gchar | ||
| 366 | |||
| 367 | /* g_print ("Going to return: %d\n", pos); */ | ||
| 368 | |||
| 369 | - return pos + 1; | ||
| 370 | + return pos; | ||
| 371 | |||
| 372 | break; | ||
| 373 | case HTML_ATOM_PAGE: | ||
| 374 | @@ -1390,7 +1416,8 @@ css_parser_parse_atkeyword (const gchar | ||
| 375 | break; | ||
| 376 | case HTML_ATOM_IMPORT: { | ||
| 377 | gchar *import_url; | ||
| 378 | - const gchar *s_url, *e_url; | ||
| 379 | + const gchar *s_url, *e_url, *e_import, *e_media; | ||
| 380 | + CssValue *value = NULL; | ||
| 381 | |||
| 382 | cur_pos = css_parser_parse_to_char (buffer, ';', pos, end_pos); | ||
| 383 | |||
| 384 | @@ -1411,6 +1438,7 @@ css_parser_parse_atkeyword (const gchar | ||
| 385 | return cur_pos + 1; | ||
| 386 | } | ||
| 387 | |||
| 388 | + e_import = e_url + 1; | ||
| 389 | s_url++; | ||
| 390 | e_url--; | ||
| 391 | |||
| 392 | @@ -1434,6 +1462,11 @@ css_parser_parse_atkeyword (const gchar | ||
| 393 | result->type = CSS_IMPORT_RULE; | ||
| 394 | |||
| 395 | result->s.import_rule.url = css_value_string_new (import_url); | ||
| 396 | + | ||
| 397 | + /* Check for media types */ | ||
| 398 | + e_media = buffer + cur_pos; | ||
| 399 | + if ((e_media > e_import) && (css_parser_parse_whitespace(e_import, 0, e_media-e_import) < (e_media-e_import))) | ||
| 400 | + result->s.import_rule.media = g_strndup (e_import, e_media-e_import); | ||
| 401 | |||
| 402 | *ret_val = result; | ||
| 403 | |||
| 404 | @@ -1489,7 +1522,7 @@ css_parser_parse_style_attr (const gchar | ||
| 405 | } | ||
| 406 | |||
| 407 | CssStylesheet * | ||
| 408 | -css_parser_parse_stylesheet (const gchar *str, gint len, const gchar *base_url) | ||
| 409 | +css_parser_parse_stylesheet (const gchar *str, gint len, const gchar *base_url, const gchar *media) | ||
| 410 | { | ||
| 411 | CssStylesheet *result; | ||
| 412 | GSList *stat = NULL; | ||
| 413 | @@ -1515,12 +1548,23 @@ css_parser_parse_stylesheet (const gchar | ||
| 414 | pos = css_parser_parse_ruleset (buffer, pos, end_pos, &ruleset, base_url); | ||
| 415 | |||
| 416 | if (ruleset) { | ||
| 417 | - CssStatement *rulestatement; | ||
| 418 | - rulestatement = g_new0 (CssStatement, 1); | ||
| 419 | - rulestatement->type = CSS_RULESET; | ||
| 420 | - rulestatement->s.ruleset = ruleset; | ||
| 421 | + CssStatement *statement; | ||
| 422 | + | ||
| 423 | + if (media) { | ||
| 424 | + statement = g_new0 (CssStatement, 1); | ||
| 425 | |||
| 426 | - stat = g_slist_append (stat, rulestatement); | ||
| 427 | + statement->type = CSS_MEDIA_RULE; | ||
| 428 | + css_parser_parse_media_list (media, 0, strlen (media), &statement->s.media_rule.media_list); | ||
| 429 | + g_assert (statement->s.media_rule.media_list); | ||
| 430 | + statement->s.media_rule.rs = g_new (CssRuleset *, 1); | ||
| 431 | + statement->s.media_rule.rs[0] = ruleset; | ||
| 432 | + statement->s.media_rule.n_rs = 1; | ||
| 433 | + } else { | ||
| 434 | + statement = g_new0 (CssStatement, 1); | ||
| 435 | + statement->type = CSS_RULESET; | ||
| 436 | + statement->s.ruleset = ruleset; | ||
| 437 | + } | ||
| 438 | + stat = g_slist_append (stat, statement); | ||
| 439 | } | ||
| 440 | |||
| 441 | if (pos == -1) | ||
| 442 | Index: libgtkhtml/css/cssparser.h | ||
| 443 | =================================================================== | ||
| 444 | --- libgtkhtml/css/cssparser.h.orig 2006-02-11 05:18:03.000000000 +0000 | ||
| 445 | +++ libgtkhtml/css/cssparser.h 2006-02-11 05:21:28.000000000 +0000 | ||
| 446 | @@ -30,7 +30,7 @@ | ||
| 447 | |||
| 448 | G_BEGIN_DECLS | ||
| 449 | |||
| 450 | -CssStylesheet *css_parser_parse_stylesheet (const gchar *str, gint len, const gchar *base_url); | ||
| 451 | +CssStylesheet *css_parser_parse_stylesheet (const gchar *str, gint len, const gchar *base_url, const gchar *media); | ||
| 452 | CssRuleset *css_parser_parse_style_attr (const gchar *buffer, gint len, const gchar *base_url); | ||
| 453 | |||
| 454 | G_END_DECLS | ||
| 455 | Index: libgtkhtml/css/cssstylesheet.h | ||
| 456 | =================================================================== | ||
| 457 | --- libgtkhtml/css/cssstylesheet.h.orig 2006-02-11 05:18:03.000000000 +0000 | ||
| 458 | +++ libgtkhtml/css/cssstylesheet.h 2006-02-11 05:21:28.000000000 +0000 | ||
| 459 | @@ -99,6 +99,7 @@ struct _CssStatement { | ||
| 460 | CssValue *url; | ||
| 461 | gboolean fetched; | ||
| 462 | gboolean fetching; | ||
| 463 | + gchar *media; | ||
| 464 | } import_rule; | ||
| 465 | |||
| 466 | } s; | ||
diff --git a/openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch b/openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch deleted file mode 100644 index 4fe7e9045b..0000000000 --- a/openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch +++ /dev/null | |||
| @@ -1,59 +0,0 @@ | |||
| 1 | Index: libgtkhtml/document/htmldocument.c | ||
| 2 | =================================================================== | ||
| 3 | --- libgtkhtml/document/htmldocument.c.orig 2006-02-11 05:06:30.000000000 +0000 | ||
| 4 | +++ libgtkhtml/document/htmldocument.c 2006-02-11 05:21:18.000000000 +0000 | ||
| 5 | @@ -1122,3 +1122,40 @@ html_document_find_anchor (HtmlDocument | ||
| 6 | else | ||
| 7 | return NULL; | ||
| 8 | } | ||
| 9 | + | ||
| 10 | +void | ||
| 11 | +html_document_add_stylesheet (HtmlDocument *document, CssStylesheet *sheet) | ||
| 12 | +{ | ||
| 13 | + HtmlStyleChange style_change; | ||
| 14 | + | ||
| 15 | + g_return_if_fail (HTML_IS_DOCUMENT (document)); | ||
| 16 | + | ||
| 17 | + /* Note: @import not supported for user stylesheets, due to | ||
| 18 | + * complications it would cause with removal. | ||
| 19 | + */ | ||
| 20 | + | ||
| 21 | + document->stylesheets = g_slist_append (document->stylesheets, sheet); | ||
| 22 | + | ||
| 23 | + if (document->dom_document) { | ||
| 24 | + style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), NULL, TRUE); | ||
| 25 | + g_signal_emit (G_OBJECT (document), document_signals [STYLE_UPDATED], 0, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), style_change); | ||
| 26 | + } | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +void | ||
| 30 | +html_document_remove_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet) | ||
| 31 | +{ | ||
| 32 | + HtmlStyleChange style_change; | ||
| 33 | + | ||
| 34 | + g_return_if_fail (stylesheet && HTML_IS_DOCUMENT (document)); | ||
| 35 | + | ||
| 36 | + document->stylesheets = g_slist_remove (document->stylesheets, stylesheet); | ||
| 37 | + | ||
| 38 | + if (document->dom_document) { | ||
| 39 | + style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), NULL, TRUE); | ||
| 40 | + g_signal_emit (G_OBJECT (document), document_signals [STYLE_UPDATED], 0, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), style_change); | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + return TRUE; | ||
| 44 | +} | ||
| 45 | + | ||
| 46 | Index: libgtkhtml/document/htmldocument.h | ||
| 47 | =================================================================== | ||
| 48 | --- libgtkhtml/document/htmldocument.h.orig 2006-02-11 05:06:30.000000000 +0000 | ||
| 49 | +++ libgtkhtml/document/htmldocument.h 2006-02-11 05:20:51.000000000 +0000 | ||
| 50 | @@ -113,6 +113,9 @@ void html_document_update_active_nod | ||
| 51 | void html_document_update_focus_element (HtmlDocument *document, DomElement *element); | ||
| 52 | DomNode *html_document_find_anchor (HtmlDocument *doc, const gchar *anchor); | ||
| 53 | |||
| 54 | +void html_document_add_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet); | ||
| 55 | +void html_document_remove_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet); | ||
| 56 | + | ||
| 57 | G_END_DECLS | ||
| 58 | |||
| 59 | #endif /* __HTMLDOCUMENT_H__ */ | ||
diff --git a/openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch b/openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch deleted file mode 100644 index c2f36daf88..0000000000 --- a/openembedded/packages/gtkhtml2/files/fix-infinite-loop.patch +++ /dev/null | |||
| @@ -1,91 +0,0 @@ | |||
| 1 | Index: libgtkhtml/layout/htmlbox.c | ||
| 2 | =================================================================== | ||
| 3 | --- libgtkhtml/layout/htmlbox.c.orig 2006-02-08 23:43:30.000000000 +0000 | ||
| 4 | +++ libgtkhtml/layout/htmlbox.c 2006-02-11 04:49:55.000000000 +0000 | ||
| 5 | @@ -873,26 +873,21 @@ html_box_check_min_max_width_height (Htm | ||
| 6 | *boxheight = html_length_get_value (&HTML_BOX_GET_STYLE (self)->box->max_height, 0); | ||
| 7 | } | ||
| 8 | |||
| 9 | - /* Maintain aspect ratio if it's an image - bias towards making image smaller */ | ||
| 10 | + /* Maintain aspect ratio if it's an image */ | ||
| 11 | if (HTML_IS_BOX_IMAGE (self)) { | ||
| 12 | if ((*boxwidth > old_width) && (*boxheight >= old_height)) { | ||
| 13 | *boxheight = *boxheight * (gdouble)(*boxwidth / (gdouble)old_width); | ||
| 14 | - html_box_check_min_max_width_height (self, boxwidth, boxheight); | ||
| 15 | return; | ||
| 16 | } | ||
| 17 | - | ||
| 18 | - if ((*boxheight > old_height) && (*boxwidth >= old_width)) { | ||
| 19 | + else if ((*boxheight > old_height) && (*boxwidth >= old_width)) { | ||
| 20 | *boxwidth = *boxwidth * (gdouble)(*boxheight / (gdouble)old_height); | ||
| 21 | - html_box_check_min_max_width_height (self, boxwidth, boxheight); | ||
| 22 | return; | ||
| 23 | } | ||
| 24 | - | ||
| 25 | - if ((*boxwidth < old_width) && (*boxheight <= old_height)) { | ||
| 26 | + else if ((*boxwidth < old_width) && (*boxheight <= old_height)) { | ||
| 27 | *boxheight = *boxheight * (gdouble)(*boxwidth / (gdouble)old_width); | ||
| 28 | return; | ||
| 29 | } | ||
| 30 | - | ||
| 31 | - if ((*boxheight < old_height) && (*boxwidth <= old_width)) { | ||
| 32 | + else if ((*boxheight < old_height) && (*boxwidth <= old_width)) { | ||
| 33 | *boxwidth = *boxwidth * (gdouble)(*boxheight / (gdouble)old_height); | ||
| 34 | return; | ||
| 35 | } | ||
| 36 | Index: libgtkhtml/layout/html/htmlboximage.c | ||
| 37 | =================================================================== | ||
| 38 | --- libgtkhtml/layout/html/htmlboximage.c.orig 2006-02-08 23:41:33.000000000 +0000 | ||
| 39 | +++ libgtkhtml/layout/html/htmlboximage.c 2006-02-11 05:01:36.000000000 +0000 | ||
| 40 | @@ -176,8 +176,26 @@ html_box_image_relayout (HtmlBox *box, H | ||
| 41 | |||
| 42 | html_box_check_min_max_width_height (box, &width, &height); | ||
| 43 | |||
| 44 | - if (old_width != width || old_height != height) | ||
| 45 | + /* Guard against oscillation - When max-width/height alters the | ||
| 46 | + * size of an image, the aspect ratio is maintained, but this | ||
| 47 | + * can cause an infinite resizing loop as the size oscillates | ||
| 48 | + * between two sizes that alternately require and don't | ||
| 49 | + * require a scrollbar. | ||
| 50 | + */ | ||
| 51 | + if ((old_width != width || old_height != height) && (width != image->last_width[1] || height != image->last_height[1])) { | ||
| 52 | html_box_image_update_scaled_pixbuf (image, width, height); | ||
| 53 | + image->last_width[1] = image->last_width[0]; | ||
| 54 | + image->last_height[1] = image->last_height[0]; | ||
| 55 | + image->last_width[0] = width; | ||
| 56 | + image->last_height[0] = height; | ||
| 57 | + } else { | ||
| 58 | + image->last_width[1] = image->last_width[0]; | ||
| 59 | + image->last_height[1] = image->last_height[0]; | ||
| 60 | + image->last_width[0] = width; | ||
| 61 | + image->last_height[0] = height; | ||
| 62 | + width = old_width; | ||
| 63 | + height = old_height; | ||
| 64 | + } | ||
| 65 | } | ||
| 66 | else { | ||
| 67 | if (style->width.type != HTML_LENGTH_AUTO) | ||
| 68 | @@ -239,6 +257,10 @@ html_box_image_init (HtmlBoxImage *image | ||
| 69 | image->content_height = 20; | ||
| 70 | image->image = NULL; | ||
| 71 | image->scaled_pixbuf = NULL; | ||
| 72 | + image->last_width[0] = 0; | ||
| 73 | + image->last_height[0] = 0; | ||
| 74 | + image->last_width[1] = 0; | ||
| 75 | + image->last_height[1] = 0; | ||
| 76 | } | ||
| 77 | |||
| 78 | GType | ||
| 79 | Index: libgtkhtml/layout/html/htmlboximage.h | ||
| 80 | =================================================================== | ||
| 81 | --- libgtkhtml/layout/html/htmlboximage.h.orig 2001-08-05 12:45:30.000000000 +0100 | ||
| 82 | +++ libgtkhtml/layout/html/htmlboximage.h 2006-02-11 04:40:44.000000000 +0000 | ||
| 83 | @@ -49,6 +49,8 @@ struct _HtmlBoxImage { | ||
| 84 | GdkPixbuf *scaled_pixbuf; | ||
| 85 | gboolean updated; | ||
| 86 | HtmlView *view; | ||
| 87 | + | ||
| 88 | + gint last_width[2], last_height[2]; | ||
| 89 | }; | ||
| 90 | |||
| 91 | struct _HtmlBoxImageClass { | ||
diff --git a/openembedded/packages/gtkhtml2/files/fix-margin-inherit.patch b/openembedded/packages/gtkhtml2/files/fix-margin-inherit.patch deleted file mode 100644 index 16337b7cc1..0000000000 --- a/openembedded/packages/gtkhtml2/files/fix-margin-inherit.patch +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | Index: libgtkhtml/layout/htmlbox.c | ||
| 2 | =================================================================== | ||
| 3 | --- libgtkhtml/layout/htmlbox.c.orig 2006-02-06 01:50:52.000000000 +0000 | ||
| 4 | +++ libgtkhtml/layout/htmlbox.c 2006-02-06 01:53:16.000000000 +0000 | ||
| 5 | @@ -151,17 +151,13 @@ simple_margin (HtmlStyle *style) | ||
| 6 | static gboolean | ||
| 7 | need_containing_width (HtmlBox *box, gint width) | ||
| 8 | { | ||
| 9 | - HtmlStyle *style; | ||
| 10 | - | ||
| 11 | if (width > 0) | ||
| 12 | return FALSE; | ||
| 13 | |||
| 14 | - style = HTML_BOX_GET_STYLE (box); | ||
| 15 | - | ||
| 16 | - if (simple_margin (style)) | ||
| 17 | - return FALSE; | ||
| 18 | + if (html_box_get_containing_block (box)) | ||
| 19 | + return TRUE; | ||
| 20 | |||
| 21 | - return TRUE; | ||
| 22 | + return FALSE; | ||
| 23 | } | ||
| 24 | |||
| 25 | gint | ||
diff --git a/openembedded/packages/gtkhtml2/files/fix-recreation2.patch b/openembedded/packages/gtkhtml2/files/fix-recreation2.patch deleted file mode 100644 index 92a8c8fd21..0000000000 --- a/openembedded/packages/gtkhtml2/files/fix-recreation2.patch +++ /dev/null | |||
| @@ -1,93 +0,0 @@ | |||
| 1 | Index: libgtkhtml/view/htmlview.c | ||
| 2 | =================================================================== | ||
| 3 | --- libgtkhtml/view/htmlview.c.orig 2006-02-11 05:06:22.000000000 +0000 | ||
| 4 | +++ libgtkhtml/view/htmlview.c 2006-02-11 05:07:01.000000000 +0000 | ||
| 5 | @@ -2135,38 +2135,31 @@ html_view_style_updated (HtmlDocument *d | ||
| 6 | HtmlBox *new_box = NULL; | ||
| 7 | |||
| 8 | /* Don't replace boxes where display: none has been set */ | ||
| 9 | - if (style->display == HTML_DISPLAY_NONE) { | ||
| 10 | - html_view_removed (document, node, view); | ||
| 11 | + if (!style || style->display == HTML_DISPLAY_NONE) | ||
| 12 | break; | ||
| 13 | - } | ||
| 14 | |||
| 15 | new_box = html_box_factory_new_box (view, node, TRUE); | ||
| 16 | g_assert (new_box); | ||
| 17 | |||
| 18 | new_box->dom_node = node; | ||
| 19 | g_object_add_weak_pointer (G_OBJECT (node), (gpointer *)&(new_box->dom_node)); | ||
| 20 | + html_box_handle_html_properties (new_box, node->xmlnode); | ||
| 21 | new_box->next = box->next; | ||
| 22 | new_box->prev = box->prev; | ||
| 23 | new_box->parent = box->parent; | ||
| 24 | - new_box->children = box->children; | ||
| 25 | |||
| 26 | - if (box->next) box->next->prev = new_box; | ||
| 27 | - if (box->prev) box->prev->next = new_box; | ||
| 28 | - if (box->parent) | ||
| 29 | + if (box->parent) { | ||
| 30 | if (box->parent->children == box) | ||
| 31 | box->parent->children = new_box; | ||
| 32 | + } | ||
| 33 | + if (box->next) box->next->prev = new_box; | ||
| 34 | + if (box->prev) box->prev->next = new_box; | ||
| 35 | if (box->children) { | ||
| 36 | HtmlBox *child = box->children; | ||
| 37 | while (child) { | ||
| 38 | - if (child->parent == box) | ||
| 39 | - child->parent = new_box; | ||
| 40 | - child = child->prev; | ||
| 41 | - } | ||
| 42 | - child = box->children->next; | ||
| 43 | - while (child) { | ||
| 44 | - if (child->parent == box) | ||
| 45 | - child->parent = new_box; | ||
| 46 | - child = child->next; | ||
| 47 | + HtmlBox *temp = child->next; | ||
| 48 | + html_box_append_child (new_box, child); | ||
| 49 | + child = temp; | ||
| 50 | } | ||
| 51 | } | ||
| 52 | |||
| 53 | @@ -2176,7 +2169,6 @@ html_view_style_updated (HtmlDocument *d | ||
| 54 | html_view_remove_layout_box (view, node); | ||
| 55 | g_object_unref (box); | ||
| 56 | |||
| 57 | - html_box_handle_html_properties (new_box, node->xmlnode); | ||
| 58 | html_view_add_layout_box (view, node, new_box); | ||
| 59 | html_view_relayout_callback (document, node, view); | ||
| 60 | break; | ||
| 61 | Index: libgtkhtml/graphics/htmlimage.c | ||
| 62 | =================================================================== | ||
| 63 | --- libgtkhtml/graphics/htmlimage.c.orig 2006-02-11 05:06:22.000000000 +0000 | ||
| 64 | +++ libgtkhtml/graphics/htmlimage.c 2006-02-11 05:06:34.000000000 +0000 | ||
| 65 | @@ -142,6 +142,7 @@ static void | ||
| 66 | html_image_init (HtmlImage *image) | ||
| 67 | { | ||
| 68 | image->pixbuf = NULL; | ||
| 69 | + image->stream = NULL; | ||
| 70 | image->broken = FALSE; | ||
| 71 | image->loading = FALSE; | ||
| 72 | image->loader = gdk_pixbuf_loader_new (); | ||
| 73 | Index: libgtkhtml/graphics/htmlimagefactory.c | ||
| 74 | =================================================================== | ||
| 75 | --- libgtkhtml/graphics/htmlimagefactory.c.orig 2006-02-11 05:06:22.000000000 +0000 | ||
| 76 | +++ libgtkhtml/graphics/htmlimagefactory.c 2006-02-11 05:07:43.000000000 +0000 | ||
| 77 | @@ -146,7 +146,7 @@ html_image_factory_get_image (HtmlImageF | ||
| 78 | |||
| 79 | image = HTML_IMAGE (g_object_new (HTML_IMAGE_TYPE, NULL)); | ||
| 80 | |||
| 81 | - g_object_weak_ref (G_OBJECT (image), (GWeakNotify)html_image_shutdown, image_factory); | ||
| 82 | + g_signal_connect_swapped (G_OBJECT (image), "last_unref", G_CALLBACK (html_image_shutdown), image_factory); | ||
| 83 | |||
| 84 | image->loading = TRUE; | ||
| 85 | |||
| 86 | @@ -154,6 +154,7 @@ html_image_factory_get_image (HtmlImageF | ||
| 87 | image); | ||
| 88 | |||
| 89 | image->stream = stream; | ||
| 90 | + g_object_add_weak_pointer (G_OBJECT (stream), (gpointer *) &(image->stream)); | ||
| 91 | g_object_add_weak_pointer (G_OBJECT (image), (gpointer *) &(stream->user_data)); | ||
| 92 | |||
| 93 | g_signal_emit (G_OBJECT (image_factory), image_factory_signals [REQUEST_IMAGE], 0, uri, stream); | ||
diff --git a/openembedded/packages/gtkhtml2/files/fix-style-change.patch b/openembedded/packages/gtkhtml2/files/fix-style-change.patch deleted file mode 100644 index 865f2692a8..0000000000 --- a/openembedded/packages/gtkhtml2/files/fix-style-change.patch +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | Index: libgtkhtml/view/htmlview.c | ||
| 2 | =================================================================== | ||
| 3 | --- libgtkhtml/view/htmlview.c.orig 2006-02-11 04:45:41.000000000 +0000 | ||
| 4 | +++ libgtkhtml/view/htmlview.c 2006-02-11 04:45:42.000000000 +0000 | ||
| 5 | @@ -2286,9 +2286,7 @@ html_view_realize (GtkWidget *widget) | ||
| 6 | * GtkLayout uses the bg color for background but we want | ||
| 7 | * to use base color. | ||
| 8 | */ | ||
| 9 | - widget->style = gtk_style_copy (widget->style); | ||
| 10 | - widget->style->bg[GTK_STATE_NORMAL] = | ||
| 11 | - widget->style->base[GTK_STATE_NORMAL]; | ||
| 12 | + gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &widget->style->base[GTK_STATE_NORMAL]); | ||
| 13 | /* | ||
| 14 | * Store the font size so we can adjust size of HtmlFontSpecification | ||
| 15 | * if the size changes. | ||
| 16 | @@ -3189,9 +3187,10 @@ html_view_style_set (GtkWidget *widget, | ||
| 17 | "focus-line-width", &focus_width, | ||
| 18 | NULL); | ||
| 19 | |||
| 20 | - | ||
| 21 | - widget->style->bg[GTK_STATE_NORMAL] = | ||
| 22 | - widget->style->base[GTK_STATE_NORMAL]; | ||
| 23 | + if (!gdk_color_equal (&widget->style->bg[GTK_STATE_NORMAL], &widget->style->base[GTK_STATE_NORMAL])) { | ||
| 24 | + gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &widget->style->base[GTK_STATE_NORMAL]); | ||
| 25 | + return; | ||
| 26 | + } | ||
| 27 | fsize = pango_font_description_get_size (widget->style->font_desc) / (gfloat) PANGO_SCALE; | ||
| 28 | new_isize = (gint) fsize; | ||
| 29 | old_isize = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "html-view-font-size")); | ||
diff --git a/openembedded/packages/gtkhtml2/gtkhtml2_cvs.bb b/openembedded/packages/gtkhtml2/gtkhtml2_cvs.bb index 6d4c10b86a..634138e296 100755 --- a/openembedded/packages/gtkhtml2/gtkhtml2_cvs.bb +++ b/openembedded/packages/gtkhtml2/gtkhtml2_cvs.bb | |||
| @@ -4,17 +4,14 @@ DESCRIPTION = "A GTK+ HTML rendering library." | |||
| 4 | LICENSE = "GPL" | 4 | LICENSE = "GPL" |
| 5 | MAINTAINER = "Chris Lord <chris@openedhand.com>" | 5 | MAINTAINER = "Chris Lord <chris@openedhand.com>" |
| 6 | PV = "2.11.0+cvs${SRCDATE}" | 6 | PV = "2.11.0+cvs${SRCDATE}" |
| 7 | PR = "r1" | 7 | PR = "r2" |
| 8 | 8 | ||
| 9 | SRC_URI = "cvs://anonymous@anoncvs.gnome.org/cvs/gnome;module=gtkhtml2 \ | 9 | SRC_URI = "cvs://anonymous@anoncvs.gnome.org/cvs/gnome;module=gtkhtml2 \ |
| 10 | file://at-import_box-pos.patch;patch=1;pnum=0 \ | 10 | http://svn.o-hand.com/repos/web/trunk/patches/at-import_box-pos.patch;patch=1;pnum=0 \ |
| 11 | file://css-stylesheet-user.patch;patch=1;pnum=0 \ | 11 | http://svn.o-hand.com/repos/web/trunk/patches/css-stylesheet-user.patch;patch=1;pnum=0 \ |
| 12 | file://css-media.patch;patch=1;pnum=0 \ | 12 | http://svn.o-hand.com/repos/web/trunk/patches/css-media.patch;patch=1;pnum=0 \ |
| 13 | file://fix-infinite-loop.patch;patch=1;pnum=0 \ | 13 | http://svn.o-hand.com/repos/web/trunk/patches/fix-margin-inherit.patch;patch=1;pnum=0 \ |
| 14 | file://fix-margin-inherit.patch;patch=1;pnum=0 \ | 14 | http://svn.o-hand.com/repos/web/trunk/patches/add-end-element-signal.patch;patch=1;pnum=0" |
| 15 | file://fix-recreation2.patch;patch=1;pnum=0 \ | ||
| 16 | file://fix-style-change.patch;patch=1;pnum=0 \ | ||
| 17 | file://add-end-element-signal.patch;patch=1;pnum=0" | ||
| 18 | 15 | ||
| 19 | S = "${WORKDIR}/${PN}" | 16 | S = "${WORKDIR}/${PN}" |
| 20 | 17 | ||
diff --git a/openembedded/packages/web/web_snap20060213.bb b/openembedded/packages/web/web_svn.bb index 21376559bf..1c8d447c11 100755 --- a/openembedded/packages/web/web_snap20060213.bb +++ b/openembedded/packages/web/web_svn.bb | |||
| @@ -1,10 +1,11 @@ | |||
| 1 | LICENSE = "GPL" | 1 | LICENSE = "GPL" |
| 2 | SECTION = "x11" | 2 | SECTION = "x11" |
| 3 | DEPENDS = "glib-2.0 gtk+ libglade gtkhtml2 curl gconf js" | 3 | DEPENDS = "libxml2 glib-2.0 gtk+ libglade gtkhtml2 curl gconf js" |
| 4 | MAINTAINER = "Chris Lord <chris@openedhand.com>" | 4 | MAINTAINER = "Chris Lord <chris@openedhand.com>" |
| 5 | DESCRIPTION = "Web is a multi-platform web browsing application." | 5 | DESCRIPTION = "Web is a multi-platform web browsing application." |
| 6 | 6 | ||
| 7 | SRC_URI = "http://www.soton.ac.uk/~cil103/stuff/${PN}-${PV}.tar.gz" | 7 | SRC_URI = "svn://svn.o-hand.com/repos/${PN};module=trunk;proto=http" |
| 8 | S = "${WORKDIR}/trunk" | ||
| 8 | 9 | ||
| 9 | inherit autotools pkgconfig | 10 | inherit autotools pkgconfig |
| 10 | 11 | ||
