summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2019-11-08 08:10:55 +0000
committerTavmjong Bah <tavmjong@free.fr>2019-11-08 08:10:55 +0000
commit011d7f60c193269e6489200961b1633a9c5b36f7 (patch)
tree1ee0e6a9fd66918f62ee9f6abd085fd1e2bbb256 /src
parentFix crash using split canvas with multiple monitors (diff)
downloadinkscape-011d7f60c193269e6489200961b1633a9c5b36f7.tar.gz
inkscape-011d7f60c193269e6489200961b1633a9c5b36f7.zip
Set "origin" (ua, user, author) for linked stylesheets.
Prevents error messages during cascade for duplicated selector/property values.
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/libcroco/cr-stylesheet.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/3rdparty/libcroco/cr-stylesheet.c b/src/3rdparty/libcroco/cr-stylesheet.c
index 817ee4f15..c80c40b93 100644
--- a/src/3rdparty/libcroco/cr-stylesheet.c
+++ b/src/3rdparty/libcroco/cr-stylesheet.c
@@ -159,7 +159,8 @@ cr_stylesheet_statement_get_from_list (CRStyleSheet * a_this, int itemnr)
}
/**
- *Appends a new stylesheet to the current list of #CRStylesheet.
+ *Appends a new stylesheet to the current list of #CRStylesheet, setting
+ *the "origin" of the new stylesheet to be the same as the others in list.
*
*@param a_this the "this pointer" of the current instance
*of #CRStylesheet .
@@ -180,6 +181,12 @@ cr_stylesheet_append_stylesheet (CRStyleSheet * a_this, CRStyleSheet * a_new_sty
cur->next = a_new_stylesheet;
+ /* The "origin" must apriori be the same for all stylesheets
+ in a list. We must set it correctly or errors will occur in
+ put_css_properties_in_props_list(). The "origin" of the initial
+ stylesheet in the list is set in cr_cascade_set_sheet(). */
+ a_new_stylesheet->origin = cur->origin;
+
return a_this;
}