summaryrefslogtreecommitdiffstats
path: root/openembedded
diff options
context:
space:
mode:
authorChris Lord <chris@openedhand.com>2006-02-07 04:22:50 +0000
committerChris Lord <chris@openedhand.com>2006-02-07 04:22:50 +0000
commit4fbba6350edd17d9272a668b5ba564f558974a94 (patch)
treedafc821fd7b7d4ec5e08966b6ac479f50f94e5df /openembedded
parentef60244cc4a28777efdaed9260e8c7ae4872e2b1 (diff)
downloadpoky-4fbba6350edd17d9272a668b5ba564f558974a94.tar.gz
Add curl (new dependency of Web), fix a fontconfig-native build issue,
update gtkhtml2 patches and update to a newer more functional Web snapshot git-svn-id: https://svn.o-hand.com/repos/poky@251 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded')
-rw-r--r--openembedded/packages/curl/curl-native_7.14.0.bb13
-rw-r--r--openembedded/packages/curl/curl_7.14.0.bb37
-rw-r--r--openembedded/packages/fontconfig/files/stop-fc-cache.patch8
-rw-r--r--openembedded/packages/fontconfig/fontconfig-native_2.2.95.bb1
-rw-r--r--openembedded/packages/gtkhtml2/files/at-import_box-pos.patch193
-rw-r--r--openembedded/packages/gtkhtml2/files/css-media.patch113
-rw-r--r--openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch28
-rw-r--r--openembedded/packages/gtkhtml2/files/fix-background-min-max.patch66
-rw-r--r--openembedded/packages/gtkhtml2/files/fix-background-none.patch40
-rw-r--r--openembedded/packages/gtkhtml2/files/fix-recreation.patch407
-rwxr-xr-xopenembedded/packages/gtkhtml2/gtkhtml2_cvs.bb11
-rwxr-xr-xopenembedded/packages/web/web_snap20060207.bb (renamed from openembedded/packages/web/web_snap20060131.bb)3
12 files changed, 180 insertions, 740 deletions
diff --git a/openembedded/packages/curl/curl-native_7.14.0.bb b/openembedded/packages/curl/curl-native_7.14.0.bb
new file mode 100644
index 0000000000..59af4ef32e
--- /dev/null
+++ b/openembedded/packages/curl/curl-native_7.14.0.bb
@@ -0,0 +1,13 @@
1include curl_${PV}.bb
2inherit native
3
4do_stage () {
5 install -d ${STAGING_INCDIR}/curl
6 install -m 0644 ${S}/include/curl/*.h ${STAGING_INCDIR}/curl/
7 oe_libinstall -so -a -C lib libcurl ${STAGING_LIBDIR}
8}
9
10do_install() {
11 :
12}
13
diff --git a/openembedded/packages/curl/curl_7.14.0.bb b/openembedded/packages/curl/curl_7.14.0.bb
new file mode 100644
index 0000000000..a0ad4d14d7
--- /dev/null
+++ b/openembedded/packages/curl/curl_7.14.0.bb
@@ -0,0 +1,37 @@
1DESCRIPTION = "Command line tool and library for client-side URL transfers."
2LICENSE = "MIT"
3DEPENDS = "zlib"
4SECTION = "console/network"
5
6SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2"
7S = "${WORKDIR}/curl-${PV}"
8
9inherit autotools pkgconfig binconfig
10
11EXTRA_OECONF = "--with-zlib=${STAGING_LIBDIR}/../ \
12 --without-ssl \
13 --with-random=/dev/urandom \
14 --without-idn \
15 --enable-http \
16 --enable-file"
17
18do_stage () {
19 install -d ${STAGING_INCDIR}/curl
20 install -m 0644 ${S}/include/curl/*.h ${STAGING_INCDIR}/curl/
21 oe_libinstall -so -a -C lib libcurl ${STAGING_LIBDIR}
22}
23
24PACKAGES = "curl curl-doc libcurl libcurl-dev libcurl-doc"
25FILES_${PN} = "${bindir}/curl"
26FILES_${PN}-doc = "${mandir}/man1/curl.1"
27FILES_lib${PN} = "${libdir}/lib*.so.*"
28FILES_lib${PN}-dev = "${includedir} \
29 ${libdir}/lib*.so \
30 ${libdir}/lib*.a \
31 ${libdir}/lib*.la \
32 ${libdir}/pkgconfig \
33 ${datadir}/aclocal \
34 ${bindir}/*-config"
35FILES_lib${PN}-doc = "${mandir}/man3 \
36 ${mandir}/man1/curl-config.1"
37
diff --git a/openembedded/packages/fontconfig/files/stop-fc-cache.patch b/openembedded/packages/fontconfig/files/stop-fc-cache.patch
new file mode 100644
index 0000000000..7b549118f9
--- /dev/null
+++ b/openembedded/packages/fontconfig/files/stop-fc-cache.patch
@@ -0,0 +1,8 @@
1--- fontconfig-2.2.95/Makefile.am.old 2006-02-07 01:01:01.000000000 +0000
2+++ fontconfig-2.2.95/Makefile.am 2006-02-07 01:01:15.000000000 +0000
3@@ -50,4 +50,4 @@
4 echo " $(INSTALL_DATA) local.conf $(DESTDIR)$(configdir)/local.conf"; \
5 $(INSTALL_DATA) local.conf $(DESTDIR)$(configdir)/local.conf; \
6 fi; fi; fi
7- if [ x$(DESTDIR) = x ]; then fc-cache/fc-cache -f -v; fi
8+# if [ x$(DESTDIR) = x ]; then fc-cache/fc-cache -f -v; fi
diff --git a/openembedded/packages/fontconfig/fontconfig-native_2.2.95.bb b/openembedded/packages/fontconfig/fontconfig-native_2.2.95.bb
index bc988e0ee2..6872db92f1 100644
--- a/openembedded/packages/fontconfig/fontconfig-native_2.2.95.bb
+++ b/openembedded/packages/fontconfig/fontconfig-native_2.2.95.bb
@@ -4,6 +4,7 @@ include fontconfig_${PV}.bb
4inherit native 4inherit native
5DEPENDS = "freetype-native expat-native zlib-native" 5DEPENDS = "freetype-native expat-native zlib-native"
6FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/fontconfig-${PV}" 6FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/fontconfig-${PV}"
7SRC_URI += " file://stop-fc-cache.patch;patch=1"
7 8
8EXTRA_OEMAKE = "" 9EXTRA_OEMAKE = ""
9 10
diff --git a/openembedded/packages/gtkhtml2/files/at-import_box-pos.patch b/openembedded/packages/gtkhtml2/files/at-import_box-pos.patch
index 89e60e5d28..fb31d057a4 100644
--- a/openembedded/packages/gtkhtml2/files/at-import_box-pos.patch
+++ b/openembedded/packages/gtkhtml2/files/at-import_box-pos.patch
@@ -1,11 +1,8 @@
1Index: libgtkhtml/css/cssmatcher.c 1Index: libgtkhtml/css/cssmatcher.c
2=================================================================== 2===================================================================
3RCS file: /cvs/gnome/gtkhtml2/libgtkhtml/css/cssmatcher.c,v 3--- libgtkhtml/css/cssmatcher.c.orig 2006-02-04 20:10:47.000000000 +0000
4retrieving revision 1.53 4+++ libgtkhtml/css/cssmatcher.c 2006-02-05 18:19:15.000000000 +0000
5diff -u -r1.53 cssmatcher.c 5@@ -79,7 +79,7 @@ css_matcher_match_simple_selector (CssSi
6--- libgtkhtml/css/cssmatcher.c 26 Oct 2005 02:04:24 -0000 1.53
7+++ libgtkhtml/css/cssmatcher.c 18 Jan 2006 18:24:09 -0000
8@@ -79,7 +79,7 @@
9 element_name = html_atom_list_get_atom (html_atom_list, node->name); 6 element_name = html_atom_list_get_atom (html_atom_list, node->name);
10 7
11 /* Look at the element name */ 8 /* Look at the element name */
@@ -14,7 +11,7 @@ diff -u -r1.53 cssmatcher.c
14 return FALSE; 11 return FALSE;
15 12
16 str = xmlGetProp (node, "id"); 13 str = xmlGetProp (node, "id");
17@@ -2373,7 +2373,7 @@ 14@@ -2384,7 +2384,7 @@ css_matcher_sheet_stream_close (HtmlStre
18 CssStylesheet *ss; 15 CssStylesheet *ss;
19 16
20 if (html_stream_get_written (stream) != 0) { 17 if (html_stream_get_written (stream) != 0) {
@@ -23,7 +20,7 @@ diff -u -r1.53 cssmatcher.c
23 20
24 context->stat->s.import_rule.fetched = TRUE; 21 context->stat->s.import_rule.fetched = TRUE;
25 22
26@@ -2770,7 +2770,7 @@ 23@@ -2781,7 +2781,7 @@ css_matcher_get_style (HtmlDocument *doc
27 css_matcher_html_to_css (doc, style, node); 24 css_matcher_html_to_css (doc, style, node);
28 25
29 if (!default_stylesheet) { 26 if (!default_stylesheet) {
@@ -32,7 +29,7 @@ diff -u -r1.53 cssmatcher.c
32 } 29 }
33 30
34 css_matcher_apply_stylesheet (doc, default_stylesheet, node, &declaration_list, CSS_STYLESHEET_DEFAULT, pseudo); 31 css_matcher_apply_stylesheet (doc, default_stylesheet, node, &declaration_list, CSS_STYLESHEET_DEFAULT, pseudo);
35@@ -2789,7 +2789,7 @@ 32@@ -2800,7 +2800,7 @@ css_matcher_get_style (HtmlDocument *doc
36 prop = xmlGetProp (node, "style"); 33 prop = xmlGetProp (node, "style");
37 34
38 if (prop) { 35 if (prop) {
@@ -43,12 +40,9 @@ diff -u -r1.53 cssmatcher.c
43 if (rs) { 40 if (rs) {
44Index: libgtkhtml/css/cssparser.c 41Index: libgtkhtml/css/cssparser.c
45=================================================================== 42===================================================================
46RCS file: /cvs/gnome/gtkhtml2/libgtkhtml/css/cssparser.c,v 43--- libgtkhtml/css/cssparser.c.orig 2006-02-04 20:10:47.000000000 +0000
47retrieving revision 1.23 44+++ libgtkhtml/css/cssparser.c 2006-02-05 18:19:15.000000000 +0000
48diff -u -r1.23 cssparser.c 45@@ -49,7 +49,7 @@ const gchar *css_dimensions[] = {
49--- libgtkhtml/css/cssparser.c 25 Sep 2005 02:07:21 -0000 1.23
50+++ libgtkhtml/css/cssparser.c 18 Jan 2006 18:24:09 -0000
51@@ -49,7 +49,7 @@
52 46
53 const gint css_n_dimensions = sizeof (css_dimensions) / sizeof (css_dimensions[0]); 47 const gint css_n_dimensions = sizeof (css_dimensions) / sizeof (css_dimensions[0]);
54 48
@@ -57,7 +51,7 @@ diff -u -r1.23 cssparser.c
57 51
58 /* FIXME: Needs more whitespace types */ 52 /* FIXME: Needs more whitespace types */
59 static gint 53 static gint
60@@ -443,7 +443,7 @@ 54@@ -443,7 +443,7 @@ css_parser_parse_number (const gchar *bu
61 } 55 }
62 56
63 static gint 57 static gint
@@ -66,7 +60,7 @@ diff -u -r1.23 cssparser.c
66 { 60 {
67 gint pos; 61 gint pos;
68 HtmlAtom atom; 62 HtmlAtom atom;
69@@ -481,7 +481,7 @@ 63@@ -481,7 +481,7 @@ css_parser_parse_term (const gchar *buff
70 return -1; 64 return -1;
71 } 65 }
72 66
@@ -75,7 +69,7 @@ diff -u -r1.23 cssparser.c
75 69
76 if (pos == -1) { 70 if (pos == -1) {
77 /* 71 /*
78@@ -495,10 +495,48 @@ 72@@ -495,10 +495,48 @@ css_parser_parse_term (const gchar *buff
79 pos = func_end; 73 pos = func_end;
80 } 74 }
81 if (pos != -1) { 75 if (pos != -1) {
@@ -126,7 +120,7 @@ diff -u -r1.23 cssparser.c
126 } 120 }
127 121
128 /* This is due to the ) */ 122 /* This is due to the ) */
129@@ -566,7 +604,7 @@ 123@@ -566,7 +604,7 @@ css_parser_parse_term (const gchar *buff
130 } 124 }
131 125
132 static gint 126 static gint
@@ -135,7 +129,7 @@ diff -u -r1.23 cssparser.c
135 { 129 {
136 gint pos = start_pos; 130 gint pos = start_pos;
137 gint n = 0; 131 gint n = 0;
138@@ -589,7 +627,7 @@ 132@@ -589,7 +627,7 @@ css_parser_parse_value (const gchar *buf
139 css_value_list_append (list, term, list_sep); 133 css_value_list_append (list, term, list_sep);
140 } 134 }
141 135
@@ -144,7 +138,7 @@ diff -u -r1.23 cssparser.c
144 138
145 if (pos == -1) { 139 if (pos == -1) {
146 if (list) 140 if (list)
147@@ -618,7 +656,7 @@ 141@@ -618,7 +656,7 @@ css_parser_parse_value (const gchar *buf
148 } 142 }
149 else { 143 else {
150 /* Try and parse the term to see if it's valid */ 144 /* Try and parse the term to see if it's valid */
@@ -153,7 +147,7 @@ diff -u -r1.23 cssparser.c
153 if (term) 147 if (term)
154 css_value_unref (term); 148 css_value_unref (term);
155 if (list) 149 if (list)
156@@ -1005,7 +1043,7 @@ 150@@ -1005,7 +1043,7 @@ css_parser_parse_selectors (const gchar
157 } 151 }
158 152
159 static gint 153 static gint
@@ -162,7 +156,7 @@ diff -u -r1.23 cssparser.c
162 { 156 {
163 CssValue *value; 157 CssValue *value;
164 CssDeclaration *result; 158 CssDeclaration *result;
165@@ -1040,7 +1078,7 @@ 159@@ -1040,7 +1078,7 @@ css_parser_parse_declaration (const gcha
166 160
167 pos = css_parser_parse_whitespace (buffer, pos, prio_pos); 161 pos = css_parser_parse_whitespace (buffer, pos, prio_pos);
168 162
@@ -171,7 +165,7 @@ diff -u -r1.23 cssparser.c
171 165
172 if (pos == -1) { 166 if (pos == -1) {
173 return end_pos; 167 return end_pos;
174@@ -1063,7 +1101,7 @@ 168@@ -1063,7 +1101,7 @@ css_parser_parse_declaration (const gcha
175 } 169 }
176 170
177 static CssDeclaration ** 171 static CssDeclaration **
@@ -180,7 +174,7 @@ diff -u -r1.23 cssparser.c
180 { 174 {
181 gint pos = start_pos; 175 gint pos = start_pos;
182 gint cur_pos = start_pos; 176 gint cur_pos = start_pos;
183@@ -1079,7 +1117,7 @@ 177@@ -1079,7 +1117,7 @@ css_parser_parse_declarations (const gch
184 178
185 pos = css_parser_parse_to_char (buffer, ';', pos, end_pos); 179 pos = css_parser_parse_to_char (buffer, ';', pos, end_pos);
186 180
@@ -189,7 +183,7 @@ diff -u -r1.23 cssparser.c
189 183
190 if (declaration) { 184 if (declaration) {
191 if (n_decl == n_decl_max) 185 if (n_decl == n_decl_max)
192@@ -1100,7 +1138,7 @@ 186@@ -1100,7 +1138,7 @@ css_parser_parse_declarations (const gch
193 } 187 }
194 188
195 static gint 189 static gint
@@ -198,7 +192,7 @@ diff -u -r1.23 cssparser.c
198 { 192 {
199 gint cur_pos; 193 gint cur_pos;
200 gint pos; 194 gint pos;
201@@ -1143,7 +1181,7 @@ 195@@ -1143,7 +1181,7 @@ css_parser_parse_ruleset (const gchar *b
202 } 196 }
203 cur_pos = css_parser_parse_whitespace (buffer, cur_pos, end_pos); 197 cur_pos = css_parser_parse_whitespace (buffer, cur_pos, end_pos);
204 198
@@ -207,7 +201,7 @@ diff -u -r1.23 cssparser.c
207 201
208 pos++; 202 pos++;
209 203
210@@ -1186,7 +1224,8 @@ 204@@ -1186,7 +1224,8 @@ css_parser_prepare_stylesheet (const gch
211 } 205 }
212 else if (str[pos] == '/' && 206 else if (str[pos] == '/' &&
213 pos + 1 <= len && 207 pos + 1 <= len &&
@@ -217,7 +211,7 @@ diff -u -r1.23 cssparser.c
217 while (pos < len && 211 while (pos < len &&
218 str[pos] != '\n') 212 str[pos] != '\n')
219 pos++; 213 pos++;
220@@ -1204,7 +1243,7 @@ 214@@ -1204,7 +1243,7 @@ css_parser_prepare_stylesheet (const gch
221 } 215 }
222 216
223 static gint 217 static gint
@@ -226,7 +220,7 @@ diff -u -r1.23 cssparser.c
226 { 220 {
227 gint pos = start_pos; 221 gint pos = start_pos;
228 gint tmp_pos, cur_pos; 222 gint tmp_pos, cur_pos;
229@@ -1257,14 +1296,14 @@ 223@@ -1257,14 +1296,14 @@ css_parser_parse_atkeyword (const gchar
230 tmp_pos++; 224 tmp_pos++;
231 225
232 226
@@ -243,7 +237,7 @@ diff -u -r1.23 cssparser.c
243 237
244 if (n_rs == n_rs_max) 238 if (n_rs == n_rs_max)
245 rs = g_realloc (rs, sizeof (CssRuleset *) * 239 rs = g_realloc (rs, sizeof (CssRuleset *) *
246@@ -1277,7 +1316,7 @@ 240@@ -1277,7 +1316,7 @@ css_parser_parse_atkeyword (const gchar
247 241
248 pos = css_parser_parse_whitespace (buffer, tmp_pos + 1, end_pos); 242 pos = css_parser_parse_whitespace (buffer, tmp_pos + 1, end_pos);
249 243
@@ -252,7 +246,7 @@ diff -u -r1.23 cssparser.c
252 result->type = CSS_MEDIA_RULE; 246 result->type = CSS_MEDIA_RULE;
253 result->s.media_rule.rs = rs; 247 result->s.media_rule.rs = rs;
254 result->s.media_rule.n_rs = n_rs; 248 result->s.media_rule.n_rs = n_rs;
255@@ -1318,11 +1357,11 @@ 249@@ -1318,11 +1357,11 @@ css_parser_parse_atkeyword (const gchar
256 250
257 pos = css_parser_parse_whitespace (buffer, pos, cur_pos); 251 pos = css_parser_parse_whitespace (buffer, pos, cur_pos);
258 252
@@ -266,7 +260,7 @@ diff -u -r1.23 cssparser.c
266 result->type = CSS_PAGE_RULE; 260 result->type = CSS_PAGE_RULE;
267 result->s.page_rule.name = name; 261 result->s.page_rule.name = name;
268 result->s.page_rule.pseudo = pseudo; 262 result->s.page_rule.pseudo = pseudo;
269@@ -1337,8 +1376,8 @@ 263@@ -1337,8 +1376,8 @@ css_parser_parse_atkeyword (const gchar
270 pos = css_parser_parse_whitespace (buffer, pos + 1, end_pos); 264 pos = css_parser_parse_whitespace (buffer, pos + 1, end_pos);
271 cur_pos = css_parser_parse_to_char (buffer, '}', pos, end_pos); 265 cur_pos = css_parser_parse_to_char (buffer, '}', pos, end_pos);
272 266
@@ -277,7 +271,7 @@ diff -u -r1.23 cssparser.c
277 result->type = CSS_FONT_FACE_RULE; 271 result->type = CSS_FONT_FACE_RULE;
278 272
279 result->s.font_face_rule.n_decl = n_decl; 273 result->s.font_face_rule.n_decl = n_decl;
280@@ -1349,8 +1388,61 @@ 274@@ -1349,8 +1388,61 @@ css_parser_parse_atkeyword (const gchar
281 return cur_pos + 1; 275 return cur_pos + 1;
282 276
283 break; 277 break;
@@ -339,7 +333,7 @@ diff -u -r1.23 cssparser.c
339 /* Unknown keyword detected, skip to next block */ 333 /* Unknown keyword detected, skip to next block */
340 while (pos < end_pos) { 334 while (pos < end_pos) {
341 /* Handle a dangling semi-colon */ 335 /* Handle a dangling semi-colon */
342@@ -1373,7 +1465,7 @@ 336@@ -1373,7 +1465,7 @@ css_parser_parse_atkeyword (const gchar
343 } 337 }
344 338
345 CssRuleset * 339 CssRuleset *
@@ -348,7 +342,7 @@ diff -u -r1.23 cssparser.c
348 { 342 {
349 CssRuleset *result; 343 CssRuleset *result;
350 344
351@@ -1382,7 +1474,7 @@ 345@@ -1382,7 +1474,7 @@ css_parser_parse_style_attr (const gchar
352 346
353 /* FIXME: Are comments allowed here? */ 347 /* FIXME: Are comments allowed here? */
354 348
@@ -357,7 +351,7 @@ diff -u -r1.23 cssparser.c
357 351
358 if (!decl) 352 if (!decl)
359 return NULL; 353 return NULL;
360@@ -1397,9 +1489,8 @@ 354@@ -1397,9 +1489,8 @@ css_parser_parse_style_attr (const gchar
361 } 355 }
362 356
363 CssStylesheet * 357 CssStylesheet *
@@ -368,7 +362,7 @@ diff -u -r1.23 cssparser.c
368 CssStylesheet *result; 362 CssStylesheet *result;
369 GSList *stat = NULL; 363 GSList *stat = NULL;
370 gchar *buffer; 364 gchar *buffer;
371@@ -1413,26 +1504,23 @@ 365@@ -1413,26 +1504,23 @@ css_parser_parse_stylesheet (const gchar
372 end_pos = len; 366 end_pos = len;
373 while (pos < len) { 367 while (pos < len) {
374 if (buffer[pos] == '@') { 368 if (buffer[pos] == '@') {
@@ -405,7 +399,7 @@ diff -u -r1.23 cssparser.c
405 } 399 }
406 400
407 if (pos == -1) 401 if (pos == -1)
408@@ -1444,7 +1532,7 @@ 402@@ -1444,7 +1532,7 @@ css_parser_parse_stylesheet (const gchar
409 403
410 g_free (buffer); 404 g_free (buffer);
411 405
@@ -416,11 +410,8 @@ diff -u -r1.23 cssparser.c
416 return result; 410 return result;
417Index: libgtkhtml/css/cssparser.h 411Index: libgtkhtml/css/cssparser.h
418=================================================================== 412===================================================================
419RCS file: /cvs/gnome/gtkhtml2/libgtkhtml/css/cssparser.h,v 413--- libgtkhtml/css/cssparser.h.orig 2006-02-04 20:10:47.000000000 +0000
420retrieving revision 1.7 414+++ libgtkhtml/css/cssparser.h 2006-02-05 18:19:15.000000000 +0000
421diff -u -r1.7 cssparser.h
422--- libgtkhtml/css/cssparser.h 6 Dec 2002 17:16:54 -0000 1.7
423+++ libgtkhtml/css/cssparser.h 18 Jan 2006 18:24:09 -0000
424@@ -24,13 +24,14 @@ 415@@ -24,13 +24,14 @@
425 #define __CSSPARSER_H__ 416 #define __CSSPARSER_H__
426 417
@@ -440,12 +431,9 @@ diff -u -r1.7 cssparser.h
440 431
441Index: libgtkhtml/css/cssstylesheet.h 432Index: libgtkhtml/css/cssstylesheet.h
442=================================================================== 433===================================================================
443RCS file: /cvs/gnome/gtkhtml2/libgtkhtml/css/cssstylesheet.h,v 434--- libgtkhtml/css/cssstylesheet.h.orig 2006-02-04 20:10:47.000000000 +0000
444retrieving revision 1.7 435+++ libgtkhtml/css/cssstylesheet.h 2006-02-05 18:19:15.000000000 +0000
445diff -u -r1.7 cssstylesheet.h 436@@ -181,6 +181,7 @@ struct _CssTail {
446--- libgtkhtml/css/cssstylesheet.h 21 Apr 2004 14:17:00 -0000 1.7
447+++ libgtkhtml/css/cssstylesheet.h 18 Jan 2006 18:24:09 -0000
448@@ -181,6 +181,7 @@
449 }; 437 };
450 438
451 struct _CssStylesheet { 439 struct _CssStylesheet {
@@ -455,12 +443,9 @@ diff -u -r1.7 cssstylesheet.h
455 }; 443 };
456Index: libgtkhtml/css/cssvalue.c 444Index: libgtkhtml/css/cssvalue.c
457=================================================================== 445===================================================================
458RCS file: /cvs/gnome/gtkhtml2/libgtkhtml/css/cssvalue.c,v 446--- libgtkhtml/css/cssvalue.c.orig 2006-02-04 20:10:47.000000000 +0000
459retrieving revision 1.6 447+++ libgtkhtml/css/cssvalue.c 2006-02-04 20:13:33.000000000 +0000
460diff -u -r1.6 cssvalue.c 448@@ -64,7 +64,7 @@ css_value_function_new (HtmlAtom name, C
461--- libgtkhtml/css/cssvalue.c 21 Apr 2004 14:17:00 -0000 1.6
462+++ libgtkhtml/css/cssvalue.c 18 Jan 2006 18:24:09 -0000
463@@ -64,7 +64,7 @@
464 function->name = name; 449 function->name = name;
465 function->args = args; 450 function->args = args;
466 451
@@ -471,12 +456,9 @@ diff -u -r1.6 cssvalue.c
471 result->v.function = function; 456 result->v.function = function;
472Index: libgtkhtml/document/htmldocument.c 457Index: libgtkhtml/document/htmldocument.c
473=================================================================== 458===================================================================
474RCS file: /cvs/gnome/gtkhtml2/libgtkhtml/document/htmldocument.c,v 459--- libgtkhtml/document/htmldocument.c.orig 2006-02-04 20:10:47.000000000 +0000
475retrieving revision 1.122 460+++ libgtkhtml/document/htmldocument.c 2006-02-05 18:19:17.000000000 +0000
476diff -u -r1.122 htmldocument.c 461@@ -134,14 +134,42 @@ static void
477--- libgtkhtml/document/htmldocument.c 21 Feb 2005 17:31:31 -0000 1.122
478+++ libgtkhtml/document/htmldocument.c 18 Jan 2006 18:24:11 -0000
479@@ -139,14 +139,42 @@
480 html_document_stylesheet_stream_close (const gchar *buffer, gint len, gpointer data) 462 html_document_stylesheet_stream_close (const gchar *buffer, gint len, gpointer data)
481 { 463 {
482 CssStylesheet *sheet; 464 CssStylesheet *sheet;
@@ -522,7 +504,7 @@ diff -u -r1.122 htmldocument.c
522 document->stylesheets = g_slist_append (document->stylesheets, sheet); 504 document->stylesheets = g_slist_append (document->stylesheets, sheet);
523 505
524 /* Restyle the document */ 506 /* Restyle the document */
525@@ -184,9 +212,15 @@ 507@@ -179,9 +207,15 @@ html_document_node_inserted_traverser (H
526 508
527 if (str && (strcasecmp (str, "stylesheet") == 0)) { 509 if (str && (strcasecmp (str, "stylesheet") == 0)) {
528 gchar *url = xmlGetProp (node->xmlnode, "href"); 510 gchar *url = xmlGetProp (node->xmlnode, "href");
@@ -540,7 +522,7 @@ diff -u -r1.122 htmldocument.c
540 522
541 g_signal_emit (G_OBJECT (document), document_signals [REQUEST_URL], 0, url, stream); 523 g_signal_emit (G_OBJECT (document), document_signals [REQUEST_URL], 0, url, stream);
542 } 524 }
543@@ -247,12 +281,39 @@ 525@@ -242,12 +276,39 @@ html_document_node_inserted_traverser (H
544 526
545 CssStylesheet *ss; 527 CssStylesheet *ss;
546 HtmlStyleChange style_change; 528 HtmlStyleChange style_change;
@@ -586,11 +568,8 @@ diff -u -r1.122 htmldocument.c
586 else if ((node->xmlnode->type == XML_TEXT_NODE || node->xmlnode->type == XML_COMMENT_NODE) && node->xmlnode->parent && strcasecmp (node->xmlnode->parent->name, "script") == 0) { 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) {
587Index: libgtkhtml/document/htmldocument.h 569Index: libgtkhtml/document/htmldocument.h
588=================================================================== 570===================================================================
589RCS file: /cvs/gnome/gtkhtml2/libgtkhtml/document/htmldocument.h,v 571--- libgtkhtml/document/htmldocument.h.orig 2006-02-04 20:10:47.000000000 +0000
590retrieving revision 1.35 572+++ libgtkhtml/document/htmldocument.h 2006-02-05 18:19:17.000000000 +0000
591diff -u -r1.35 htmldocument.h
592--- libgtkhtml/document/htmldocument.h 13 Feb 2005 15:33:19 -0000 1.35
593+++ libgtkhtml/document/htmldocument.h 18 Jan 2006 18:24:12 -0000
594@@ -25,6 +25,7 @@ 573@@ -25,6 +25,7 @@
595 574
596 typedef struct _HtmlDocument HtmlDocument; 575 typedef struct _HtmlDocument HtmlDocument;
@@ -599,7 +578,7 @@ diff -u -r1.35 htmldocument.h
599 578
600 #include <gtk/gtk.h> 579 #include <gtk/gtk.h>
601 580
602@@ -93,6 +94,10 @@ 581@@ -93,6 +94,10 @@ struct _HtmlDocumentClass {
603 gboolean (*dom_mouse_out) (HtmlDocument *document, DomEvent *event); 582 gboolean (*dom_mouse_out) (HtmlDocument *document, DomEvent *event);
604 }; 583 };
605 584
@@ -612,12 +591,9 @@ diff -u -r1.35 htmldocument.h
612 591
613Index: libgtkhtml/layout/htmlboxblock.c 592Index: libgtkhtml/layout/htmlboxblock.c
614=================================================================== 593===================================================================
615RCS file: /cvs/gnome/gtkhtml2/libgtkhtml/layout/htmlboxblock.c,v 594--- libgtkhtml/layout/htmlboxblock.c.orig 2006-02-04 20:10:47.000000000 +0000
616retrieving revision 1.115 595+++ libgtkhtml/layout/htmlboxblock.c 2006-02-04 20:13:33.000000000 +0000
617diff -u -r1.115 htmlboxblock.c 596@@ -100,17 +100,21 @@ html_real_box_block_update_geometry (Htm
618--- libgtkhtml/layout/htmlboxblock.c 6 Jan 2004 10:09:56 -0000 1.115
619+++ libgtkhtml/layout/htmlboxblock.c 18 Jan 2006 18:24:14 -0000
620@@ -100,17 +100,21 @@
621 HtmlBoxBlock *block = HTML_BOX_BLOCK (self); 597 HtmlBoxBlock *block = HTML_BOX_BLOCK (self);
622 gint full_width; 598 gint full_width;
623 599
@@ -640,68 +616,11 @@ diff -u -r1.115 htmlboxblock.c
640 full_width = MAX (line->width, line->full_width); 616 full_width = MAX (line->width, line->full_width);
641 617
642 if (full_width > block->full_width) 618 if (full_width > block->full_width)
643@@ -233,7 +237,7 @@
644 HtmlBoxBlock *block = HTML_BOX_BLOCK (self);
645 HtmlLineBox *line;
646
647- /* If it is a flotbox, just add it */
648+ /* If it is a floatbox, just add it */
649 if (HTML_BOX_GET_STYLE (box)->Float != HTML_FLOAT_NONE) {
650 html_box_block_handle_float (self, relayout, box, *y, boxwidth);
651 return NULL;
652Index: libgtkhtml/layout/htmlstyleinherited.c
653===================================================================
654RCS file: /cvs/gnome/gtkhtml2/libgtkhtml/layout/htmlstyleinherited.c,v
655retrieving revision 1.15
656diff -u -r1.15 htmlstyleinherited.c
657--- libgtkhtml/layout/htmlstyleinherited.c 6 Dec 2002 17:17:15 -0000 1.15
658+++ libgtkhtml/layout/htmlstyleinherited.c 18 Jan 2006 18:24:15 -0000
659@@ -300,6 +300,37 @@
660 *size = (gint) (val->v.d * old_size);
661 return TRUE;
662 default:
663+ switch (val->v.atom) {
664+ /* FIXME: These values are copy/pasted from html.css.h, X_SMALL is guessed */
665+ case HTML_ATOM_XX_SMALL:
666+ *size = (gint) (0.67 * old_size);
667+ return TRUE;
668+ case HTML_ATOM_X_SMALL:
669+ *size = (gint) (0.75 * old_size);
670+ return TRUE;
671+ case HTML_ATOM_SMALL:
672+ *size = (gint) (0.83 * old_size);
673+ return TRUE;
674+ case HTML_ATOM_MEDIUM:
675+ *size = (gint) (1 * old_size);
676+ return TRUE;
677+ case HTML_ATOM_LARGE:
678+ *size = (gint) (1.17 * old_size);
679+ return TRUE;
680+ case HTML_ATOM_X_LARGE:
681+ *size = (gint) (1.5 * old_size);
682+ return TRUE;
683+ case HTML_ATOM_XX_LARGE:
684+ *size = (gint) (2 * old_size);
685+ return TRUE;
686+ /* FIXME: These are absolutely guessed. Size should always be one of the above seven. */
687+ case HTML_ATOM_LARGER:
688+ *size = (gint) (0.8 * old_size);
689+ return TRUE;
690+ case HTML_ATOM_SMALLER:
691+ *size = (gint) (1.2 * old_size);
692+ return TRUE;
693+ }
694 return FALSE;
695 }
696 }
697Index: libgtkhtml/view/htmlevent.c 619Index: libgtkhtml/view/htmlevent.c
698=================================================================== 620===================================================================
699RCS file: /cvs/gnome/gtkhtml2/libgtkhtml/view/htmlevent.c,v 621--- libgtkhtml/view/htmlevent.c.orig 2006-02-04 20:10:47.000000000 +0000
700retrieving revision 1.41 622+++ libgtkhtml/view/htmlevent.c 2006-02-04 20:13:33.000000000 +0000
701diff -u -r1.41 htmlevent.c 623@@ -46,14 +46,48 @@ html_event_find_parent_dom_node (HtmlBox
702--- libgtkhtml/view/htmlevent.c 14 Sep 2004 06:34:27 -0000 1.41
703+++ libgtkhtml/view/htmlevent.c 18 Jan 2006 18:24:17 -0000
704@@ -46,14 +46,48 @@
705 static gboolean 624 static gboolean
706 html_event_xy_in_box (HtmlBox *box, gint tx, gint ty, gint x, gint y) 625 html_event_xy_in_box (HtmlBox *box, gint tx, gint ty, gint x, gint y)
707 { 626 {
@@ -752,7 +671,7 @@ diff -u -r1.41 htmlevent.c
752 } 671 }
753 672
754 static void 673 static void
755@@ -64,12 +98,6 @@ 674@@ -64,12 +98,6 @@ html_event_find_box_traverser (HtmlBox *
756 box = self->children; 675 box = self->children;
757 676
758 while (box) { 677 while (box) {
diff --git a/openembedded/packages/gtkhtml2/files/css-media.patch b/openembedded/packages/gtkhtml2/files/css-media.patch
index 999ce196dc..a2d4d2b68c 100644
--- a/openembedded/packages/gtkhtml2/files/css-media.patch
+++ b/openembedded/packages/gtkhtml2/files/css-media.patch
@@ -1,8 +1,8 @@
1Index: gtkhtml2/libgtkhtml/css/cssmatcher.c 1Index: libgtkhtml/css/cssmatcher.c
2=================================================================== 2===================================================================
3--- gtkhtml2.orig/libgtkhtml/css/cssmatcher.c 2006-01-25 02:07:44.000000000 +0000 3--- libgtkhtml/css/cssmatcher.c.orig 2006-02-05 18:19:15.000000000 +0000
4+++ gtkhtml2/libgtkhtml/css/cssmatcher.c 2006-02-01 02:19:13.000000000 +0000 4+++ libgtkhtml/css/cssmatcher.c 2006-02-05 18:20:15.000000000 +0000
5@@ -2411,7 +2411,8 @@ 5@@ -2411,7 +2411,8 @@ css_matcher_apply_stylesheet (HtmlDocume
6 CssStatement *stat = list->data; 6 CssStatement *stat = list->data;
7 gint j; 7 gint j;
8 8
@@ -12,7 +12,7 @@ Index: gtkhtml2/libgtkhtml/css/cssmatcher.c
12 if (stat->s.import_rule.fetched) { 12 if (stat->s.import_rule.fetched) {
13 if (stat->s.import_rule.sheet) { 13 if (stat->s.import_rule.sheet) {
14 css_matcher_apply_stylesheet (doc, stat->s.import_rule.sheet, node, declaration_list, type, pseudo); 14 css_matcher_apply_stylesheet (doc, stat->s.import_rule.sheet, node, declaration_list, type, pseudo);
15@@ -2440,31 +2441,65 @@ 15@@ -2440,31 +2441,65 @@ css_matcher_apply_stylesheet (HtmlDocume
16 g_free (str); 16 g_free (str);
17 #endif 17 #endif
18 } 18 }
@@ -97,7 +97,7 @@ Index: gtkhtml2/libgtkhtml/css/cssmatcher.c
97 } 97 }
98 } 98 }
99 } 99 }
100@@ -2781,7 +2816,7 @@ 100@@ -2781,7 +2816,7 @@ css_matcher_get_style (HtmlDocument *doc
101 css_matcher_html_to_css (doc, style, node); 101 css_matcher_html_to_css (doc, style, node);
102 102
103 if (!default_stylesheet) { 103 if (!default_stylesheet) {
@@ -106,7 +106,7 @@ Index: gtkhtml2/libgtkhtml/css/cssmatcher.c
106 } 106 }
107 107
108 css_matcher_apply_stylesheet (doc, default_stylesheet, node, &declaration_list, CSS_STYLESHEET_DEFAULT, pseudo); 108 css_matcher_apply_stylesheet (doc, default_stylesheet, node, &declaration_list, CSS_STYLESHEET_DEFAULT, pseudo);
109@@ -2800,25 +2835,31 @@ 109@@ -2800,25 +2835,31 @@ css_matcher_get_style (HtmlDocument *doc
110 prop = xmlGetProp (node, "style"); 110 prop = xmlGetProp (node, "style");
111 111
112 if (prop) { 112 if (prop) {
@@ -153,11 +153,11 @@ Index: gtkhtml2/libgtkhtml/css/cssmatcher.c
153 xmlFree (prop); 153 xmlFree (prop);
154 } 154 }
155 155
156Index: gtkhtml2/libgtkhtml/document/htmldocument.c 156Index: libgtkhtml/document/htmldocument.c
157=================================================================== 157===================================================================
158--- gtkhtml2.orig/libgtkhtml/document/htmldocument.c 2006-01-25 02:07:49.000000000 +0000 158--- libgtkhtml/document/htmldocument.c.orig 2006-02-05 18:20:06.000000000 +0000
159+++ gtkhtml2/libgtkhtml/document/htmldocument.c 2006-02-01 02:19:13.000000000 +0000 159+++ libgtkhtml/document/htmldocument.c 2006-02-05 18:20:15.000000000 +0000
160@@ -147,9 +147,7 @@ 160@@ -142,9 +142,7 @@ html_document_stylesheet_stream_close (c
161 if (!buffer) 161 if (!buffer)
162 return; 162 return;
163 163
@@ -168,7 +168,7 @@ Index: gtkhtml2/libgtkhtml/document/htmldocument.c
168 168
169 for (list = sheet->stat; list; list = list->next) { 169 for (list = sheet->stat; list; list = list->next) {
170 CssStatement *statement = list->data; 170 CssStatement *statement = list->data;
171@@ -158,15 +156,13 @@ 171@@ -153,15 +151,13 @@ html_document_stylesheet_stream_close (c
172 switch (statement->type) { 172 switch (statement->type) {
173 case CSS_IMPORT_RULE: { 173 case CSS_IMPORT_RULE: {
174 HtmlDocumentStreamData *stream_data_import; 174 HtmlDocumentStreamData *stream_data_import;
@@ -187,7 +187,7 @@ Index: gtkhtml2/libgtkhtml/document/htmldocument.c
187 break; 187 break;
188 } 188 }
189 default: 189 default:
190@@ -174,8 +170,11 @@ 190@@ -169,8 +165,11 @@ html_document_stylesheet_stream_close (c
191 } 191 }
192 } 192 }
193 193
@@ -200,7 +200,7 @@ Index: gtkhtml2/libgtkhtml/document/htmldocument.c
200 200
201 /* Restyle the document */ 201 /* Restyle the document */
202 style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), NULL, TRUE); 202 style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), NULL, TRUE);
203@@ -216,21 +215,22 @@ 203@@ -211,21 +210,22 @@ html_document_node_inserted_traverser (H
204 HtmlDocumentStreamData *stream_data; 204 HtmlDocumentStreamData *stream_data;
205 HtmlStream *stream; 205 HtmlStream *stream;
206 206
@@ -226,7 +226,7 @@ Index: gtkhtml2/libgtkhtml/document/htmldocument.c
226 } 226 }
227 g_free (str); 227 g_free (str);
228 } 228 }
229@@ -282,8 +282,10 @@ 229@@ -277,8 +277,10 @@ html_document_node_inserted_traverser (H
230 CssStylesheet *ss; 230 CssStylesheet *ss;
231 HtmlStyleChange style_change; 231 HtmlStyleChange style_change;
232 GSList *list; 232 GSList *list;
@@ -238,7 +238,7 @@ Index: gtkhtml2/libgtkhtml/document/htmldocument.c
238 238
239 for (list = ss->stat; list; list = list->next) { 239 for (list = ss->stat; list; list = list->next) {
240 CssStatement *statement = list->data; 240 CssStatement *statement = list->data;
241@@ -296,9 +298,10 @@ 241@@ -291,9 +293,10 @@ html_document_node_inserted_traverser (H
242 242
243 cssurl = css_value_to_string (statement->s.import_rule.url); 243 cssurl = css_value_to_string (statement->s.import_rule.url);
244 244
@@ -250,7 +250,7 @@ Index: gtkhtml2/libgtkhtml/document/htmldocument.c
250 250
251 stream = html_stream_buffer_new (html_document_stylesheet_stream_close, stream_data); 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); 252 g_signal_emit (G_OBJECT (document), document_signals [REQUEST_URL], 0, cssurl, stream);
253@@ -546,6 +549,9 @@ 253@@ -541,6 +544,9 @@ html_document_finalize (GObject *object)
254 254
255 if (document->parser) 255 if (document->parser)
256 g_object_unref (G_OBJECT (document->parser)); 256 g_object_unref (G_OBJECT (document->parser));
@@ -260,7 +260,7 @@ Index: gtkhtml2/libgtkhtml/document/htmldocument.c
260 260
261 parent_class->finalize (object); 261 parent_class->finalize (object);
262 } 262 }
263@@ -753,6 +759,7 @@ 263@@ -748,6 +754,7 @@ html_document_init (HtmlDocument *docume
264 { 264 {
265 document->stylesheets = NULL; 265 document->stylesheets = NULL;
266 document->image_factory = html_image_factory_new (); 266 document->image_factory = html_image_factory_new ();
@@ -268,25 +268,7 @@ Index: gtkhtml2/libgtkhtml/document/htmldocument.c
268 268
269 g_signal_connect (G_OBJECT (document->image_factory), "request_image", 269 g_signal_connect (G_OBJECT (document->image_factory), "request_image",
270 G_CALLBACK (html_document_request_image), document); 270 G_CALLBACK (html_document_request_image), document);
271@@ -1129,7 +1136,7 @@ 271@@ -1150,3 +1157,24 @@ html_document_remove_stylesheet (HtmlDoc
272 }
273
274 CssStylesheet *
275-html_document_add_stylesheet (HtmlDocument *document, const gchar *buffer, gint len)
276+html_document_add_stylesheet (HtmlDocument *document, const gchar *buffer, gint len, const gchar *media)
277 {
278 CssStylesheet *sheet;
279 HtmlStyleChange style_change;
280@@ -1140,7 +1147,7 @@
281 * complications it would cause with removal.
282 */
283
284- sheet = css_parser_parse_stylesheet (buffer, len, NULL);
285+ sheet = css_parser_parse_stylesheet (buffer, len, NULL, media);
286 document->stylesheets = g_slist_append (document->stylesheets, sheet);
287
288 style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), NULL, TRUE);
289@@ -1159,3 +1166,24 @@
290 return TRUE; 272 return TRUE;
291 } 273 }
292 274
@@ -311,11 +293,11 @@ Index: gtkhtml2/libgtkhtml/document/htmldocument.c
311+{ 293+{
312+ return document->media_type; 294+ return document->media_type;
313+} 295+}
314Index: gtkhtml2/libgtkhtml/document/htmldocument.h 296Index: libgtkhtml/document/htmldocument.h
315=================================================================== 297===================================================================
316--- gtkhtml2.orig/libgtkhtml/document/htmldocument.h 2006-01-25 02:07:49.000000000 +0000 298--- libgtkhtml/document/htmldocument.h.orig 2006-02-05 18:20:06.000000000 +0000
317+++ gtkhtml2/libgtkhtml/document/htmldocument.h 2006-01-25 02:07:50.000000000 +0000 299+++ libgtkhtml/document/htmldocument.h 2006-02-05 18:20:15.000000000 +0000
318@@ -64,6 +64,8 @@ 300@@ -64,6 +64,8 @@ struct _HtmlDocument {
319 DomNode *hover_node; 301 DomNode *hover_node;
320 DomNode *active_node; 302 DomNode *active_node;
321 DomElement *focus_element; 303 DomElement *focus_element;
@@ -324,7 +306,7 @@ Index: gtkhtml2/libgtkhtml/document/htmldocument.h
324 }; 306 };
325 307
326 struct _HtmlDocumentClass { 308 struct _HtmlDocumentClass {
327@@ -97,6 +99,7 @@ 309@@ -97,6 +99,7 @@ struct _HtmlDocumentClass {
328 struct _HtmlDocumentStreamData { 310 struct _HtmlDocumentStreamData {
329 HtmlDocument *document; 311 HtmlDocument *document;
330 gpointer internal_data; 312 gpointer internal_data;
@@ -332,25 +314,22 @@ Index: gtkhtml2/libgtkhtml/document/htmldocument.h
332 }; 314 };
333 315
334 GType html_document_get_type (void); 316 GType html_document_get_type (void);
335@@ -113,9 +116,12 @@ 317@@ -116,6 +119,10 @@ DomNode *html_document_find_anchor
336 void html_document_update_focus_element (HtmlDocument *document, DomElement *element); 318 void html_document_add_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet);
337 DomNode *html_document_find_anchor (HtmlDocument *doc, const gchar *anchor);
338
339-CssStylesheet *html_document_add_stylesheet (HtmlDocument *document, const gchar *buffer, gint len);
340+CssStylesheet *html_document_add_stylesheet (HtmlDocument *document, const gchar *buffer, gint len, const gchar *media);
341 gboolean html_document_remove_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet); 319 gboolean html_document_remove_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet);
342 320
343+void html_document_set_media_type (HtmlDocument *document, const gchar *type); 321+void html_document_set_media_type (HtmlDocument *document, const gchar *type);
344+const gchar *html_document_get_media_type (HtmlDocument *document); 322+const gchar *html_document_get_media_type (HtmlDocument *document);
323+
345+ 324+
346 G_END_DECLS 325 G_END_DECLS
347 326
348 #endif /* __HTMLDOCUMENT_H__ */ 327 #endif /* __HTMLDOCUMENT_H__ */
349Index: gtkhtml2/libgtkhtml/css/cssparser.c 328Index: libgtkhtml/css/cssparser.c
350=================================================================== 329===================================================================
351--- gtkhtml2.orig/libgtkhtml/css/cssparser.c 2006-01-25 02:05:54.000000000 +0000 330--- libgtkhtml/css/cssparser.c.orig 2006-02-05 18:19:15.000000000 +0000
352+++ gtkhtml2/libgtkhtml/css/cssparser.c 2006-01-25 02:07:50.000000000 +0000 331+++ libgtkhtml/css/cssparser.c 2006-02-05 18:20:15.000000000 +0000
353@@ -688,6 +688,32 @@ 332@@ -688,6 +688,32 @@ css_parser_parse_value (const gchar *buf
354 return pos; 333 return pos;
355 } 334 }
356 335
@@ -383,7 +362,7 @@ Index: gtkhtml2/libgtkhtml/css/cssparser.c
383 362
384 static gint 363 static gint
385 css_parser_parse_attr_selector (const gchar *buffer, gint start_pos, gint end_pos, CssTail *tail) 364 css_parser_parse_attr_selector (const gchar *buffer, gint start_pos, gint end_pos, CssTail *tail)
386@@ -1329,7 +1355,7 @@ 365@@ -1329,7 +1355,7 @@ css_parser_parse_atkeyword (const gchar
387 366
388 /* g_print ("Going to return: %d\n", pos); */ 367 /* g_print ("Going to return: %d\n", pos); */
389 368
@@ -392,7 +371,7 @@ Index: gtkhtml2/libgtkhtml/css/cssparser.c
392 371
393 break; 372 break;
394 case HTML_ATOM_PAGE: 373 case HTML_ATOM_PAGE:
395@@ -1390,7 +1416,8 @@ 374@@ -1390,7 +1416,8 @@ css_parser_parse_atkeyword (const gchar
396 break; 375 break;
397 case HTML_ATOM_IMPORT: { 376 case HTML_ATOM_IMPORT: {
398 gchar *import_url; 377 gchar *import_url;
@@ -402,7 +381,7 @@ Index: gtkhtml2/libgtkhtml/css/cssparser.c
402 381
403 cur_pos = css_parser_parse_to_char (buffer, ';', pos, end_pos); 382 cur_pos = css_parser_parse_to_char (buffer, ';', pos, end_pos);
404 383
405@@ -1411,6 +1438,7 @@ 384@@ -1411,6 +1438,7 @@ css_parser_parse_atkeyword (const gchar
406 return cur_pos + 1; 385 return cur_pos + 1;
407 } 386 }
408 387
@@ -410,7 +389,7 @@ Index: gtkhtml2/libgtkhtml/css/cssparser.c
410 s_url++; 389 s_url++;
411 e_url--; 390 e_url--;
412 391
413@@ -1434,6 +1462,11 @@ 392@@ -1434,6 +1462,11 @@ css_parser_parse_atkeyword (const gchar
414 result->type = CSS_IMPORT_RULE; 393 result->type = CSS_IMPORT_RULE;
415 394
416 result->s.import_rule.url = css_value_string_new (import_url); 395 result->s.import_rule.url = css_value_string_new (import_url);
@@ -422,7 +401,7 @@ Index: gtkhtml2/libgtkhtml/css/cssparser.c
422 401
423 *ret_val = result; 402 *ret_val = result;
424 403
425@@ -1489,7 +1522,7 @@ 404@@ -1489,7 +1522,7 @@ css_parser_parse_style_attr (const gchar
426 } 405 }
427 406
428 CssStylesheet * 407 CssStylesheet *
@@ -431,7 +410,7 @@ Index: gtkhtml2/libgtkhtml/css/cssparser.c
431 { 410 {
432 CssStylesheet *result; 411 CssStylesheet *result;
433 GSList *stat = NULL; 412 GSList *stat = NULL;
434@@ -1515,12 +1548,23 @@ 413@@ -1515,12 +1548,23 @@ css_parser_parse_stylesheet (const gchar
435 pos = css_parser_parse_ruleset (buffer, pos, end_pos, &ruleset, base_url); 414 pos = css_parser_parse_ruleset (buffer, pos, end_pos, &ruleset, base_url);
436 415
437 if (ruleset) { 416 if (ruleset) {
@@ -460,10 +439,10 @@ Index: gtkhtml2/libgtkhtml/css/cssparser.c
460 } 439 }
461 440
462 if (pos == -1) 441 if (pos == -1)
463Index: gtkhtml2/libgtkhtml/css/cssparser.h 442Index: libgtkhtml/css/cssparser.h
464=================================================================== 443===================================================================
465--- gtkhtml2.orig/libgtkhtml/css/cssparser.h 2006-01-25 02:05:54.000000000 +0000 444--- libgtkhtml/css/cssparser.h.orig 2006-02-05 18:19:15.000000000 +0000
466+++ gtkhtml2/libgtkhtml/css/cssparser.h 2006-01-25 02:07:50.000000000 +0000 445+++ libgtkhtml/css/cssparser.h 2006-02-05 18:20:15.000000000 +0000
467@@ -30,7 +30,7 @@ 446@@ -30,7 +30,7 @@
468 447
469 G_BEGIN_DECLS 448 G_BEGIN_DECLS
@@ -473,11 +452,11 @@ Index: gtkhtml2/libgtkhtml/css/cssparser.h
473 CssRuleset *css_parser_parse_style_attr (const gchar *buffer, gint len, const gchar *base_url); 452 CssRuleset *css_parser_parse_style_attr (const gchar *buffer, gint len, const gchar *base_url);
474 453
475 G_END_DECLS 454 G_END_DECLS
476Index: gtkhtml2/libgtkhtml/css/cssstylesheet.h 455Index: libgtkhtml/css/cssstylesheet.h
477=================================================================== 456===================================================================
478--- gtkhtml2.orig/libgtkhtml/css/cssstylesheet.h 2006-02-01 02:19:56.000000000 +0000 457--- libgtkhtml/css/cssstylesheet.h.orig 2006-02-05 18:19:15.000000000 +0000
479+++ gtkhtml2/libgtkhtml/css/cssstylesheet.h 2006-02-01 02:20:08.000000000 +0000 458+++ libgtkhtml/css/cssstylesheet.h 2006-02-05 18:20:15.000000000 +0000
480@@ -99,6 +99,7 @@ 459@@ -99,6 +99,7 @@ struct _CssStatement {
481 CssValue *url; 460 CssValue *url;
482 gboolean fetched; 461 gboolean fetched;
483 gboolean fetching; 462 gboolean fetching;
diff --git a/openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch b/openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch
index 85fe535126..01c9838953 100644
--- a/openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch
+++ b/openembedded/packages/gtkhtml2/files/css-stylesheet-user.patch
@@ -1,31 +1,27 @@
1Index: gtkhtml2/libgtkhtml/document/htmldocument.c 1Index: libgtkhtml/document/htmldocument.c
2=================================================================== 2===================================================================
3--- gtkhtml2.orig/libgtkhtml/document/htmldocument.c 2006-01-21 02:24:09.000000000 +0000 3--- libgtkhtml/document/htmldocument.c.orig 2006-02-05 18:19:17.000000000 +0000
4+++ gtkhtml2/libgtkhtml/document/htmldocument.c 2006-01-21 04:21:37.000000000 +0000 4+++ libgtkhtml/document/htmldocument.c 2006-02-05 18:20:06.000000000 +0000
5@@ -1127,3 +1127,35 @@ 5@@ -1122,3 +1122,31 @@ html_document_find_anchor (HtmlDocument
6 else 6 else
7 return NULL; 7 return NULL;
8 } 8 }
9+ 9+
10+CssStylesheet * 10+void
11+html_document_add_stylesheet (HtmlDocument *document, const gchar *buffer, gint len) 11+html_document_add_stylesheet (HtmlDocument *document, CssStylesheet *sheet)
12+{ 12+{
13+ CssStylesheet *sheet;
14+ HtmlStyleChange style_change; 13+ HtmlStyleChange style_change;
15+ 14+
16+ g_return_val_if_fail (buffer && (len > 0) && HTML_IS_DOCUMENT (document), NULL); 15+ g_return_val_if_fail (HTML_IS_DOCUMENT (document), NULL);
17+ 16+
18+ /* Note: @import not supported for user stylesheets, due to 17+ /* Note: @import not supported for user stylesheets, due to
19+ * complications it would cause with removal. 18+ * complications it would cause with removal.
20+ */ 19+ */
21+ 20+
22+ sheet = css_parser_parse_stylesheet (buffer, len, NULL);
23+ document->stylesheets = g_slist_append (document->stylesheets, sheet); 21+ document->stylesheets = g_slist_append (document->stylesheets, sheet);
24+ 22+
25+ style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), NULL, TRUE); 23+ style_change = html_document_restyle_node (document, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), NULL, TRUE);
26+ g_signal_emit (G_OBJECT (document), document_signals [STYLE_UPDATED], 0, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), style_change); 24+ g_signal_emit (G_OBJECT (document), document_signals [STYLE_UPDATED], 0, DOM_NODE (dom_Document__get_documentElement (document->dom_document)), style_change);
27+
28+ return sheet;
29+} 25+}
30+ 26+
31+gboolean 27+gboolean
@@ -38,15 +34,15 @@ Index: gtkhtml2/libgtkhtml/document/htmldocument.c
38+ return TRUE; 34+ return TRUE;
39+} 35+}
40+ 36+
41Index: gtkhtml2/libgtkhtml/document/htmldocument.h 37Index: libgtkhtml/document/htmldocument.h
42=================================================================== 38===================================================================
43--- gtkhtml2.orig/libgtkhtml/document/htmldocument.h 2006-01-21 02:24:09.000000000 +0000 39--- libgtkhtml/document/htmldocument.h.orig 2006-02-05 18:19:17.000000000 +0000
44+++ gtkhtml2/libgtkhtml/document/htmldocument.h 2006-01-21 03:48:55.000000000 +0000 40+++ libgtkhtml/document/htmldocument.h 2006-02-05 18:20:06.000000000 +0000
45@@ -113,6 +113,9 @@ 41@@ -113,6 +113,9 @@ void html_document_update_active_nod
46 void html_document_update_focus_element (HtmlDocument *document, DomElement *element); 42 void html_document_update_focus_element (HtmlDocument *document, DomElement *element);
47 DomNode *html_document_find_anchor (HtmlDocument *doc, const gchar *anchor); 43 DomNode *html_document_find_anchor (HtmlDocument *doc, const gchar *anchor);
48 44
49+CssStylesheet *html_document_add_stylesheet (HtmlDocument *document, const gchar *buffer, gint len); 45+void html_document_add_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet);
50+gboolean html_document_remove_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet); 46+gboolean html_document_remove_stylesheet (HtmlDocument *document, CssStylesheet *stylesheet);
51+ 47+
52 G_END_DECLS 48 G_END_DECLS
diff --git a/openembedded/packages/gtkhtml2/files/fix-background-min-max.patch b/openembedded/packages/gtkhtml2/files/fix-background-min-max.patch
deleted file mode 100644
index af557c8fa4..0000000000
--- a/openembedded/packages/gtkhtml2/files/fix-background-min-max.patch
+++ /dev/null
@@ -1,66 +0,0 @@
1Index: gtkhtml2/libgtkhtml/layout/html/htmlboximage.c
2===================================================================
3--- gtkhtml2.orig/libgtkhtml/layout/html/htmlboximage.c 2005-12-28 22:07:37.000000000 +0000
4+++ gtkhtml2/libgtkhtml/layout/html/htmlboximage.c 2006-01-22 03:20:36.000000000 +0000
5@@ -167,6 +167,8 @@
6 width = (gint)(floor ((gfloat)(height * gdk_pixbuf_get_width (pixbuf))/(gfloat)gdk_pixbuf_get_height (pixbuf)) + 0.5);
7 }
8 }
9+
10+ html_box_check_min_max_width_height (box, &width, &height);
11
12 if (old_width != width || old_height != height)
13 html_box_image_update_scaled_pixbuf (image, width, height);
14Index: gtkhtml2/libgtkhtml/layout/htmlbox.c
15===================================================================
16--- gtkhtml2.orig/libgtkhtml/layout/htmlbox.c 2004-01-08 08:57:29.000000000 +0000
17+++ gtkhtml2/libgtkhtml/layout/htmlbox.c 2006-01-22 03:20:41.000000000 +0000
18@@ -24,6 +24,7 @@
19 #include "layout/htmlbox.h"
20 #include "layout/htmlboxtext.h"
21 #include "layout/html/htmlboxform.h"
22+#include "layout/html/htmlboximage.h"
23 #include "layout/htmlboxinline.h"
24 #include "layout/htmlboxtablerow.h"
25 #include "gtkhtmlcontext.h"
26@@ -817,6 +818,8 @@
27 html_box_check_min_max_width_height (HtmlBox *self, gint *boxwidth, gint *boxheight)
28 {
29 int tmp;
30+ gint old_width = *boxwidth;
31+ gint old_height = *boxheight;
32
33 if (self->parent) {
34 if (HTML_BOX_GET_STYLE (self)->box->min_width.type != HTML_LENGTH_AUTO) {
35@@ -868,6 +871,31 @@
36 if (*boxheight > html_length_get_value (&HTML_BOX_GET_STYLE (self)->box->max_height, 0))
37 *boxheight = html_length_get_value (&HTML_BOX_GET_STYLE (self)->box->max_height, 0);
38 }
39+
40+ /* Maintain aspect ratio if it's an image - bias towards making image smaller */
41+ if (HTML_IS_BOX_IMAGE (self)) {
42+ if ((*boxwidth > old_width) && (*boxheight >= old_height)) {
43+ *boxheight = *boxheight * (gdouble)(*boxwidth / (gdouble)old_width);
44+ html_box_check_min_max_width_height (self, boxwidth, boxheight);
45+ return;
46+ }
47+
48+ if ((*boxheight > old_height) && (*boxwidth >= old_width)) {
49+ *boxwidth = *boxwidth * (gdouble)(*boxheight / (gdouble)old_height);
50+ html_box_check_min_max_width_height (self, boxwidth, boxheight);
51+ return;
52+ }
53+
54+ if ((*boxwidth < old_width) && (*boxheight <= old_height)) {
55+ *boxheight = *boxheight * (gdouble)(*boxwidth / (gdouble)old_width);
56+ return;
57+ }
58+
59+ if ((*boxheight < old_height) && (*boxwidth <= old_width)) {
60+ *boxwidth = *boxwidth * (gdouble)(*boxheight / (gdouble)old_height);
61+ return;
62+ }
63+ }
64 }
65
66 static void
diff --git a/openembedded/packages/gtkhtml2/files/fix-background-none.patch b/openembedded/packages/gtkhtml2/files/fix-background-none.patch
deleted file mode 100644
index 076f312009..0000000000
--- a/openembedded/packages/gtkhtml2/files/fix-background-none.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1Index: gtkhtml2/libgtkhtml/css/cssmatcher.c
2===================================================================
3--- gtkhtml2.orig/libgtkhtml/css/cssmatcher.c 2006-01-21 01:02:23.000000000 +0000
4+++ gtkhtml2/libgtkhtml/css/cssmatcher.c 2006-01-25 02:07:44.000000000 +0000
5@@ -596,7 +596,13 @@
6 g_object_unref (G_OBJECT(image));
7 return TRUE;
8 }
9- }
10+ } else if (val->value_type == CSS_IDENT &&
11+ val->v.atom == HTML_ATOM_NONE) {
12+ if (style->background->image) {
13+ g_object_unref (style->background->image);
14+ style->background->image = NULL;
15+ }
16+ }
17 return FALSE;
18 }
19
20@@ -1256,7 +1262,10 @@
21 }
22 else if (val->value_type == CSS_FUNCTION)
23 handle_background_image (document, style, val);
24- else if (css_parse_color (val, &color))
25+ else if (val->value_type == CSS_IDENT && val->v.atom == HTML_ATOM_NONE) {
26+ handle_background_image (document, style, val);
27+ style->background->color.transparent = TRUE;
28+ } else if (css_parse_color (val, &color))
29 html_style_set_background_color (style, &color);
30
31 break;
32@@ -1273,6 +1282,8 @@
33
34 if (val->v.atom == HTML_ATOM_INHERIT)
35 html_style_set_background_color (style, &parent_style->background->color);
36+ else if (val->v.atom == HTML_ATOM_NONE)
37+ style->background->color.transparent = TRUE;
38 else if (css_parse_color (val, &color))
39 html_style_set_background_color (style, &color);
40 break;
diff --git a/openembedded/packages/gtkhtml2/files/fix-recreation.patch b/openembedded/packages/gtkhtml2/files/fix-recreation.patch
deleted file mode 100644
index 3bc636bae9..0000000000
--- a/openembedded/packages/gtkhtml2/files/fix-recreation.patch
+++ /dev/null
@@ -1,407 +0,0 @@
1Index: gtkhtml2/libgtkhtml/document/htmldocument.c
2===================================================================
3--- gtkhtml2.orig/libgtkhtml/document/htmldocument.c 2006-01-25 19:19:23.000000000 +0000
4+++ gtkhtml2/libgtkhtml/document/htmldocument.c 2006-01-25 19:21:10.000000000 +0000
5@@ -110,11 +110,6 @@
6
7 if (style_change != HTML_STYLE_CHANGE_NONE) {
8
9- /* FIXME: Workaround bug #199, we don't support recreation
10- * of dom nodes and layout boxes / jonas
11- */
12- new_style->display = node->style->display;
13-
14 html_style_ref (new_style);
15 html_style_unref (node->style);
16 node->style = new_style;
17Index: gtkhtml2/libgtkhtml/layout/htmlboxfactory.c
18===================================================================
19--- gtkhtml2.orig/libgtkhtml/layout/htmlboxfactory.c 2006-01-25 19:19:23.000000000 +0000
20+++ gtkhtml2/libgtkhtml/layout/htmlboxfactory.c 2006-01-25 19:21:10.000000000 +0000
21@@ -99,7 +99,7 @@
22
23
24 HtmlBox *
25-html_box_factory_new_box (HtmlView *view, DomNode *node)
26+html_box_factory_new_box (HtmlView *view, DomNode *node, gboolean force_new)
27 {
28 HtmlBox *box = NULL, *parent_box;
29 HtmlStyle *style = node->style, *parent_style = NULL;
30@@ -117,7 +117,7 @@
31
32 box = parent_box->children;
33
34- while (box) {
35+ while (box && !force_new) {
36 if (HTML_IS_BOX_TEXT (box) && box->dom_node == node) {
37
38 html_box_text_set_text (HTML_BOX_TEXT (box), node->xmlnode->content);
39Index: gtkhtml2/libgtkhtml/layout/htmlboxfactory.h
40===================================================================
41--- gtkhtml2.orig/libgtkhtml/layout/htmlboxfactory.h 2006-01-25 19:19:23.000000000 +0000
42+++ gtkhtml2/libgtkhtml/layout/htmlboxfactory.h 2006-01-25 19:21:10.000000000 +0000
43@@ -33,7 +33,7 @@
44
45 HtmlBox * html_box_factory_get_box (HtmlView *view, DomNode *node, HtmlBox *parent_box);
46 HtmlStyleChange html_box_factory_restyle_box (HtmlView *view, HtmlBox *box, HtmlAtom pseudo);
47-HtmlBox * html_box_factory_new_box (HtmlView *view, DomNode *node);
48+HtmlBox * html_box_factory_new_box (HtmlView *view, DomNode *node, gboolean force_new);
49
50 G_END_DECLS
51
52Index: gtkhtml2/libgtkhtml/layout/htmlstyle.c
53===================================================================
54--- gtkhtml2.orig/libgtkhtml/layout/htmlstyle.c 2006-01-25 19:19:23.000000000 +0000
55+++ gtkhtml2/libgtkhtml/layout/htmlstyle.c 2006-01-25 19:21:10.000000000 +0000
56@@ -416,7 +416,7 @@
57 html_style_compare (const HtmlStyle *s1, const HtmlStyle *s2)
58 {
59 /* RECREATE begin */
60- if (s1->display != s1->display)
61+ if (s1->display != s2->display)
62 return HTML_STYLE_CHANGE_RECREATE;
63 /* RECREATE end */
64
65Index: gtkhtml2/libgtkhtml/view/htmlview.c
66===================================================================
67--- gtkhtml2.orig/libgtkhtml/view/htmlview.c 2006-01-25 19:19:23.000000000 +0000
68+++ gtkhtml2/libgtkhtml/view/htmlview.c 2006-01-25 19:21:10.000000000 +0000
69@@ -1908,7 +1908,7 @@
70
71 g_assert (node->style != NULL);
72
73- new_box = html_box_factory_new_box (view, node);
74+ new_box = html_box_factory_new_box (view, node, FALSE);
75
76 if (new_box) {
77
78@@ -2001,8 +2001,9 @@
79 html_view_remove_layout_box (view, box->dom_node);
80
81 /* Check if we're trying to remove the root box */
82- if (box == view->root)
83+ if (box == view->root) {
84 view->root = NULL;
85+ }
86
87 html_box_remove (box);
88 g_object_unref (G_OBJECT (box));
89@@ -2131,6 +2132,56 @@
90 }
91
92 switch (style_change) {
93+ case HTML_STYLE_CHANGE_RECREATE: {
94+ HtmlBox *new_box = NULL;
95+
96+ /* Don't replace boxes where display: none has been set */
97+ if (style->display == HTML_DISPLAY_NONE) {
98+ html_view_removed (document, node, view);
99+ break;
100+ }
101+
102+ new_box = html_box_factory_new_box (view, node, TRUE);
103+ g_assert (new_box);
104+
105+ new_box->dom_node = node;
106+ g_object_add_weak_pointer (G_OBJECT (node), (gpointer *)&(new_box->dom_node));
107+ new_box->next = box->next;
108+ new_box->prev = box->prev;
109+ new_box->parent = box->parent;
110+ new_box->children = box->children;
111+
112+ if (box->next) box->next->prev = new_box;
113+ if (box->prev) box->prev->next = new_box;
114+ if (box->parent)
115+ if (box->parent->children == box)
116+ box->parent->children = new_box;
117+ if (box->children) {
118+ HtmlBox *child = box->children;
119+ while (child) {
120+ if (child->parent == box)
121+ child->parent = new_box;
122+ child = child->prev;
123+ }
124+ child = box->children->next;
125+ while (child) {
126+ if (child->parent == box)
127+ child->parent = new_box;
128+ child = child->next;
129+ }
130+ }
131+
132+ if (view->root == box)
133+ view->root = new_box;
134+
135+ html_view_remove_layout_box (view, node);
136+ g_object_unref (box);
137+
138+ html_box_handle_html_properties (new_box, node->xmlnode);
139+ html_view_add_layout_box (view, node, new_box);
140+ html_view_relayout_callback (document, node, view);
141+ break;
142+ }
143 case HTML_STYLE_CHANGE_REPAINT:
144 html_view_repaint_callback (document, node, view);
145 break;
146Index: gtkhtml2/libgtkhtml/css/cssmatcher.c
147===================================================================
148--- gtkhtml2.orig/libgtkhtml/css/cssmatcher.c 2006-01-25 19:19:23.000000000 +0000
149+++ gtkhtml2/libgtkhtml/css/cssmatcher.c 2006-01-25 19:21:10.000000000 +0000
150@@ -2781,7 +2781,7 @@
151 }
152 }
153 if (strcasecmp ("table", n->name) == 0) {
154- if ((str = xmlGetProp (n, "align"))) {
155+ if ((style->display != HTML_DISPLAY_BLOCK) && (str = xmlGetProp (n, "align"))) {
156 if (strcasecmp (str, "left") == 0)
157 style->Float = HTML_FLOAT_LEFT;
158 else if (strcasecmp (str, "right") == 0)
159Index: gtkhtml2/libgtkhtml/layout/htmlbox.c
160===================================================================
161--- gtkhtml2.orig/libgtkhtml/layout/htmlbox.c 2006-01-25 19:21:09.000000000 +0000
162+++ gtkhtml2/libgtkhtml/layout/htmlbox.c 2006-01-25 19:21:10.000000000 +0000
163@@ -308,7 +308,7 @@
164 else if (style->surround->margin.left.type != HTML_LENGTH_AUTO &&
165 style->surround->margin.right.type != HTML_LENGTH_AUTO) {
166
167- if (HTML_BOX_GET_STYLE (box->parent)->inherited->direction == HTML_DIRECTION_RTL) {
168+ if (HTML_BOX_GET_STYLE (html_box_get_containing_block (box))->inherited->direction == HTML_DIRECTION_RTL) {
169
170 return width - html_length_get_value (&style->box->width, width) -
171 html_box_left_padding (box, width) - html_box_right_padding (box, width) -
172@@ -348,7 +348,7 @@
173 else if (style->surround->margin.left.type != HTML_LENGTH_AUTO &&
174 style->surround->margin.right.type != HTML_LENGTH_AUTO) {
175
176- if (HTML_BOX_GET_STYLE (box->parent)->inherited->direction == HTML_DIRECTION_LTR) {
177+ if (HTML_BOX_GET_STYLE (html_box_get_containing_block (box))->inherited->direction == HTML_DIRECTION_LTR) {
178
179 return width - html_length_get_value (&style->box->width, width) -
180 html_box_left_padding (box, width) - html_box_right_padding (box, width) -
181@@ -820,35 +820,36 @@
182 int tmp;
183 gint old_width = *boxwidth;
184 gint old_height = *boxheight;
185+ HtmlBox *parent = html_box_get_containing_block (self);
186
187- if (self->parent) {
188+ if (parent) {
189 if (HTML_BOX_GET_STYLE (self)->box->min_width.type != HTML_LENGTH_AUTO) {
190- tmp = html_length_get_value (&HTML_BOX_GET_STYLE (self)->box->min_width, self->parent->width -
191- html_box_horizontal_mbp_sum (self->parent) - html_box_horizontal_mbp_sum (self));
192+ tmp = html_length_get_value (&HTML_BOX_GET_STYLE (self)->box->min_width, parent->width -
193+ html_box_horizontal_mbp_sum (parent) - html_box_horizontal_mbp_sum (self));
194 if (*boxwidth < tmp)
195 *boxwidth = tmp;
196
197 }
198
199 if (HTML_BOX_GET_STYLE (self)->box->max_width.type != HTML_LENGTH_AUTO) {
200- tmp = html_length_get_value (&HTML_BOX_GET_STYLE (self)->box->max_width, self->parent->width -
201- html_box_horizontal_mbp_sum (self->parent) - html_box_horizontal_mbp_sum (self));
202+ tmp = html_length_get_value (&HTML_BOX_GET_STYLE (self)->box->max_width, parent->width -
203+ html_box_horizontal_mbp_sum (parent) - html_box_horizontal_mbp_sum (self));
204 if (*boxwidth > tmp)
205 *boxwidth = tmp;
206
207 }
208
209 if (HTML_BOX_GET_STYLE (self)->box->min_height.type != HTML_LENGTH_AUTO) {
210- tmp = html_length_get_value (&HTML_BOX_GET_STYLE (self)->box->min_height, self->parent->height -
211- html_box_horizontal_mbp_sum (self->parent) - html_box_horizontal_mbp_sum (self));
212+ tmp = html_length_get_value (&HTML_BOX_GET_STYLE (self)->box->min_height, parent->height -
213+ html_box_horizontal_mbp_sum (parent) - html_box_horizontal_mbp_sum (self));
214 if (*boxheight < tmp)
215 *boxheight = tmp;
216
217 }
218
219 if (HTML_BOX_GET_STYLE (self)->box->max_height.type != HTML_LENGTH_AUTO) {
220- tmp = html_length_get_value (&HTML_BOX_GET_STYLE (self)->box->max_height, self->parent->height -
221- html_box_horizontal_mbp_sum (self->parent) - html_box_horizontal_mbp_sum (self));
222+ tmp = html_length_get_value (&HTML_BOX_GET_STYLE (self)->box->max_height, parent->height -
223+ html_box_horizontal_mbp_sum (parent) - html_box_horizontal_mbp_sum (self));
224 if (*boxheight > tmp)
225 *boxheight = tmp;
226
227Index: gtkhtml2/libgtkhtml/layout/htmlboxblock.c
228===================================================================
229--- gtkhtml2.orig/libgtkhtml/layout/htmlboxblock.c 2006-01-25 19:19:23.000000000 +0000
230+++ gtkhtml2/libgtkhtml/layout/htmlboxblock.c 2006-01-25 19:21:10.000000000 +0000
231@@ -358,8 +358,7 @@
232
233 /* Get the prefered width */
234 /* If the width wasn't specified by CSS, use the width of the containing box (parent) */
235-
236- if (self->parent) {
237+ if (html_box_get_containing_block (self)) {
238
239 if (style->Float != HTML_FLOAT_NONE)
240 new_width = html_length_get_value (&style->box->width, html_box_get_containing_block_width (self));
241Index: gtkhtml2/libgtkhtml/graphics/htmlimagefactory.c
242===================================================================
243--- gtkhtml2.orig/libgtkhtml/graphics/htmlimagefactory.c 2006-01-25 19:19:23.000000000 +0000
244+++ gtkhtml2/libgtkhtml/graphics/htmlimagefactory.c 2006-01-25 19:21:10.000000000 +0000
245@@ -127,7 +127,7 @@
246 }
247
248 static void
249-html_image_shutdown (HtmlImage *image, HtmlImageFactory *image_factory)
250+html_image_shutdown (HtmlImageFactory *image_factory, HtmlImage *image)
251 {
252 g_hash_table_remove (image_factory->image_hash, image->uri);
253 }
254@@ -146,8 +146,7 @@
255
256 image = HTML_IMAGE (g_object_new (HTML_IMAGE_TYPE, NULL));
257
258- g_signal_connect (G_OBJECT (image), "last_unref",
259- G_CALLBACK (html_image_shutdown), image_factory);
260+ g_object_weak_ref (G_OBJECT (image), (GWeakNotify)html_image_shutdown, image_factory);
261
262 image->loading = TRUE;
263
264Index: gtkhtml2/libgtkhtml/layout/html/htmlboxembeddedimage.c
265===================================================================
266--- gtkhtml2.orig/libgtkhtml/layout/html/htmlboxembeddedimage.c 2006-01-25 19:19:23.000000000 +0000
267+++ gtkhtml2/libgtkhtml/layout/html/htmlboxembeddedimage.c 2006-01-25 19:21:10.000000000 +0000
268@@ -64,25 +64,36 @@
269 }
270
271 static void
272-html_box_embedded_image_class_init (HtmlBoxClass *klass)
273+html_box_embedded_image_resize_image (HtmlImage *image, HtmlBoxEmbeddedImage *box)
274 {
275-
276- klass->paint = html_box_embedded_image_paint;
277- klass->relayout = html_box_embedded_image_relayout;
278+ g_signal_emit_by_name (G_OBJECT (box->view->document), "relayout_node", HTML_BOX (box)->dom_node);
279+}
280
281- parent_class = g_type_class_peek_parent (klass);
282+static void
283+html_box_embedded_image_repaint_image (HtmlImage *image, gint x, gint y, gint width, gint height, HtmlBoxEmbeddedImage *box)
284+{
285+ g_signal_emit_by_name (G_OBJECT (box->view->document), "repaint_node", HTML_BOX (box)->dom_node);
286 }
287
288 static void
289-html_box_embedded_image_resize_image (HtmlImage *image, HtmlBoxEmbeddedImage *box)
290+html_box_embedded_image_finalize (GObject *object)
291 {
292- g_signal_emit_by_name (G_OBJECT (box->view->document), "relayout_node", HTML_BOX (box)->dom_node);
293+ HtmlBoxEmbeddedImage *image = HTML_BOX_EMBEDDED_IMAGE (object);
294+
295+ g_signal_handlers_disconnect_by_func (G_OBJECT (image->image), G_CALLBACK (html_box_embedded_image_resize_image), image);
296+ g_signal_handlers_disconnect_by_func (G_OBJECT (image->image), G_CALLBACK (html_box_embedded_image_repaint_image), image);
297 }
298
299 static void
300-html_box_embedded_image_repaint_image (HtmlImage *image, gint x, gint y, gint width, gint height, HtmlBoxEmbeddedImage *box)
301+html_box_embedded_image_class_init (HtmlBoxClass *klass)
302 {
303- g_signal_emit_by_name (G_OBJECT (box->view->document), "repaint_node", HTML_BOX (box)->dom_node);
304+ GObjectClass *object_class = (GObjectClass *)klass;
305+
306+ klass->paint = html_box_embedded_image_paint;
307+ klass->relayout = html_box_embedded_image_relayout;
308+ object_class->finalize = html_box_embedded_image_finalize;
309+
310+ parent_class = g_type_class_peek_parent (klass);
311 }
312
313 void
314Index: gtkhtml2/libgtkhtml/layout/htmlboxtext.c
315===================================================================
316--- gtkhtml2.orig/libgtkhtml/layout/htmlboxtext.c 2006-01-25 19:19:23.000000000 +0000
317+++ gtkhtml2/libgtkhtml/layout/htmlboxtext.c 2006-01-25 19:21:10.000000000 +0000
318@@ -146,6 +146,7 @@
319
320 master = text->master;
321 if (master) {
322+ html_box_text_destroy_slaves (text);
323 html_box_text_free_master (master);
324 g_free (master);
325 text->master = NULL;
326Index: gtkhtml2/libgtkhtml/layout/html/htmlboximage.c
327===================================================================
328--- gtkhtml2.orig/libgtkhtml/layout/html/htmlboximage.c 2006-01-25 19:21:09.000000000 +0000
329+++ gtkhtml2/libgtkhtml/layout/html/htmlboximage.c 2006-01-25 19:21:33.000000000 +0000
330@@ -195,10 +195,41 @@
331 }
332
333 static void
334+html_box_image_resize_image (HtmlImage *image, HtmlBoxImage *box)
335+{
336+ g_signal_emit_by_name (G_OBJECT (box->view->document), "relayout_node", HTML_BOX (box)->dom_node);
337+}
338+
339+static void
340+html_box_image_repaint_image (HtmlImage *image, gint x, gint y, gint width, gint height, HtmlBoxImage *box)
341+{
342+ gdouble real_x, real_y;
343+ gdouble real_width, real_height;
344+
345+ if (box->scaled_pixbuf && image->pixbuf) {
346+
347+ html_box_image_update_scaled_pixbuf (box, gdk_pixbuf_get_width (box->scaled_pixbuf), gdk_pixbuf_get_height (box->scaled_pixbuf));
348+ real_y = (y * gdk_pixbuf_get_height (box->scaled_pixbuf)) / (gdouble)gdk_pixbuf_get_height (image->pixbuf);
349+ real_x = (x * gdk_pixbuf_get_width (box->scaled_pixbuf)) / (gdouble)gdk_pixbuf_get_width (image->pixbuf);
350+
351+ real_height = (height * gdk_pixbuf_get_height (box->scaled_pixbuf)) / (gdouble)gdk_pixbuf_get_height (image->pixbuf);
352+ real_width = (width * gdk_pixbuf_get_width (box->scaled_pixbuf)) / (gdouble)gdk_pixbuf_get_width (image->pixbuf);
353+
354+ gtk_widget_queue_draw_area (GTK_WIDGET (box->view),
355+ html_box_get_absolute_x (HTML_BOX (box)), /* + floor (real_x + 0.5),*/
356+ html_box_get_absolute_y (HTML_BOX (box)),/* + floor (real_y + 0.5),*/
357+ floor (real_width + real_x + 0.5),
358+ floor (real_height + real_y + 0.5));
359+ }
360+}
361+
362+static void
363 html_box_image_finalize (GObject *object)
364 {
365 HtmlBoxImage *image = HTML_BOX_IMAGE (object);
366
367+ g_signal_handlers_disconnect_by_func (G_OBJECT (image->image), G_CALLBACK (html_box_image_resize_image), image);
368+ g_signal_handlers_disconnect_by_func (G_OBJECT (image->image), G_CALLBACK (html_box_image_repaint_image), image);
369 if (image->scaled_pixbuf)
370 g_object_unref (image->scaled_pixbuf);
371
372@@ -262,35 +293,6 @@
373 return HTML_BOX (box);
374 }
375
376-static void
377-html_box_image_resize_image (HtmlImage *image, HtmlBoxImage *box)
378-{
379- g_signal_emit_by_name (G_OBJECT (box->view->document), "relayout_node", HTML_BOX (box)->dom_node);
380-}
381-
382-static void
383-html_box_image_repaint_image (HtmlImage *image, gint x, gint y, gint width, gint height, HtmlBoxImage *box)
384-{
385- gdouble real_x, real_y;
386- gdouble real_width, real_height;
387-
388- if (box->scaled_pixbuf && image->pixbuf) {
389-
390- html_box_image_update_scaled_pixbuf (box, gdk_pixbuf_get_width (box->scaled_pixbuf), gdk_pixbuf_get_height (box->scaled_pixbuf));
391- real_y = (y * gdk_pixbuf_get_height (box->scaled_pixbuf)) / (gdouble)gdk_pixbuf_get_height (image->pixbuf);
392- real_x = (x * gdk_pixbuf_get_width (box->scaled_pixbuf)) / (gdouble)gdk_pixbuf_get_width (image->pixbuf);
393-
394- real_height = (height * gdk_pixbuf_get_height (box->scaled_pixbuf)) / (gdouble)gdk_pixbuf_get_height (image->pixbuf);
395- real_width = (width * gdk_pixbuf_get_width (box->scaled_pixbuf)) / (gdouble)gdk_pixbuf_get_width (image->pixbuf);
396-
397- gtk_widget_queue_draw_area (GTK_WIDGET (box->view),
398- html_box_get_absolute_x (HTML_BOX (box)), /* + floor (real_x + 0.5),*/
399- html_box_get_absolute_y (HTML_BOX (box)),/* + floor (real_y + 0.5),*/
400- floor (real_width + real_x + 0.5),
401- floor (real_height + real_y + 0.5));
402- }
403-}
404-
405 void
406 html_box_image_set_image (HtmlBoxImage *box, HtmlImage *image)
407 {
diff --git a/openembedded/packages/gtkhtml2/gtkhtml2_cvs.bb b/openembedded/packages/gtkhtml2/gtkhtml2_cvs.bb
index cdb4206157..8cc963dd22 100755
--- a/openembedded/packages/gtkhtml2/gtkhtml2_cvs.bb
+++ b/openembedded/packages/gtkhtml2/gtkhtml2_cvs.bb
@@ -3,15 +3,14 @@ DEPENDS = "gtk+ glib-2.0 libxml2"
3DESCRIPTION = "A GTK+ HTML rendering library." 3DESCRIPTION = "A GTK+ HTML rendering library."
4LICENSE = "GPL" 4LICENSE = "GPL"
5MAINTAINER = "Chris Lord <chris@openedhand.com>" 5MAINTAINER = "Chris Lord <chris@openedhand.com>"
6PV = "2.11.0cvs${CVSDATE}" 6PV = "2.11.0+cvs-${CVSDATE}"
7 7
8SRC_URI = "cvs://anonymous@anoncvs.gnome.org/cvs/gnome;module=gtkhtml2 \ 8SRC_URI = "cvs://anonymous@anoncvs.gnome.org/cvs/gnome;module=gtkhtml2 \
9 file://at-import_box-pos.patch;patch=1;pnum=0 \ 9 file://at-import_box-pos.patch;patch=1;pnum=0 \
10 file://fix-background-none.patch;patch=1;pnum=1 \ 10 file://css-stylesheet-user.patch;patch=1;pnum=0 \
11 file://css-stylesheet-user.patch;patch=1;pnum=1 \ 11 file://css-media.patch;patch=1;pnum=0 \
12 file://css-media.patch;patch=1;pnum=1 \ 12 file://fix-infinite-loop.patch;patch=1;pnum=0 \
13 file://fix-background-min-max.patch;patch=1;pnum=1 \ 13 file://fix-margin-inherit.patch;patch=1;pnum=0"
14 file://fix-recreation.patch;patch=1;pnum=1"
15 14
16S = "${WORKDIR}/${PN}" 15S = "${WORKDIR}/${PN}"
17 16
diff --git a/openembedded/packages/web/web_snap20060131.bb b/openembedded/packages/web/web_snap20060207.bb
index 96e84f1a46..7386ad1ca4 100755
--- a/openembedded/packages/web/web_snap20060131.bb
+++ b/openembedded/packages/web/web_snap20060207.bb
@@ -1,6 +1,7 @@
1LICENSE = "GPL" 1LICENSE = "GPL"
2SECTION = "x11" 2SECTION = "x11"
3DEPENDS = "glib-2.0 gtk+ libglade gtkhtml2 libsoup gconf js" 3DEPENDS = "glib-2.0 gtk+ libglade gtkhtml2 curl gconf js"
4RDEPENDS = "libcurl js"
4MAINTAINER = "Chris Lord <chris@openedhand.com>" 5MAINTAINER = "Chris Lord <chris@openedhand.com>"
5DESCRIPTION = "Web is a multi-platform web browsing application." 6DESCRIPTION = "Web is a multi-platform web browsing application."
6 7