summaryrefslogtreecommitdiffstats
path: root/openembedded/packages/gtkhtml2/files/fix-background-none.patch
blob: 076f312009ba8eb261897a72b48caa55064e30d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Index: gtkhtml2/libgtkhtml/css/cssmatcher.c
===================================================================
--- gtkhtml2.orig/libgtkhtml/css/cssmatcher.c	2006-01-21 01:02:23.000000000 +0000
+++ gtkhtml2/libgtkhtml/css/cssmatcher.c	2006-01-25 02:07:44.000000000 +0000
@@ -596,7 +596,13 @@
 			g_object_unref (G_OBJECT(image));
 			return TRUE;
 		}
-	} 
+	} else if (val->value_type == CSS_IDENT &&
+		   val->v.atom == HTML_ATOM_NONE) {
+		if (style->background->image) {
+			g_object_unref (style->background->image);
+			style->background->image = NULL;
+		}
+	}
 	return FALSE;
 }
 
@@ -1256,7 +1262,10 @@
 		}
 		else if (val->value_type == CSS_FUNCTION)
 			handle_background_image (document, style, val);
-		else if (css_parse_color (val, &color))
+		else if (val->value_type == CSS_IDENT && val->v.atom == HTML_ATOM_NONE) {
+			handle_background_image (document, style, val);
+			style->background->color.transparent = TRUE;
+		} else if (css_parse_color (val, &color))
 			html_style_set_background_color (style, &color);
 
 		break;
@@ -1273,6 +1282,8 @@
 		
 		if (val->v.atom == HTML_ATOM_INHERIT)
 			html_style_set_background_color (style, &parent_style->background->color);
+		else if (val->v.atom == HTML_ATOM_NONE)
+			style->background->color.transparent = TRUE;
 		else if (css_parse_color (val, &color))
 			html_style_set_background_color (style, &color);
 		break;