[lasem] svg: viewport-fill and viewport-fill-opacity are not inherited by default.



commit bb98a855ec35def1100de8a1dbc29dd9a9d67beb
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Thu Nov 1 22:08:53 2012 +0100

    svg: viewport-fill and viewport-fill-opacity are not inherited by default.

 src/lsmsvgstyle.c |   24 ++++++++++++------------
 src/lsmsvgstyle.h |    4 ++--
 src/lsmsvgview.c  |    4 ++--
 3 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/src/lsmsvgstyle.c b/src/lsmsvgstyle.c
index 1f6df04..a111810 100644
--- a/src/lsmsvgstyle.c
+++ b/src/lsmsvgstyle.c
@@ -137,6 +137,18 @@ static const LsmPropertyInfos lsm_svg_property_infos[] = {
 		.trait_class = &lsm_null_trait_class,
 		.trait_default = "normal"
 	},
+	{
+		.name = "viewport-fill",
+		.id = LSM_PROPERTY_OFFSET_TO_ID (LsmSvgStyle, viewport_fill),
+		.trait_class = &lsm_svg_paint_trait_class,
+		.trait_default = "none" 
+	},
+	{
+		.name = "viewport-fill-opacity",
+		.id = LSM_PROPERTY_OFFSET_TO_ID (LsmSvgStyle, viewport_fill_opacity),
+		.trait_class = &lsm_double_trait_class,
+		.trait_default = "1"
+	},
 	/* Inherited properties */
 	{
 		.name = "clip-rule",
@@ -385,18 +397,6 @@ static const LsmPropertyInfos lsm_svg_property_infos[] = {
 		.trait_default = "auto"
 	},
 	{
-		.name = "viewport-fill",
-		.id = LSM_PROPERTY_OFFSET_TO_ID (LsmSvgStyle, viewport_fill),
-		.trait_class = &lsm_svg_paint_trait_class,
-		.trait_default = "none" 
-	},
-	{
-		.name = "viewport-opacity",
-		.id = LSM_PROPERTY_OFFSET_TO_ID (LsmSvgStyle, viewport_opacity),
-		.trait_class = &lsm_double_trait_class,
-		.trait_default = "1"
-	},
-	{
 		.name = "visibility",
 		.id = LSM_PROPERTY_OFFSET_TO_ID (LsmSvgStyle, visibility),
 		.trait_class = &lsm_svg_visibility_trait_class,
diff --git a/src/lsmsvgstyle.h b/src/lsmsvgstyle.h
index e76bad5..396836e 100644
--- a/src/lsmsvgstyle.h
+++ b/src/lsmsvgstyle.h
@@ -145,6 +145,8 @@ struct _LsmSvgStyle {
 	LsmSvgDoubleProperty *		stop_opacity;
 	LsmProperty *			text_decoration;
 	LsmProperty *			unicode_bidi;
+	LsmSvgPaintProperty *		viewport_fill;
+	LsmSvgDoubleProperty *		viewport_fill_opacity;
 
 	/* Inherited */
 
@@ -189,8 +191,6 @@ struct _LsmSvgStyle {
 	LsmSvgLengthProperty *		stroke_width;
 	LsmSvgTextAnchorProperty *	text_anchor;
 	LsmProperty *			text_rendering;
-	LsmSvgPaintProperty *		viewport_fill;
-	LsmSvgDoubleProperty *		viewport_opacity;
 	LsmSvgVisibilityProperty *	visibility;
 	LsmProperty *			word_spacing;
 	LsmSvgWritingModeProperty *	writing_mode;
diff --git a/src/lsmsvgview.c b/src/lsmsvgview.c
index 22b076d..5ea92f4 100644
--- a/src/lsmsvgview.c
+++ b/src/lsmsvgview.c
@@ -839,14 +839,14 @@ lsm_svg_view_show_viewport (LsmSvgView*view, const LsmBox *viewport)
 					       paint->color.red,
 					       paint->color.green,
 					       paint->color.blue,
-					       view->style->viewport_opacity->value);
+					       view->style->viewport_fill_opacity->value);
 			break;
 		case LSM_SVG_PAINT_TYPE_CURRENT_COLOR:
 			cairo_set_source_rgba (view->dom_view.cairo,
 					       view->style->color->value.red,
 					       view->style->color->value.green,
 					       view->style->color->value.blue,
-					       view->style->viewport_opacity->value);
+					       view->style->viewport_fill_opacity->value);
 		default:
 			return;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]