Tuesday, 19 September 2023

libcss fill- and stroke-opacity

As promised, here's my libcss branch adding the SVG fill- and
stroke-opacity properties. HTTPS also works but the cert is
self-signed pending a new release of apache; its SHA1 fingerprint is
C8:01:8B:A6:3A:07:C0:65:AF:F0:CB:17:5F:A3:B5:9F:5B:D0:FC:E0.

http://gitweb.michael.orlitzky.com/libcss.git fill-stroke-opacity

Here's a summary of the changes. The commits are probably a bit too
fine-grained but it makes them easy to reorder and amend. I did my
best to keep the test suite passing for as long as possible.


Michael Orlitzky (40):
docs/Bytecode: document the forthcoming fill-opacity
include/libcss/properties.h: define fill-opacity enumeration
src/bytecode/opcodes.h: define fill-opacity enumeration
src/parse/properties/properties.h: add fill-opacity prototype
include/libcss/computed.h: add fill-opacity prototype
src/select/select_config.py: add fill-opacity
src/select: regenerate autogenerated_*.h for fill-opacity
src/select/properties: add fill-opacity implementation
src/select/properties/properties.h: declare fill-opacity functions
src/select/dispatch.c: add fill-opacity functions to the table
src/parse/propstrings.{c,h}: support fill-opacity
include/libcss/properties.h: define CSS_PROP_FILL_OPACITY
src/parse/properties: add fill-opacity implementation
src/parse/important.c: handle CSS_PROP_FILL_OPACITY
src/parse/properties/properties.{c,h}: add fill-opacity unit mask
src/select/computed.c: implement the computed fill-opacity
src/parse/properties/properties.c: add fill-opacity property handler
test/dump{,_computed}.h: dump fill-opacity
test/data: add expected fill-opacity values
test/data/parse2: add SVG property test suite
docs/Bytecode: document the forthcoming stroke-opacity
include/libcss/properties.h: define stroke-opacity enumeration
src/bytecode/opcodes.h: define stroke-opacity enumeration
src/parse/properties/properties.h: add stroke-opacity prototype
include/libcss/computed.h: add stroke-opacity prototype
src/select/select_config.py: add stroke-opacity
src/select: regenerate autogenerated_*.h for stroke-opacity
src/select/properties: add stroke-opacity implementation
src/select/properties/properties.h: declare stroke-opacity functions
src/select/dispatch.c: add stroke-opacity functions to the table
src/parse/propstrings.{c,h}: support stroke-opacity
include/libcss/properties.h: define CSS_PROP_STROKE_OPACITY
src/parse/properties: add stroke-opacity implementation
src/parse/important.c: handle CSS_PROP_STROKE_OPACITY
src/parse/properties/properties.{c,h}: add stroke-opacity unit mask
src/select/computed.c: implement the computed stroke-opacity
src/parse/properties/properties.c: add stroke-opacity property handler
test/dump{,_computed}.h: dump stroke-opacity
test/data: add expected stroke-opacity values
test/data/parse2: add SVG stroke-opacity property tests

docs/Bytecode | 20 +++++++++-
include/libcss/computed.h | 8 ++++
include/libcss/properties.h | 12 ++++++
src/bytecode/opcodes.h | 9 +++++
src/parse/important.c | 10 +++++
src/parse/properties/Makefile | 2 +
src/parse/properties/fill_opacity.c | 82 +++++++++++++++++++++++++++++++++++++++++
src/parse/properties/properties.c | 4 ++
src/parse/properties/properties.h | 8 ++++
src/parse/properties/stroke_opacity.c | 82 +++++++++++++++++++++++++++++++++++++++++
src/parse/propstrings.c | 2 +
src/parse/propstrings.h | 33 +++++++++--------
src/select/autogenerated_computed.h | 20 ++++++----
src/select/autogenerated_propget.h | 106 +++++++++++++++++++++++++++++++++++++++++------------
src/select/autogenerated_propset.h | 88 ++++++++++++++++++++++++++++++++------------
src/select/computed.c | 12 ++++++
src/select/dispatch.c | 8 ++++
src/select/properties/Makefile | 2 +
src/select/properties/fill_opacity.c | 73 ++++++++++++++++++++++++++++++++++++
src/select/properties/properties.h | 2 +
src/select/properties/stroke_opacity.c | 73 ++++++++++++++++++++++++++++++++++++
src/select/select_config.py | 2 +
test/data/parse2/INDEX | 1 +
test/data/parse2/svg.dat | 79 +++++++++++++++++++++++++++++++++++++++
test/data/select/defaulting.dat | 26 +++++++++++++
test/data/select/tests1.dat | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
test/dump.h | 24 ++++++++++++
test/dump_computed.h | 48 ++++++++++++++++++++++++
28 files changed, 1019 insertions(+), 71 deletions(-)
create mode 100644 src/parse/properties/fill_opacity.c
create mode 100644 src/parse/properties/stroke_opacity.c
create mode 100644 src/select/properties/fill_opacity.c
create mode 100644 src/select/properties/stroke_opacity.c
create mode 100644 test/data/parse2/svg.dat
_______________________________________________
netsurf-dev mailing list -- netsurf-dev@netsurf-browser.org
To unsubscribe send an email to netsurf-dev-leave@netsurf-browser.org

No comments:

Post a Comment