summaryrefslogtreecommitdiffstats
path: root/testfiles/src/style-test.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2017-10-13 11:05:06 +0000
committerTavmjong Bah <tavmjong@free.fr>2017-10-13 11:05:06 +0000
commit4cc0e04066adecf85955a9d6be972a4ba4d83f8b (patch)
tree4ece71cb0de254f5b214bac6c9d6285ae763fcfe /testfiles/src/style-test.cpp
parentMigrate style-test to GTest. (diff)
downloadinkscape-4cc0e04066adecf85955a9d6be972a4ba4d83f8b.tar.gz
inkscape-4cc0e04066adecf85955a9d6be972a4ba4d83f8b.zip
Implement !important rule handling for inline-style. Work from Jabier.
Added "!important" rule tests to style-test.cpp.
Diffstat (limited to 'testfiles/src/style-test.cpp')
-rw-r--r--testfiles/src/style-test.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/testfiles/src/style-test.cpp b/testfiles/src/style-test.cpp
index 9fd25f31a..8c0f4dd5f 100644
--- a/testfiles/src/style-test.cpp
+++ b/testfiles/src/style-test.cpp
@@ -226,7 +226,27 @@ std::vector<StyleRead> getStyleData()
StyleRead("paint-order:normal"),
StyleRead("paint-order: markers stroke fill", "paint-order:markers stroke fill"),
- };
+ // !important (in order of appearance in style-internal.h)
+ StyleRead("stroke-miterlimit:4 !important"), // SPIFloat
+ StyleRead("stroke-opacity:0.5 !important"), // SPIScale24
+ StyleRead("stroke-width:2px !important"), // SPILength
+ StyleRead("line-height:24px !important"), // SPILengthOrNormal
+ StyleRead("line-height:normal !important"),
+ StyleRead("font-stretch:condensed !important"), // SPIEnum
+ StyleRead("marker:url(#Arrow) !important"), // SPIString
+ StyleRead("color:#0000ff !important"), // SPIColor
+ StyleRead("fill:none !important"), // SPIPaint
+ StyleRead("fill:currentColor !important"),
+ StyleRead("fill:#ff00ff !important"),
+ StyleRead("paint-order:stroke !important"), // SPIPaintOrder
+ StyleRead("paint-order:normal !important"),
+ StyleRead("stroke-dasharray:0, 1, 0, 1 !important"), // SPIDashArray
+ StyleRead("font-size:12px !important"), // SPIFontSize
+ StyleRead("baseline-shift:baseline !important"), // SPIBaselineShift
+ StyleRead("baseline-shift:sub !important"),
+ //StyleRead("text-decoration-line: underline !important"), // SPITextDecorationLine
+
+ };
size_t count = sizeof(all_style_data) / sizeof(all_style_data[0]);
std::vector<StyleRead> vect(all_style_data, all_style_data + count);