diff options
author | Michael Orlitzky <michael@orlitzky.com> | 2023-09-18 10:36:48 -0400 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2023-10-01 10:47:37 +0100 |
commit | d6e9f636d693fb129b373862d69ae85c861049f0 (patch) | |
tree | 51405100b1691bee9043088a2d3e406ec85111af /test/dump_computed.h | |
parent | 20de9212123bd14efa8f1fd500765038be3851bf (diff) | |
download | libcss-d6e9f636d693fb129b373862d69ae85c861049f0.tar.gz libcss-d6e9f636d693fb129b373862d69ae85c861049f0.tar.bz2 |
Add support for SVG fill-opacity property
https://www.w3.org/TR/SVGTiny12/painting.html#FillOpacityProperty
This property is unique to SVG documents, but is otherwise analogous
to the usual CSS "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 2ce7849..55d9f85 100644 --- a/test/dump_computed.h +++ b/test/dump_computed.h @@ -1635,6 +1635,30 @@ static void dump_computed_style(const css_computed_style *style, char *buf, ptr += wrote; *len -= wrote; + /* fill-opacity */ + val = css_computed_fill_opacity(style, &len1); + switch (val) { + case CSS_FILL_OPACITY_INHERIT: + wrote = snprintf(ptr, *len, "fill-opacity: inherit\n"); + break; + case CSS_FILL_OPACITY_SET: + wrote = snprintf(ptr, *len, "fill-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; + /* flex-basis */ val = css_computed_flex_basis(style, &len1, &unit1); switch (val) { |