diff options
author | Michael Orlitzky <michael@orlitzky.com> | 2023-09-18 15:04:24 -0400 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2023-10-01 10:47:44 +0100 |
commit | 76ccb5b60d67b5ff96d48bfe12aa04787c5b1f99 (patch) | |
tree | ae7fad2975d23e4c0c307117bd2fb0617e244802 /test/dump_computed.h | |
parent | d6e9f636d693fb129b373862d69ae85c861049f0 (diff) | |
download | libcss-76ccb5b60d67b5ff96d48bfe12aa04787c5b1f99.tar.gz libcss-76ccb5b60d67b5ff96d48bfe12aa04787c5b1f99.tar.bz2 |
Add support for SVG stroke-opacity property
https://www.w3.org/TR/SVGTiny12/painting.html#StrokeOpacityProperty
This property is unique to SVG documents, but is otherwise analogous
to the usual CSS "opacity" property (and the recently-added SVG
fill-opacity property).
Diffstat (limited to 'test/dump_computed.h')
-rw-r--r-- | test/dump_computed.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/dump_computed.h b/test/dump_computed.h index 55d9f85..f769075 100644 --- a/test/dump_computed.h +++ b/test/dump_computed.h @@ -2820,6 +2820,30 @@ static void dump_computed_style(const css_computed_style *style, char *buf, ptr += wrote; *len -= wrote; + /* stroke-opacity */ + val = css_computed_stroke_opacity(style, &len1); + switch (val) { + case CSS_STROKE_OPACITY_INHERIT: + wrote = snprintf(ptr, *len, "stroke-opacity: inherit\n"); + break; + case CSS_STROKE_OPACITY_SET: + wrote = snprintf(ptr, *len, "stroke-opacity: "); + ptr += wrote; + *len -= wrote; + + wrote = dump_css_fixed(len1, ptr, *len); + ptr += wrote; + *len -= wrote; + + wrote = snprintf(ptr, *len, "\n"); + break; + default: + wrote = 0; + break; + } + ptr += wrote; + *len -= wrote; + /* table-layout */ val = css_computed_table_layout(style); switch (val) { |