summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2017-10-11 15:45:02 +0000
committerTavmjong Bah <tavmjong@free.fr>2017-10-11 15:45:02 +0000
commit6e2acdba15fff06755ac5a724316e3b550ef3779 (patch)
treec231af5fbf0551f43d0992ba4b9de5153b8d81f6 /src
parentPrevent crash in measure LPE when pasting LPE to multiple elements (diff)
downloadinkscape-6e2acdba15fff06755ac5a724316e3b550ef3779.tar.gz
inkscape-6e2acdba15fff06755ac5a724316e3b550ef3779.zip
Allow one !important rule to override another if later and has equal or higher specificity.
Patch from Jabier.
Diffstat (limited to 'src')
-rw-r--r--src/libcroco/cr-sel-eng.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcroco/cr-sel-eng.c b/src/libcroco/cr-sel-eng.c
index ea04bfd2e..9e35ad93f 100644
--- a/src/libcroco/cr-sel-eng.c
+++ b/src/libcroco/cr-sel-eng.c
@@ -1669,7 +1669,7 @@ put_css_properties_in_props_list (CRPropList ** a_props, CRStatement * a_stmt)
*(unless the already selected declaration
*has an UA origin)
*/
- if (decl->important == TRUE
+ if (decl->important == TRUE && cur_decl->important != TRUE
&& decl->parent_statement->parent_sheet->origin
!= ORIGIN_UA) {
continue;
@@ -1708,7 +1708,7 @@ put_css_properties_in_props_list (CRPropList ** a_props, CRStatement * a_stmt)
*/
if (a_stmt->specificity
>= decl->parent_statement->specificity) {
- if (decl->important == TRUE)
+ if (decl->important == TRUE && cur_decl->important != TRUE)
continue;
props = cr_prop_list_unlink (props, pair);
if (pair) {