commit e7aec5151543573c2f18484d4134959e219dc4a4 Author: Federico Mena Quintero Date: Tue Jan 3 17:52:04 2017 -0600 We are not in beta anymore; bump to 2.41.0 final. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ebcbfae24321f22cd8c04a4951bbaf70b60d7f29 Merge: c3c80d2 5bc8c04 Author: Federico Mena Quintero Date: Tue Jan 3 14:17:44 2017 -0600 Merge branch 'rustification' commit 5bc8c04552a0d35f5a55c648c4337cca69018498 Author: Chun-wei Fan Date: Tue Dec 20 14:41:39 2016 +0800 build/Makefile.msvcproj: Fix cleanup This removes the *.vs12.sourcefiles and *.vs12.sourcefiles.filters that are generated during the process of generating the Visual Studio 2013 projects, so that 'make distcheck' won't complain about leftover files. build/Makefile.msvcproj | 2 ++ 1 file changed, 2 insertions(+) commit 43c8ae3f0ba099aa30cf3e2534295cf54f5a8704 Author: Federico Mena Quintero Date: Mon Dec 19 16:35:25 2016 -0600 Update NEWS NEWS | 2 ++ 1 file changed, 2 insertions(+) commit 6f270cf091190f3e2a264563ad9eddc1c67135ba Author: Federico Mena Quintero Date: Mon Dec 19 16:33:01 2016 -0600 bgo#776297 - Only render markers on path, line, polyline, polygon elements Per the spec. Thanks to Massimo for the test case. rsvg-base.c | 1 - rsvg-shapes.c | 4 ++++ .../bugs/776297-marker-on-non-path-elements-ref.png | Bin 0 -> 1203 bytes .../bugs/776297-marker-on-non-path-elements.svg | 16 ++++++++++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) commit 605408a2abeda045fb26a553f9ca2bf546f76eec Author: Federico Mena Quintero Date: Mon Dec 19 16:25:02 2016 -0600 marker.rs: Normalize negative angles into positive ones This way our averaging of angles will work. rust/src/marker.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f67c24514a385401dd0929eaad5573dd2b05c7cf Author: Federico Mena Quintero Date: Mon Dec 19 15:34:16 2016 -0600 Update NEWS NEWS | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit c8ba1f65fb0df638cffafb9a31b488c2427bb438 Author: Federico Mena Quintero Date: Mon Dec 19 15:24:13 2016 -0600 bgo#686953 - Support the "marker" shorthand attribute We handled "marker-start", "marker-mid", and "marker-end", but not the shorthand "marker" for all of them. Thanks to Massimo for the patch. rsvg-styles.c | 18 +++++ .../reftests/svg1.1/painting-marker-03-f-ref.png | Bin 0 -> 28067 bytes .../reftests/svg1.1/painting-marker-03-f.svg | 86 +++++++++++++++++++++ 3 files changed, 104 insertions(+) commit 9ec026ca5050ad65eb42a0d4e455df0aae5e8bb7 Author: Federico Mena Quintero Date: Mon Dec 19 13:48:47 2016 -0600 Normalize test reference files so they don't dig into my private stash of fonts... Sigh. They were picking up things from my ~/.fonts, which is wrong. I'll have to find a way to make that not happen automatically. tests/fixtures/reftests/bugs/340047-ref.png | Bin 4891 -> 4707 bytes tests/fixtures/reftests/bugs/548494-ref.png | Bin 751 -> 695 bytes tests/fixtures/reftests/bugs/563933-ref.png | Bin 2526 -> 2470 bytes tests/fixtures/reftests/bugs/738367-ref.png | Bin 8748 -> 8692 bytes tests/fixtures/reftests/bugs/760180-ref.png | Bin 8884 -> 8698 bytes tests/fixtures/reftests/duplicate-id-ref.png | Bin 155 -> 94 bytes tests/fixtures/reftests/gzip-compressed-ref.png | Bin 155 -> 93 bytes tests/fixtures/reftests/include-compressed-ref.png | Bin 155 -> 93 bytes tests/fixtures/reftests/nonexisting-filter-ref.png | Bin 155 -> 93 bytes .../reftests/svg1.1/filters-color-02-b-ref.png | Bin 6382 -> 6066 bytes .../reftests/svg1.1/filters-composite-02-b-ref.png | Bin 16388 -> 15899 bytes .../reftests/svg1.1/painting-marker-01-f-ref.png | Bin 8618 -> 8581 bytes .../reftests/svg1.1/painting-marker-02-f-ref.png | Bin 9358 -> 9237 bytes .../reftests/svg1.1/painting-marker-04-f-ref.png | Bin 27921 -> 26711 bytes .../reftests/svg1.1/painting-marker-06-f-ref.png | Bin 8884 -> 8698 bytes .../reftests/svg1.1/painting-marker-07-f-ref.png | Bin 5209 -> 5001 bytes .../svg1.1/painting-marker-properties-01-f-ref.png | Bin 6513 -> 6097 bytes .../reftests/svg1.1/paths-data-01-t-ref.png | Bin 25470 -> 25377 bytes .../reftests/svg1.1/paths-data-02-t-ref.png | Bin 33012 -> 32835 bytes .../reftests/svg1.1/paths-data-03-f-ref.png | Bin 30928 -> 30742 bytes .../reftests/svg1.1/paths-data-04-t-ref.png | Bin 18168 -> 17951 bytes .../reftests/svg1.1/paths-data-05-t-ref.png | Bin 16086 -> 15946 bytes .../reftests/svg1.1/paths-data-06-t-ref.png | Bin 7250 -> 7143 bytes .../reftests/svg1.1/paths-data-07-t-ref.png | Bin 6625 -> 6473 bytes .../reftests/svg1.1/paths-data-08-t-ref.png | Bin 19348 -> 18934 bytes .../reftests/svg1.1/paths-data-09-t-ref.png | Bin 17700 -> 17284 bytes .../reftests/svg1.1/paths-data-10-t-ref.png | Bin 21531 -> 20633 bytes .../reftests/svg1.1/paths-data-12-t-ref.png | Bin 9745 -> 9603 bytes .../reftests/svg1.1/paths-data-13-t-ref.png | Bin 4576 -> 4400 bytes .../reftests/svg1.1/paths-data-14-t-ref.png | Bin 12570 -> 12393 bytes .../reftests/svg1.1/paths-data-15-t-ref.png | Bin 6058 -> 5862 bytes .../reftests/svg1.1/paths-data-16-t-ref.png | Bin 7885 -> 7651 bytes .../reftests/svg1.1/paths-data-17-f-ref.png | Bin 4456 -> 4287 bytes .../reftests/svg1.1/paths-data-18-f-ref.png | Bin 4837 -> 4644 bytes .../reftests/svg1.1/paths-data-19-f-ref.png | Bin 23426 -> 23376 bytes .../reftests/svg1.1/paths-data-20-f-ref.png | Bin 9179 -> 8996 bytes .../reftests/svg1.1/pservers-grad-01-b-ref.png | Bin 9700 -> 9241 bytes .../reftests/svg1.1/pservers-grad-02-b-ref.png | Bin 22580 -> 22010 bytes .../reftests/svg1.1/pservers-grad-03-b-ref.png | Bin 9846 -> 9534 bytes .../reftests/svg1.1/pservers-grad-04-b-ref.png | Bin 23971 -> 23348 bytes .../reftests/svg1.1/pservers-grad-05-b-ref.png | Bin 65245 -> 63786 bytes .../reftests/svg1.1/pservers-grad-06-b-ref.png | Bin 21269 -> 20711 bytes .../reftests/svg1.1/pservers-grad-07-b-ref.png | Bin 11103 -> 10707 bytes .../reftests/svg1.1/pservers-grad-08-b-ref.png | Bin 40248 -> 37401 bytes .../reftests/svg1.1/pservers-grad-09-b-ref.png | Bin 6268 -> 5885 bytes .../reftests/svg1.1/pservers-grad-10-b-ref.png | Bin 9316 -> 8955 bytes .../reftests/svg1.1/pservers-grad-11-b-ref.png | Bin 57420 -> 56219 bytes .../reftests/svg1.1/pservers-grad-12-b-ref.png | Bin 23962 -> 23336 bytes .../reftests/svg1.1/pservers-grad-13-b-ref.png | Bin 93578 -> 93256 bytes .../reftests/svg1.1/pservers-grad-14-b-ref.png | Bin 24931 -> 24421 bytes .../reftests/svg1.1/pservers-grad-15-b-ref.png | Bin 10232 -> 10028 bytes .../reftests/svg1.1/pservers-grad-16-b-ref.png | Bin 4787 -> 4619 bytes .../reftests/svg1.1/pservers-grad-18-b-ref.png | Bin 4783 -> 4613 bytes .../reftests/svg1.1/pservers-grad-21-b-ref.png | Bin 11563 -> 11389 bytes .../reftests/svg1.1/pservers-grad-22-b-ref.png | Bin 7596 -> 7414 bytes .../reftests/svg1.1/pservers-grad-23-f-ref.png | Bin 6522 -> 6130 bytes .../reftests/svg1.1/pservers-grad-24-f-ref.png | Bin 7711 -> 7252 bytes .../svg1.1/pservers-grad-stops-01-f-ref.png | Bin 6740 -> 6353 bytes 58 files changed, 0 insertions(+), 0 deletions(-) commit 25457b72770018045aa88d47688fbf1a45bff9af Author: Federico Mena Quintero Date: Mon Dec 19 11:49:17 2016 -0600 Add a testing mode so reftests can use predictable text rendering This adds an rsvg_handle_internal_set_testing() API, which should only be called by the test suite. Internally, it sets cairo_font_options_t that should yield reproducible text rendering. For example, I get different rendering results from text objects when I run "make check" as a user, than when I run it as root. rsvg-base.c | 16 ++++++++++++++++ rsvg-cairo-draw.c | 20 ++++++++++++++++++++ rsvg-cairo-render.c | 1 + rsvg-gobject.c | 2 ++ rsvg-private.h | 3 +++ rsvg.h | 2 ++ tests/rsvg-test.c | 2 ++ 7 files changed, 46 insertions(+) commit c742926a421d12a17fe0c6201b90db37011bf095 Author: Federico Mena Quintero Date: Fri Dec 16 16:40:21 2016 -0600 configure.ac: Add a --enable-debug option for debug vs. release --disable-debug (the default) will call "cargo build" with "--release". This is so that distro packages don't have to change options. --enable-debug will call "cargo build" normally. Use this for development. Makefile.am | 12 +++++++++--- configure.ac | 26 +++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 4 deletions(-) commit 4cc1045aab7b50eb39f59d51a5e90429504cb2bb Author: Federico Mena Quintero Date: Fri Dec 16 14:39:00 2016 -0600 Update AUTHORS from the whole git log git log --pretty='format:%an' | sort | uniq AUTHORS | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit 77ea6a621360871b56e85d3ce5b8b8d7072d7cad Author: Federico Mena Quintero Date: Fri Dec 16 14:31:32 2016 -0600 Switch to the official gtk-rs/cairo now that it supports matrix methods Thanks to https://github.com/gtk-rs/cairo/pull/95 rust/Cargo.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d11e469ffe9a5e84846f3f3973d3205fa6b6874c Author: Federico Mena Quintero Date: Fri Dec 16 14:31:18 2016 -0600 Make some arguments immutable rust/src/marker.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 1701dcbfe2316f9705c518e7bd1ca087e0a01cea Author: Chun-wei Fan Date: Fri Dec 16 16:43:07 2016 +0800 Visual Studio builds: Tell about Rust People will need to install the right Rust MSI packages and know how to set it up correctly and/or tell Visual Studio to use the correct cargo.exe. build/win32/vs12/README.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 1deacfcea6a4216337f6a1b5124e6875c18f7e55 Author: Chun-wei Fan Date: Fri Dec 16 16:26:37 2016 +0800 Visual Studio builds: Integrate Rust build process ...into the Visual Studio IDE build. This adds a project that is used to call the NMake Makefile to call cargo to build the rust bits before building the main librsvg DLL, which will now link to the static .lib that results from building the rust bits using cargo. build/win32/vs12/Makefile.am | 1 + build/win32/vs12/librsvg.sln | 10 ++++ build/win32/vs12/rsvg-build-defines.props | 13 ++++- build/win32/vs12/rsvg-rust.vcxproj | 97 +++++++++++++++++++++++++++++++ build/win32/vs12/rsvg.vcxprojin | 6 ++ build/win32/vs14/Makefile.am | 1 + 6 files changed, 125 insertions(+), 3 deletions(-) commit b502c8b18b0d5609202fae08403e8da969a95d66 Author: Chun-wei Fan Date: Fri Dec 16 15:01:58 2016 +0800 Visual Studio builds: Fix rsvg-view-3 projects The source file name has been changed here, so update it here. build/win32/vs12/rsvg-view-3.vcxproj | 2 +- build/win32/vs12/rsvg-view-3.vcxproj.filters | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7ee84512eb9b803ea73e62d75d30c3634281e1ad Author: Chun-wei Fan Date: Fri Dec 16 15:00:33 2016 +0800 Visual Studio builds: Fix librsvg DLL linking Due to the rustification, we need to link to: -The static .lib that comes from building the rustified parts of librsvg -Additional system libraries that become dependent due to the rustification parts. Also, we no longer need to include math.h from the $(SolutionDir) since the stock math.h shipped with Visual Studio 2013 and later supports the C99 math functions we need, so we can clean things up a little bit. build/win32/vs12/rsvg-build-defines.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 49ae87e22aa0bb5bfdb199e659989b833193c78f Author: Chun-wei Fan Date: Fri Dec 16 14:53:37 2016 +0800 MSVC builds: Make MSVC 2013 the baseline MSVC Version Due to the rustification of librsvg, it is now only possible to support Visual Studio 2013 and later as the Rust compiler will require items from the CRT during linking that is provided by the MSVC 2013 (and later) CRTs. As a result, drop the Visual Studio 2008~2012 projects, and we no longer need a fallback math.h implementation since these are now covered by the CRT implementation. Makefile.am | 6 +- build/Makefile-newvs.am | 30 ++-- build/Makefile.msvcproj | 33 ++++ build/win32/Makefile.am | 7 +- build/win32/vs10/Makefile.am | 39 ---- build/win32/vs11/Makefile.am | 28 --- build/win32/vs12/Makefile.am | 33 ++-- build/win32/{vs10 => vs12}/README.txt | 38 ++-- .../{vs10 => vs12}/libpixbufloader-svg.vcxproj | 8 +- .../libpixbufloader-svg.vcxproj.filters | 0 build/win32/{vs10 => vs12}/librsvg.sln | 4 +- .../win32/{vs10 => vs12}/rsvg-build-defines.props | 0 .../{vs10 => vs12}/rsvg-convert.vcxproj.filtersin | 2 +- build/win32/{vs10 => vs12}/rsvg-convert.vcxprojin | 10 +- build/win32/{vs10 => vs12}/rsvg-gen-srcs.props | 0 build/win32/{vs10 => vs12}/rsvg-install.propsin | 2 +- build/win32/{vs10 => vs12}/rsvg-install.vcxproj | 8 +- .../win32/{vs10 => vs12}/rsvg-version-paths.props | 2 +- build/win32/{vs10 => vs12}/rsvg-view-3.vcxproj | 8 +- .../{vs10 => vs12}/rsvg-view-3.vcxproj.filters | 0 build/win32/{vs10 => vs12}/rsvg.vcxproj.filtersin | 2 +- build/win32/{vs10 => vs12}/rsvg.vcxprojin | 10 +- build/win32/vs14/Makefile.am | 2 + build/win32/vs9/Makefile.am | 27 --- build/win32/vs9/README.txt | 74 -------- build/win32/vs9/libpixbufloader-svg.vcproj | 170 ------------------ build/win32/vs9/librsvg.sln | 81 --------- build/win32/vs9/math.h | 39 ---- build/win32/vs9/rsvg-build-defines.vsprops | 50 ------ build/win32/vs9/rsvg-convert.vcprojin | 167 ----------------- build/win32/vs9/rsvg-gen-srcs.vsprops | 19 -- build/win32/vs9/rsvg-install.vcproj | 74 -------- build/win32/vs9/rsvg-install.vspropsin | 34 ---- build/win32/vs9/rsvg-version-paths.vsprops | 53 ------ build/win32/vs9/rsvg-view-3.vcproj | 170 ------------------ build/win32/vs9/rsvg.vcprojin | 198 --------------------- configure.ac | 3 - 37 files changed, 123 insertions(+), 1308 deletions(-) commit 5a557714ae0a18dfad097c8f91f1703ce62b7934 Author: Chun-wei Fan Date: Fri Dec 16 14:32:09 2016 +0800 Visual Studio builds: Use a default value for $(CARGO) Define $(CARGO) to be simply 'cargo' unless it is overridden when we use the NMake Makefile to build the rust bits using Visual Studio. build/win32/rsvg-rust.mak | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 6583d84ef2989d009ddb646eceea43ea53675dd9 Author: Chun-wei Fan Date: Thu Dec 15 22:10:19 2016 +0800 Visual Studio builds: Add NMake Makefile for the Rust bits We need to call cargo to build the rust portions of librsvg, before we can link the final librsvg DLL, so add an NMake Makefile that can be used to build and clean the parts, with the needed envvars set. This will indicate that we will no longer support Visual Studio 2012 (or earlier) builds, as Rust will generate code that will need items in the Visual Studio 2013 (and later) CRTs during linking. More commits to follow in this regard, but this paves the first step to support Visual Studio builds for the rust-ified librsvg. build/win32/Makefile.am | 1 + build/win32/rsvg-rust.mak | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) commit f6bf80e47a1f7cce2cf46573fea68f4725b127f5 Author: Federico Mena Quintero Date: Wed Dec 14 13:32:56 2016 -0600 More AUTHORS AUTHORS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 917e7c85670525418219af09d711e13ff19edbb8 Author: Federico Mena Quintero Date: Wed Dec 14 11:35:21 2016 -0600 Update AUTHORS AUTHORS | 6 ++++++ 1 file changed, 6 insertions(+) commit 7714dfe8aa6836ab59f78cdd7eb00a814897e21e Author: Federico Mena Quintero Date: Wed Dec 14 13:27:05 2016 -0600 bgo#763386: Handle missing case of coincident control points ... are we done with these yet? Thanks again to Massimo for pointing out this case in https://bugzilla.gnome.org/show_bug.cgi?id=763386#c4 rust/src/marker.rs | 42 ++++++++++++++++++--- .../reftests/bugs/763386-marker-coincident-ref.png | Bin 943 -> 1198 bytes .../reftests/bugs/763386-marker-coincident.svg | 4 +- 3 files changed, 40 insertions(+), 6 deletions(-) commit 5a1b668df9beca81463f84d39d8dcc6c180f8190 Author: Federico Mena Quintero Date: Wed Dec 14 11:28:54 2016 -0600 tests/Makefile.am: Fix typos that caused reftests/bugs/* not to get distributed tests/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b80bf96d3a890d196d975569d8f5a1b36cf6481 Author: Federico Mena Quintero Date: Wed Dec 14 10:20:08 2016 -0600 rsvg-test: allow skipping directories that start with "ignore" as well as files It turns out that it's more convenient to move the whole set of problematic SVGs into an ignore/ subdirectory for now. tests/README.md | 7 +- .../reftests/svg1.1/ignore-pservers-grad-17-b.svg | 92 --------------------- .../reftests/svg1.1/pservers-grad-17-b-ref.png | Bin 9478 -> 0 bytes tests/rsvg-test.c | 28 +++++-- 4 files changed, 25 insertions(+), 102 deletions(-) commit 30a91d1e1f2df9ad4d6b28ed635e69619b1ed8b3 Author: Federico Mena Quintero Date: Wed Dec 14 09:31:43 2016 -0600 Make cargo run when srcdir != builddir Thanks to Jeff Waugh and Hubert Figuière for the trick. Makefile.am | 19 +++++++++++-------- configure.ac | 2 ++ gdk-pixbuf-loader/Makefile.am | 23 ++++++++++++++++++++++- 3 files changed, 35 insertions(+), 9 deletions(-) commit f0c113157ff51ae7514201ec6c721d24ce909659 Author: Federico Mena Quintero Date: Tue Dec 13 21:31:07 2016 -0600 Special thanks to the Rust people NEWS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0525bafa95f66398de51208c412baae7e402e373 Author: Federico Mena Quintero Date: Tue Dec 13 21:28:24 2016 -0600 Update NEWS for 2.41.0 NEWS | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) commit 3090becbf460d136e9db2f0bed2ccc9ab9942049 Author: Federico Mena Quintero Date: Tue Dec 13 21:16:55 2016 -0600 tests/README.md: Mention the "ignore-" prefix for reftests tests/README.md | 3 +++ 1 file changed, 3 insertions(+) commit c32694be3bf3355cb6c849577d7085173c94814e Author: Federico Mena Quintero Date: Tue Dec 13 20:50:56 2016 -0600 Be explicit about how stop-color and stop-opacity are inherited These can live in the element attributes, or in its style="..." attribute. Neither of them inherits by default; they have to be explicitly specified as "inherit" to do that. Inheritance is from the gradient's parent element, not from where it is referenced, hence the call to rsvg_state_reconstruct(). Also, stop-color can be currentColor. We now have explicit enums to indicate all of these cases. Previously, all the meanings were overloaded into state->has_stop_color and state->has_stop_opacity, and those didn't handle all cases correctly. Added the hexchat.svg icon to the tests, which is how I caught the lack of proper handling for style="stop-color: ...;". rsvg-paint-server.c | 67 +++++++++++++++++++------------- rsvg-styles.c | 30 +++++++++++--- rsvg-styles.h | 15 +++++++ tests/fixtures/reftests/hexchat-ref.png | Bin 0 -> 3930 bytes tests/fixtures/reftests/hexchat.svg | 58 +++++++++++++++++++++++++++ 5 files changed, 138 insertions(+), 32 deletions(-) commit cd7028edb9d080f16b5b4c8e4185c94f09ab6885 Author: Federico Mena Quintero Date: Tue Dec 13 19:16:28 2016 -0600 rsvg-paint-server.c: Remove old gradient code; it is unused now rsvg-paint-server.c | 175 ---------------------------------------------------- 1 file changed, 175 deletions(-) commit 5ea3754790e06ca99830f58e41f240fc7260349a Author: Federico Mena Quintero Date: Tue Dec 13 17:41:03 2016 -0600 Make this 2.41.0beta! yay! configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bbca5c907ab84c8ea3e954195a4e14a53ba54039 Author: Federico Mena Quintero Date: Tue Dec 13 17:33:17 2016 -0600 Check for Rust/Cargo in configure.ac; make Makefile.am smarter about rust This works, but "make distcheck" fails since we can't "cargo build" in the srcdir when under "make distcheck": it makes the srcdir directory read-only. Makefile.am | 32 +++++++++++++++++++++++++++++--- configure.ac | 25 ++++++++++++++++++------- tests/Makefile.am | 46 ++++++++++++++++++++++++---------------------- 3 files changed, 71 insertions(+), 32 deletions(-) commit 218ae16a3f95cff987b17b0af69954622974bf4e Author: Federico Mena Quintero Date: Tue Dec 13 16:21:49 2016 -0600 Tell automake to output an .xz archive, not a .bz2 configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8cb8489cd836cfdbb1c77f2a386aedbcea7749b7 Author: Federico Mena Quintero Date: Tue Dec 13 14:18:55 2016 -0600 io-svg: Propagate the result of rsvg_handle_close(), oops Found by Coverity. gdk-pixbuf-loader/io-svg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1a30e53a1ee2946f9e090b0f965d5926cad4297d Author: Federico Mena Quintero Date: Tue Dec 13 14:09:12 2016 -0600 rsvg-shapes: Stylistic fix Pointed out by Coverity. rsvg-shapes.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 6d199be6ab8dd345c7c7be8f31dac71c8c8c56e7 Author: Federico Mena Quintero Date: Tue Dec 13 14:03:53 2016 -0600 rsvg-filter: Don't use CLAMP(x, 0, max) on unsigned values The comparison against 0 is always true anyway. Also, fix a potential out-of-bounds read in discrete_component_transfer_func(). rsvg-filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 68ae25b75b0ff872436f82dbb67a145f08266843 Author: Federico Mena Quintero Date: Mon Dec 12 15:56:00 2016 -0600 Add test files for bug #761871 - maintain separate reflection points for cubic and quadratic curves This was fixed during the rewrite of the path parser; this gives us a test now. .../bugs/761871-reset-reflection-points-ref.png | Bin 0 -> 695 bytes .../reftests/bugs/761871-reset-reflection-points.svg | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) commit 29eddba37f8bc1d1686f41fa8eded9c1ce003d7d Author: Federico Mena Quintero Date: Mon Dec 12 15:19:42 2016 -0600 bgo#603550 - Compute the luminance correctly when generating a mask Thanks to Mike Lewis for the patch. https://bugzilla.gnome.org/show_bug.cgi?id=603550 rsvg-cairo-draw.c | 25 +++- .../reftests/bugs/603550-mask-luminance-ref.png | Bin 0 -> 4502 bytes .../reftests/bugs/603550-mask-luminance.svg | 130 +++++++++++++++++++++ 3 files changed, 152 insertions(+), 3 deletions(-) commit eb766567a11ffab1a3d70cb595a8556a1c280290 Author: Federico Mena Quintero Date: Mon Dec 12 14:48:05 2016 -0600 Add a feComposite test I think the reference image for filters-composite-02-b, from the SVG 1.1 test suite, is incorrect. Its composited values are as if there was a feFlood of White done before the compositing (i.e. non-fully-transparent areas are set against a white background, instead of a transparent background). .../reftests/svg1.1/filters-composite-02-b-ref.png | Bin 0 -> 16388 bytes .../reftests/svg1.1/filters-composite-02-b.svg | 203 +++++++++++++++++++++ 2 files changed, 203 insertions(+) commit 5b83d786215c88269e60cf55b62de390d71a241a Author: Federico Mena Quintero Date: Mon Dec 12 14:31:08 2016 -0600 Don't do our own compositing for feComposite; let Cairo handle it We only do the Arithmetic mode for feComposite. All the others (over, in, out, atop, xor) are done in Cairo now. rsvg-filter.c | 154 ++++++++++++++++++++++++++-------------------------------- 1 file changed, 69 insertions(+), 85 deletions(-) commit c24059c74a38d51f2b9b03e4f501534649375d4e Author: Federico Mena Quintero Date: Mon Dec 12 13:10:15 2016 -0600 Fix offsets in rsvg_filter_primitive_image_render() feImage filters were rendering completely blank images because the translation was incorrect. rsvg-filter.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit f52d96f657f99c205f282fb9dec70459902bff48 Author: Federico Mena Quintero Date: Thu Dec 8 12:33:38 2016 -0600 bgo#763386 - Handle curveto segments where only three control points are coincident For curveto segments with control points 1, 2, 3, 4, we correctly handled cases where 1/2 and 3/4 were coincident. However, we failed at computing the directionality when 1/2/3 or 2/3/4 are coincident. Thanks to Massimo for the original test case. https://bugzilla.gnome.org/show_bug.cgi?id=763386 rust/src/marker.rs | 37 ++++++++++++++------- .../reftests/bugs/763386-marker-coincident-ref.png | Bin 0 -> 943 bytes .../reftests/bugs/763386-marker-coincident.svg | 13 ++++++++ 3 files changed, 38 insertions(+), 12 deletions(-) commit f01f0a7c53b518ab4e5f8a14dd0e747f58c1ab7e Author: Federico Mena Quintero Date: Wed Dec 7 16:59:22 2016 -0600 Add test files for markers .../reftests/svg1.1/painting-marker-01-f-ref.png | Bin 0 -> 8618 bytes .../reftests/svg1.1/painting-marker-01-f.svg | 157 +++++++++++++ .../reftests/svg1.1/painting-marker-02-f-ref.png | Bin 0 -> 9358 bytes .../reftests/svg1.1/painting-marker-02-f.svg | 245 +++++++++++++++++++++ .../reftests/svg1.1/painting-marker-04-f-ref.png | Bin 0 -> 27921 bytes .../reftests/svg1.1/painting-marker-04-f.svg | 84 +++++++ .../reftests/svg1.1/painting-marker-06-f-ref.png | Bin 0 -> 8884 bytes .../reftests/svg1.1/painting-marker-06-f.svg | 159 +++++++++++++ .../reftests/svg1.1/painting-marker-07-f-ref.png | Bin 0 -> 5209 bytes .../reftests/svg1.1/painting-marker-07-f.svg | 66 ++++++ .../svg1.1/painting-marker-properties-01-f-ref.png | Bin 0 -> 6513 bytes .../svg1.1/painting-marker-properties-01-f.svg | 95 ++++++++ 12 files changed, 806 insertions(+) commit d136efe81cacf537730aeb8297096e3abd9ccbd1 Author: Federico Mena Quintero Date: Wed Dec 7 15:40:13 2016 -0600 feComponentTransferFunction: use the last feFuncX element for each channel, per the spec If a feComponentTransferFunction filter has duplicated feFunc{R,G,B,A} child elements, the spec says to use only the last such element for each channel. Add the corresponding test file. rsvg-filter.c | 6 +- .../reftests/svg1.1/filters-color-02-b-ref.png | Bin 0 -> 6382 bytes .../reftests/svg1.1/filters-color-02-b.svg | 112 +++++++++++++++++++++ 3 files changed, 116 insertions(+), 2 deletions(-) commit d37e275bc6f6d3ff1d81680433903574f6a508d1 Author: Federico Mena Quintero Date: Wed Dec 7 13:57:08 2016 -0600 rsvg_cairo_render_new(): Initialize ->bbox to the identity affine Otherwise, when filters cause rsvg_get_surface_of_node() to be called, that function will create a RsvgCairoRender with an all-zeros bbox and bbox.affine. This all-zeros affine causes cairo_matrix_invert() inside RsvbBbox::clip()/insert() to fail. In the C version it failed silently, since it ignored failures from cairo_matrix_invert(). The Rust version panic()s when a matrix can't be inverted. rsvg-cairo-render.c | 4 ++++ 1 file changed, 4 insertions(+) commit 99342d530f9ff63debd3f64ef302a063dd119f29 Author: Federico Mena Quintero Date: Wed Dec 7 12:41:49 2016 -0600 Fix obsolete comment rsvg-filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1516c9075efaa573618f56d3f5e370bda1aa6279 Author: Federico Mena Quintero Date: Wed Dec 7 12:41:25 2016 -0600 bbox.rs: Oops, return the correct dst.rect.height rust/src/bbox.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc85a253d8f31df4bd9b442bded8d9ea0bd12505 Author: Federico Mena Quintero Date: Wed Dec 7 11:19:03 2016 -0600 Use rsvg_node_foreach_child() instead of accessing children directly rsvg-filter.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit f732406e73427af610e587f66f58f532617cbd0b Author: Federico Mena Quintero Date: Mon Dec 5 18:49:49 2016 -0600 Remove unused prototype rsvg-defs.h | 2 -- 1 file changed, 2 deletions(-) commit 126455c4ccb537b65e7aea8041efee2a9e977b76 Author: Federico Mena Quintero Date: Fri Dec 2 16:19:04 2016 -0600 Initialize the RsvgNode vtables in _rsvg_node_init() Previously each node implementation would set its own vtable; instead, we'll pass the vtable down to _rsvg_node_init(). This will help in moving RsvgNode to Rust. rsvg-base.c | 10 +- rsvg-filter.c | 273 +++++++++++++++++++++++++++++++++++----------------- rsvg-gobject.c | 4 +- rsvg-image.c | 12 ++- rsvg-marker.c | 10 +- rsvg-mask.c | 19 +++- rsvg-paint-server.c | 43 ++++++--- rsvg-private.h | 10 +- rsvg-shapes.c | 68 +++++++++---- rsvg-structure.c | 97 ++++++++++++++----- rsvg-structure.h | 6 +- rsvg-text.c | 32 ++++-- 12 files changed, 415 insertions(+), 169 deletions(-) commit 3f685fe1b0e70a9f6def713a6d606b4fa4a2699d Author: Federico Mena Quintero Date: Fri Dec 2 15:16:04 2016 -0600 Remove _rsvg_node_finalize(); leave only _rsvg_node_free() And use this consistently in node implementations. rsvg-shapes.c | 8 ++++---- rsvg-structure.c | 10 ++++------ rsvg-structure.h | 2 -- 3 files changed, 8 insertions(+), 12 deletions(-) commit 2d5a23c124e431cef52ae6475e65ff75a6b1fd07 Author: Federico Mena Quintero Date: Fri Dec 2 10:56:19 2016 -0600 Don't push/pop a new state for nodes that wouldn't be drawn anyway Nodes will be omitted from drawing when: - we are in a draw_sub() situation, where only a subtree of a node a specific ID is rendered, and/or - a node's state resolves to visibility:hidden In either case, we were pushing/popping a new state. Now we only do it when the node will actually be drawn. rsvg-structure.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit ac48e507ec23d7ab00f63a4d424790adba46cb40 Author: Federico Mena Quintero Date: Fri Dec 2 10:40:09 2016 -0600 Push/pop the state stack in rsvg_node_draw(), not everywhere it is called Every place that called rsvg_node_draw() would do rsvg_state_push()/pop() around it. Now we do that in a single place, inside rsvg_node_draw() itself. rsvg-base.c | 6 ------ rsvg-cairo-draw.c | 2 -- rsvg-cairo-render.c | 3 +-- rsvg-marker.c | 2 -- rsvg-structure.c | 16 ++++++++-------- 5 files changed, 9 insertions(+), 20 deletions(-) commit d29eb93a79a3b6787e61d5db4a7dd422c70f1de5 Author: Federico Mena Quintero Date: Fri Dec 2 10:24:24 2016 -0600 Remove superfluous cairo_save()/cairo_restore() We create a new cairo_t explicitly for get_foo_sub() and destroy it when we are done; there is no need to keep the cairo_t pristine for another place. rsvg-base.c | 4 ---- 1 file changed, 4 deletions(-) commit 04ee0f296d0443db108ac9db7b0814408f667d2b Author: Federico Mena Quintero Date: Fri Dec 2 09:37:44 2016 -0600 Remove obsolete comment rsvg-base.c | 1 - 1 file changed, 1 deletion(-) commit e3f29e975235e97b31334b3d5b051d79a47dd2bd Author: Federico Mena Quintero Date: Thu Dec 1 12:27:41 2016 -0600 node.rs: Rename trait Node to NodeTrait We'll use Node for a concrete object rust/src/node.rs | 2 +- rust/src/shapes.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6438cb7e678155b58bc6189421079d2e03366482 Author: Federico Mena Quintero Date: Thu Dec 1 12:08:26 2016 -0600 gradient.rs: Avoid copying a gradient when resolving We used to call into the C helper code to get a Gradient from a URI. Then we would clone() that gradient and operate on it. Now we operate directly on the Gradient that we got from the C helper code, without cloning it. We create a box from that Gradient pointer and pass that Box around. We own that Gradient, after all! rust/src/gradient.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 5e362661b769fb5d5d639d4937f4b25e8801003c Author: Federico Mena Quintero Date: Wed Nov 30 21:26:03 2016 -0600 gradient.rs: Destroy the gradient that we created with the C helper function ... even though the helper called back into Rust to create the gradient! rust/src/gradient.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 30d12a9aa7ac0c0289f143484f5e7a585289f89d Author: Federico Mena Quintero Date: Wed Nov 30 21:17:59 2016 -0600 rsvg-cairo-draw.c: Use the Rust implementation of the gradient resolver rsvg-cairo-draw.c | 240 +++++++++++++----------------------------------------- 1 file changed, 58 insertions(+), 182 deletions(-) commit 1c0b41dfd17ec286b47b84aaa47c3f2a3fc10bb1 Author: Federico Mena Quintero Date: Wed Nov 30 21:17:29 2016 -0600 gradient.rs: Finish porting gradients to Rust! Yay! rsvg-css.c | 2 +- rsvg-paint-server.h | 42 ++++++----- rust/src/gradient.rs | 200 +++++++++++++++++++++++++++++++++++++++++++++------ rust/src/lib.rs | 4 +- 4 files changed, 210 insertions(+), 38 deletions(-) commit 9355820e6a3f796860e3bde7520295ce23664ea5 Author: Federico Mena Quintero Date: Wed Nov 30 19:18:43 2016 -0600 drawing_ctx.rs: Wrappers for acquire_node() and release_node() rust/src/drawing_ctx.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 6ece18779ebe31066122fd480cd5971131cb0f19 Author: Federico Mena Quintero Date: Wed Nov 30 19:07:37 2016 -0600 fix: implement gradient_radial_new rsvg-paint-server.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 6fa8e4f22f5d4538fe840e81ac00c63110127aa7 Author: Federico Mena Quintero Date: Wed Nov 30 19:05:05 2016 -0600 Rename rsvg_acquire_node*() / rsvg_release_node() to rsvg_drawing_ctx_*_node() throughout These operate on an RsvgDrawingCtx, so make their naming consistent rsvg-base.c | 24 ++++++++++++------------ rsvg-cairo-draw.c | 22 +++++++++++----------- rsvg-filter.c | 4 ++-- rsvg-marker.c | 4 ++-- rsvg-paint-server.c | 4 ++-- rsvg-private.h | 9 ++++++--- rsvg-structure.c | 6 +++--- rsvg-text.c | 8 ++++---- 8 files changed, 42 insertions(+), 39 deletions(-) commit 4b084cd3ff63ddc6425444d0e51a000a0245b249 Author: Federico Mena Quintero Date: Wed Nov 30 19:02:06 2016 -0600 gradient.rs: Implement gradient_radial_new() rust/src/gradient.rs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) commit 675922d932f75aeb8036ce33215b19d45171fd45 Author: Federico Mena Quintero Date: Wed Nov 30 18:10:12 2016 -0600 gradient.rs: Implement setting linear gradients on a Cairo context rust/Cargo.toml | 7 +++- rust/src/gradient.rs | 114 ++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 113 insertions(+), 8 deletions(-) commit 2592401e388df2a0455acbeed28b4b66240e26f4 Author: Federico Mena Quintero Date: Wed Nov 30 18:09:26 2016 -0600 Reorder some struct fields for consistency rsvg-paint-server.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit efb58406c1cfb38218583c500c0c5c063308e683 Author: Federico Mena Quintero Date: Wed Nov 30 18:08:50 2016 -0600 Wrap some more RsvgDrawingCtx functions in Rust rsvg-cairo-draw.h | 1 + rust/src/bbox.rs | 6 +++--- rust/src/drawing_ctx.rs | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) commit 3a8f07629033ab38011f408534386ad357de1a7d Author: Federico Mena Quintero Date: Wed Nov 30 18:06:09 2016 -0600 New function rsvg_cairo_get_cairo_context() We use it from the Rust code to extract the cairo_t from an RsvgDrawingContext, which in turn is assumed to be a RsvgCairoRender. rsvg-cairo-draw.c | 8 ++++++++ rsvg-cairo-draw.h | 3 +++ 2 files changed, 11 insertions(+) commit 0ca4455350b5bbab697a8f19aedc9c548fa24dc0 Author: Federico Mena Quintero Date: Fri Nov 25 16:36:09 2016 -0600 bbox.rs: Implement RsvgBbox in Rust rsvg-base.c | 119 ------------------------------------------ rsvg-private.h | 7 +++ rust/src/bbox.rs | 156 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ rust/src/lib.rs | 8 +++ 4 files changed, 171 insertions(+), 119 deletions(-) commit 370634f1491df627009128191ba2625fc9bbd473 Author: Federico Mena Quintero Date: Fri Nov 25 15:09:42 2016 -0600 gradient.rs: Export functions to create Gradient objects and set their color stops We will use these from the *_fix_fallback() functions to do fallback resolution for gradients in the Rust code. rsvg-paint-server.h | 22 ++++++++++++++ rust/src/gradient.rs | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++ rust/src/lib.rs | 6 ++++ 3 files changed, 112 insertions(+) commit bd32612b9c7599d0b07667e23d281097e63deef6 Author: Federico Mena Quintero Date: Fri Nov 25 14:03:29 2016 -0600 rsvg-cairo-draw.c: Factor out common code to set a cairo_pattern_t from a gradient rsvg-cairo-draw.c | 90 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 49 insertions(+), 41 deletions(-) commit 0e9bda14796ed6aa862a324a27b01ce1fdc8f885 Author: Federico Mena Quintero Date: Fri Nov 25 13:45:01 2016 -0600 gradient.rs: Implementation of gradient fallbacks rust/src/gradient.rs | 242 +++++++++++++++++++++++++++++++++++++++------------ rust/src/length.rs | 6 +- 2 files changed, 188 insertions(+), 60 deletions(-) commit 6e1986a0f6dd5c60b92c73555547f5a0c669b5d2 Author: Federico Mena Quintero Date: Fri Nov 25 09:12:30 2016 -0600 gradient.rs: Don't initialize RsvgLength by hand; actually parse a valid one rust/src/gradient.rs | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) commit 2842469ebb90f045d3c92d479795fa0b57cae89e Author: Federico Mena Quintero Date: Wed Nov 23 19:04:35 2016 -0600 gradient.rs: Start an implementation of gradient parameters in Rust Gradients can inherit their attributes from "fallback" gradients mentioned by IRI. The C code does a little magic to resolve the fallbacks: it does a shallow-copy of an RsvgLinearGradient or RsvgRadialGradient structure, and then walks the chain of fallbacks, filling in the shallow-copied structure as appropriate. This is done even for the children of the gradient node, i.e. its color stops: the pointer to the node->children is shallow-copied (!) For the Rust version, we'll have specific structures to hold a gradient's semantics. They'll have Option<> fields that can be resolved from fallbacks. We will have a "digested" array of color stops, not a high-level array of child nodes that may or may not actually contain stop elements. rust/src/gradient.rs | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++ rust/src/lib.rs | 1 + 2 files changed, 109 insertions(+) commit a2bf17db8895092e13be3d06c6c1e32e114051e2 Author: Federico Mena Quintero Date: Tue Nov 22 17:11:22 2016 -0600 add_color_stops_for_gradient(): Iterate through the stops with rsvg_node_foreach_child() rsvg-cairo-draw.c | 80 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 31 deletions(-) commit f8fe835d0d3b919daeeb87cefa0b50bf28604ebf Author: Federico Mena Quintero Date: Tue Nov 22 16:52:09 2016 -0600 rsvg-marker.c: Iterate through children with rsvg_node_foreach_child() rsvg-marker.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit a49f8d38acc51e094a6dc24efd6ff12f6db6871e Author: Federico Mena Quintero Date: Tue Nov 22 16:20:00 2016 -0600 Use a new rsvg_node_type() function throughout instead of an RSVG_NODE_TYPE() macro rsvg-base.c | 20 +++++++++++++------- rsvg-cairo-draw.c | 8 ++++---- rsvg-filter.c | 10 +++++----- rsvg-paint-server.c | 24 ++++++++++++------------ rsvg-private.h | 3 ++- rsvg-shapes.c | 2 +- rsvg-structure.c | 2 +- rsvg-text.c | 4 ++-- 8 files changed, 40 insertions(+), 33 deletions(-) commit 4f1d58dbffc6d35bf1af6f23f4d68ea93b3d3ffc Author: Federico Mena Quintero Date: Tue Nov 22 16:05:34 2016 -0600 Rename rsvg_node_group_pack() to rsvg_node_add_child() ... since that is its true purpose. rsvg-base.c | 4 ++-- rsvg-structure.c | 2 +- rsvg-structure.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 852a2a3a827cf6922819802a7c67926f6880999c Author: Federico Mena Quintero Date: Tue Nov 22 16:02:50 2016 -0600 Use an iterator function rsvg_node_foreach_child() throughout This is instead of iterating through the node->children GPtrArray by hand. rsvg-base.c | 52 +++++++++--- rsvg-private.h | 9 +++ rsvg-structure.c | 72 ++++++++++------- rsvg-text.c | 239 ++++++++++++++++++++++++++++++++++++------------------- 4 files changed, 248 insertions(+), 124 deletions(-) commit d1ef96e0e4c5075a5ef34df5703c6adcb49c35b0 Author: Federico Mena Quintero Date: Tue Nov 22 14:43:56 2016 -0600 Use an accessor function rsvg_node_get_parent() throughout Also, fix a three-part hack: 1. rsvg_standard_element_start() would set the new node's parent right there, in redundant fashion to where rsvg_node_group_pack() sets the node's parent. 2. Make rsvg_standard_element_start() add the new node to its parent before node->set_atts() gets called... 3. ... so that rsvg_stop_set_atts() doesn't have to set its own parent to ctx->priv->currentnode (!) because the stop's node hasn't been parented yet. This was the only place where a node->parent gets overwritten after creation. rsvg-base.c | 20 +++++++++++++------- rsvg-cairo-render.c | 4 ++-- rsvg-paint-server.c | 2 -- rsvg-private.h | 3 +++ rsvg-structure.c | 17 ++++++++++------- rsvg-styles.c | 2 +- 6 files changed, 29 insertions(+), 19 deletions(-) commit 9e579213b88028cf9f9cc03127328e0008ad5afe Author: Federico Mena Quintero Date: Tue Nov 22 14:18:36 2016 -0600 Use an accessor function rsvg_node_get_state() throughout rsvg-base.c | 8 +++++++- rsvg-paint-server.c | 4 ++-- rsvg-private.h | 3 +++ rsvg-shapes.c | 24 ++++++++++++------------ rsvg-structure.c | 14 +++++++------- rsvg-styles.c | 2 +- rsvg-text.c | 4 ++-- 7 files changed, 34 insertions(+), 25 deletions(-) commit ce69346a0fa93a59943baba1491d0397bd314739 Author: Federico Mena Quintero Date: Tue Nov 22 09:02:30 2016 -0600 node_is_filter_primitive(): make a private function, not a public macro Changed the way filter primitives are tested: they used a bitmask; now we have a well-defined range within the RsvgNodeType enum via the RSVG_NODE_TYPE_FILTER_PRIMITIVE_FIRST and RSVG_NODE_TYPE_FILTER_PRIMITIVE_LAST values. rsvg-filter.c | 10 +++++++++- rsvg-private.h | 5 ++--- 2 files changed, 11 insertions(+), 4 deletions(-) commit ce4fc2c3cb29eff9e67aec31b7382ea1e14d4092 Author: Federico Mena Quintero Date: Tue Nov 22 09:00:56 2016 -0600 rsvg-test: Ignore SVG fixtures that start with "ignore-" Right now pservers-grad-17-b.svg doesn't pass the tests, but I think it may be a Cairo bug. Add the ability to ignore test files if they have a "ignore-" filename prefix. Hopefully I'll remember to fix this later... .../{pservers-grad-17-b.svg => ignore-pservers-grad-17-b.svg} | 0 tests/rsvg-test.c | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7f696c56a956371230c7ece49712cf95589abcaa Author: Federico Mena Quintero Date: Fri Nov 18 18:55:27 2016 -0600 node.rs / shapes.rs - Start a Rust implementation for nodes rust/src/drawing_ctx.rs | 24 ++++++++++++++++++++++++ rust/src/handle.rs | 1 + rust/src/lib.rs | 5 ++++- rust/src/node.rs | 15 +++++++++++++++ rust/src/path_builder.rs | 1 + rust/src/shapes.rs | 43 +++++++++++++++++++++++++++++++++++++++++++ rust/src/state.rs | 1 + 7 files changed, 89 insertions(+), 1 deletion(-) commit 7bd590aaff835d9d4113736ecd273c612830aef6 Author: Federico Mena Quintero Date: Fri Nov 18 18:13:43 2016 -0600 path_parser.rs: Make PathParser private, and only have a public parse_path_into_builder() function This function returns a Result<(), ParseError>, where ParseError is a new struct. Eventually we'll have tests for actual error reporting. rust/src/path_parser.rs | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) commit 54dc79f6609e53fa956f53d9fbb80c687075ee92 Author: Federico Mena Quintero Date: Fri Nov 18 15:45:48 2016 -0600 node_set_atts(): Call rsvg_parse_style_attrs() here, not in every node implementation This shrinks the ::set_atts() methods by a good bit, and only leaves element-specific attributes in those methods. The general "class" and "id" attributes are dealt with here. rsvg-base.c | 36 +++++++++++++++++++++++++++--------- rsvg-filter.c | 7 +------ rsvg-image.c | 8 +------- rsvg-marker.c | 8 ++------ rsvg-mask.c | 19 +++---------------- rsvg-paint-server.c | 2 -- rsvg-shapes.c | 51 ++++++--------------------------------------------- rsvg-structure.c | 34 ++-------------------------------- rsvg-text.c | 16 ---------------- 9 files changed, 42 insertions(+), 139 deletions(-) commit 048bb0027df82775d81064898ff1995e5a34753c Author: Federico Mena Quintero Date: Fri Nov 18 15:21:54 2016 -0600 NodeCreator: Add a supports_class_attribute field, and populate it from the spec https://www.w3.org/TR/SVG/attindex.html#RegularAttributes has a list of which elements support the "class" attribute for CSS styling. Right now most of our node implementations fetch the "id" and "class" by hand, and feed them to rsvg_parse_style_attrs(). We'll factor out that call for all the node types, and do the call in a single place in the toplevel node_set_atts(). According to the spec all elements support "id". The NodeCreator structure, and the node_creators[] array of supported element types, encode which elements support the "class" attribute, so we can fetch it as appropriate. rsvg-base.c | 151 +++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 93 insertions(+), 58 deletions(-) commit 4b22ec83e3567fde973aafccbf102bb404d2d6f0 Author: Federico Mena Quintero Date: Thu Nov 17 15:27:32 2016 -0600 Dispatch creation of new nodes from an array of element names, not a chain of strcmp() Also, the rsvg_new_SOME_NODE_TYPE () constructor functions now take the element name. This lets us: * Use bsearch() on the sorted array of element names, instead of an unordered chain of if (strcmp (...)). We can replace this later with something better like a trie. * Port things to Rust more easily, since the constructor functions can dispatch on their own based on the element name. * Avoid special cases in the way rsvg_new_node_component_transfer_function() and rsvg_new_node_light_source() are called; now they dispatch on their own based on the element name. rsvg-base.c | 221 +++++++++++++++++++++++++--------------------------- rsvg-filter.c | 65 ++++++++++------ rsvg-filter.h | 40 +++++----- rsvg-image.c | 2 +- rsvg-image.h | 2 +- rsvg-marker.c | 2 +- rsvg-marker.h | 2 +- rsvg-mask.c | 4 +- rsvg-mask.h | 4 +- rsvg-paint-server.c | 8 +- rsvg-paint-server.h | 8 +- rsvg-shapes.c | 14 ++-- rsvg-shapes.h | 14 ++-- rsvg-structure.c | 12 +-- rsvg-structure.h | 12 +-- rsvg-text.c | 6 +- rsvg-text.h | 6 +- rust/src/lib.rs | 1 + 18 files changed, 218 insertions(+), 205 deletions(-) commit 58a645cc9b547ab558dfa8dc398143a0b01be9f1 Author: Federico Mena Quintero Date: Thu Nov 17 14:05:45 2016 -0600 node_set_atts(): Check here for the property bag being empty Every ::set_atts() implementation used to check on its own whether the property bag is empty (common for "plain" SVG elements with no defined attributes?) before actually querying the property bag. Now we do that check in a single place, in the toplevel node_set_atts() helper, instead of having each node type do it on its own. This means that ::set_atts() implementation which do "validation" work or any other post-initialization after the attributes have been set, will have to support their ::set_atts() not being called at all if there are no attributes in the first place. rsvg-base.c | 4 +- rsvg-filter.c | 648 ++++++++++++++++++++++++---------------------------- rsvg-image.c | 52 ++--- rsvg-marker.c | 58 +++-- rsvg-mask.c | 72 +++--- rsvg-paint-server.c | 325 +++++++++++++------------- rsvg-shapes.c | 184 +++++++-------- rsvg-structure.c | 116 +++++----- rsvg-text.c | 36 ++- 9 files changed, 708 insertions(+), 787 deletions(-) commit 997c1a06f0a84bd3b26e2dfbf7250cfc2d3ac222 Author: Federico Mena Quintero Date: Thu Nov 17 11:53:52 2016 -0600 property_bag.rs: Bindings for RsvgPropertyBag rust/src/lib.rs | 1 + rust/src/property_bag.rs | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) commit b4d5be4d9ddc1ecbfe6c4fff4e9e886520cdd4d6 Author: Federico Mena Quintero Date: Thu Nov 17 07:34:57 2016 -0600 Make rsvg_node_set_atts() static It is only used in rsvg-base.c anyway; rename it to node_set_atts(). rsvg-base.c | 14 +++++++------- rsvg-private.h | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) commit b2c5f373d12fa0c93f941aab22e6bb8076bf3bee Author: Federico Mena Quintero Date: Thu Nov 17 07:25:40 2016 -0600 RsvgNode: don't keep the node's element name in this struct while parsing While an RsvgHandle is parsing, it keeps a stack with the name of the current XML element. However, it kept the element name as part of the RsvgNode structure. The name pointers are only valid while the xmlParserCtxtPtr is alive; after that, node->name contains a dangling pointer (fortunately unused). Instead of burdening RsvgNode with maintaining the parsing stack, we now keep this stack in RsvgHandlePrivate instead. rsvg-base.c | 50 ++++++++++++++++++++++++++++++++++++++++++-------- rsvg-gobject.c | 1 + rsvg-private.h | 6 +++++- 3 files changed, 48 insertions(+), 9 deletions(-) commit 4daa2de3caafb5f32985e9fd646f90b528847e16 Author: Federico Mena Quintero Date: Thu Nov 17 06:54:44 2016 -0600 Remove unused RsvgLoadPolicy It was set to the single possible value at construction time, and then checked with an assertion for that value; it wasn't used for anything. rsvg-base.c | 2 -- rsvg-gobject.c | 1 - rsvg-private.h | 8 -------- 3 files changed, 11 deletions(-) commit 4d19ded9d0e880e0bb0fd9cd9580c4175276dde8 Author: Federico Mena Quintero Date: Wed Nov 16 18:27:05 2016 -0600 Implement rsvg_length_normalize() fully in Rust We add an RsvgLength::normalize() method, and the corresponding rsvg_length_normalize() function to make this accessible to the C code. This removes the old _rsvg_css_normalize_length() function. rsvg-base.c | 2 +- rsvg-cairo-draw.c | 36 ++++++++++++++-------------- rsvg-css.c | 64 +------------------------------------------------ rsvg-filter.c | 38 ++++++++++++++--------------- rsvg-image.c | 8 +++---- rsvg-marker.c | 12 +++++----- rsvg-private.h | 4 +++- rsvg-shapes.c | 34 +++++++++++++------------- rsvg-structure.c | 16 ++++++------- rsvg-text.c | 22 ++++++++--------- rust/src/drawing_ctx.rs | 20 ++++++++++++++++ rust/src/length.rs | 64 +++++++++++++++++++++++++++++++++++++++++++++---- 12 files changed, 168 insertions(+), 152 deletions(-) commit 4eca2e07b6419d32e8d45ff71cf60aa24b908217 Author: Federico Mena Quintero Date: Wed Nov 16 15:40:13 2016 -0600 drawing_ctx.rs: Put the declaration of RsvgDrawingCtx here We'll use this file to declare the accessors to an RsvgDrawingCtx, which are right now implemented in C. rust/src/drawing_ctx.rs | 16 ++++++++++++++++ rust/src/lib.rs | 5 +++-- rust/src/marker.rs | 3 +-- 3 files changed, 20 insertions(+), 4 deletions(-) commit 66f7394503b4ed180d84735dd80382bc278abe41 Author: Federico Mena Quintero Date: Wed Nov 16 15:12:03 2016 -0600 Make viewport_percentage() internal to rsvg-css.c This is only used in _rsvg_css_normalize_length() anyway. Also, remove an unused function. rsvg-css.c | 16 ++++++++++++++-- rsvg-styles.c | 18 ------------------ rsvg-styles.h | 5 ----- 3 files changed, 14 insertions(+), 25 deletions(-) commit b55970ae21f2f773e98ede77cba7f8ce5b86fefe Author: Federico Mena Quintero Date: Wed Nov 16 15:08:07 2016 -0600 Use a new rsvg_drawing_ctx_get_normalized_font_size(); make the computation in a helper function The public rsvg_drawing_ctx_get_normalized_font_size() just takes an RsvgDrawingCtx and operates on the current state. The actual (recursive) computation is now done in a helper function, which is also of use for computing the baseline_shift. rsvg-css.c | 16 +++++++++++----- rsvg-private.h | 3 ++- rsvg-text.c | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) commit cba410550a00a0d6dfe4f8b9ffe39ec0ad1a80bc Author: Federico Mena Quintero Date: Wed Nov 16 15:00:17 2016 -0600 rsvt-text: Don't pass an RsvgState around; get it from the context rsvg-text.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 11282a185a9723b75bd5f8e53b26a3afddcaca3a Author: Federico Mena Quintero Date: Wed Nov 16 14:49:20 2016 -0600 Use a new rsvg_drawing_ctx_get_dpi() accessor throughout Instead of accessing ctx->{dpi_x,dpi_y} directly. rsvg-base.c | 17 +++++++++++++++-- rsvg-cairo-draw.c | 6 +++++- rsvg-css.c | 10 +++++++--- rsvg-private.h | 3 +++ rsvg-text.c | 6 ++++-- 5 files changed, 34 insertions(+), 8 deletions(-) commit 2376ac2a826854b4c3645bc0976096b86cefb3b5 Author: Federico Mena Quintero Date: Wed Nov 16 14:35:32 2016 -0600 Use a new rsvg_drawing_ctx_get_view_box_size() throughout Instead of accessing ctx->vb.rect.{width,height} directly, introduce an accesor function. rsvg-base.c | 7 +++++++ rsvg-css.c | 11 +++++++---- rsvg-filter.c | 32 ++++++++++++++++++++------------ rsvg-private.h | 3 +++ 4 files changed, 37 insertions(+), 16 deletions(-) commit 932db358ee830737a4231d8dc4bfa81966828e5c Author: Federico Mena Quintero Date: Wed Nov 16 14:24:45 2016 -0600 Rename _rsvg_{push,pop}_view_box to rsvg_drawing_ctx_{push,pop}_view_box The operations act on a RsvgDrawingCtx, so start making the naming consistent like that. rsvg-base.c | 4 ++-- rsvg-cairo-draw.c | 26 +++++++++++++------------- rsvg-filter.c | 8 ++++---- rsvg-marker.c | 4 ++-- rsvg-private.h | 4 ++-- rsvg-structure.c | 10 +++++----- 6 files changed, 28 insertions(+), 28 deletions(-) commit 84af994cadb50de44a684fb174a10a7b965596eb Author: Federico Mena Quintero Date: Wed Nov 16 10:24:05 2016 -0600 rsvg_length_hand_normalize(): Fully implemented now in Rust This replaces _rsvg_css_hand_normalize_length(). rsvg-base.c | 8 ++++---- rsvg-css.c | 19 ------------------- rsvg-private.h | 10 ++++++++-- rust/src/length.rs | 29 ++++++++++++++++++++++++++--- 4 files changed, 38 insertions(+), 28 deletions(-) commit 822459f29b74e4e154d721c80f6e16fe6f05e0f2 Author: Federico Mena Quintero Date: Tue Nov 15 18:38:10 2016 -0600 RsvgLength: make ::parse() a constructor, not a standalone parse_length() function rust/src/length.rs | 168 +++++++++++++++++++++++++++-------------------------- 1 file changed, 85 insertions(+), 83 deletions(-) commit deb3e8eb55b5b2c3b408934c91f65de6bf666ee2 Author: Federico Mena Quintero Date: Tue Nov 15 16:15:46 2016 -0600 Rename rsvg-path.h to rsvg-path-builder.h Now it only holds the prototypes for the RsvgPathBuilder API, so make the filename consistent. Makefile.am | 2 +- rsvg-base.c | 2 +- rsvg-cairo-clip.c | 2 +- rsvg-cairo-draw.c | 2 +- rsvg-marker.c | 2 +- rsvg-path.h => rsvg-path-builder.h | 8 ++++---- rsvg-private.h | 2 +- rsvg-shapes.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) commit 1e12b148dec098f2f1d5d8edfd9e0317f5e9f4ba Author: Federico Mena Quintero Date: Fri Nov 11 18:15:44 2016 -0600 Make condition slightly easier to read rsvg-base.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 69789ced424d2a7c25b10ca11be2722c70e33987 Author: Federico Mena Quintero Date: Fri Nov 11 18:09:01 2016 -0600 Remove superfluous term Here, bbox.x = bbox.y = 0, so we don't need to add them. rsvg-base.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 825fed0fe3ac41fb5551239c118a30fd1b4f4e11 Author: Federico Mena Quintero Date: Fri Nov 11 17:19:12 2016 -0600 Remove test 20 for gradients; it is for animations .../reftests/svg1.1/pservers-grad-20-b-ref.png | Bin 9478 -> 0 bytes .../reftests/svg1.1/pservers-grad-20-b.svg | 92 --------------------- 2 files changed, 92 deletions(-) commit f3aac518feed53ad29d04918e08ec08802cf18e3 Author: Federico Mena Quintero Date: Fri Nov 11 17:17:29 2016 -0600 Test 21 for gradients also passes; regenerate ref image .../reftests/svg1.1/pservers-grad-21-b-ref.png | Bin 12246 -> 11563 bytes 1 file changed, 0 insertions(+), 0 deletions(-) commit e28afe422968f8a5bdc57ce29b46b196e0a7ead7 Author: Federico Mena Quintero Date: Fri Nov 11 17:02:37 2016 -0600 Do not inherit gradient stop color and opacity from the gradient's parent object Per the spec, stop-color and stop-opacity don't inherit from the parent object of a gradient, unless explicitly requested. This makes the test pservers-grad-18-b.svg pass. rsvg-paint-server.c | 35 ++++++++++++++++++--- .../reftests/svg1.1/pservers-grad-18-b-ref.png | Bin 5654 -> 4783 bytes 2 files changed, 30 insertions(+), 5 deletions(-) commit f3fb509b8c34fb14b5fe7a227652f03fba631459 Author: Federico Mena Quintero Date: Fri Nov 11 13:37:30 2016 -0600 Ensure gradient stop offsets are in nondecreasing order. The test tests/fixtures/reftests/svg1.1/pservers-grad-16-b.svg was not passing. This test has gradient stop offsets in the wrong order. Cairo automatically sorts them, but the SVG spec mandates that they should be adjusted to be in nondecreasing order. I was actually confused two commits ago; I thought the spec mandated that the stop offsets were invalid if they weren't ordered. rsvg-cairo-draw.c | 8 +++----- .../reftests/svg1.1/pservers-grad-16-b-ref.png | Bin 6618 -> 4787 bytes 2 files changed, 3 insertions(+), 5 deletions(-) commit ac4ca7e2edef0973620ff55fd57282cc45662c7f Author: Federico Mena Quintero Date: Fri Nov 11 13:23:47 2016 -0600 Radial gradients: fix the focus point so it lies within the gradient's circle An SVG radial gradient is from a focus point (fx, fy) towards a circle (cx, cy, r). The focus point is assumed to be inside the circle. If the focus point is specified to be outside the circle, we need to find the closest point to it in the circumference, i.e. the point in the circumference that intersects the line that passes through (cx, cy) and (fx, fy). This computation makes us pass the reference test - regenerated the corresponding image. rsvg-cairo-draw.c | 80 +++++++++++++++++++-- .../reftests/svg1.1/pservers-grad-13-b-ref.png | Bin 98222 -> 93578 bytes 2 files changed, 75 insertions(+), 5 deletions(-) commit 4006aff6cfc1648660be27fb38b8bbb20ea813eb Author: Federico Mena Quintero Date: Fri Nov 11 10:58:40 2016 -0600 RsvgGradientStop: store whether the stop's values are valid The spec mandates that values for stop offsets are only plain numbers or percentages. We used to handle this more or less implicitly by calling _rsvg_css_hand_normalize_length(), using the resulting value, and dropping the units. Now we actually ensure that we get plain numbers or percentages, and eliminate this one use of _rsvg_css_hand_normalize_length(). Now, RsvgGradientStop has an is_valid field that says whether the stop has valid units. At rendering time, we can decide what to do about gradients with invalid stops: currently we don't add invalid stops to the gradient, but we still render it up to the last valid stop - hopefully to make it easier to debug SVG files. Also, we now ensure that stop offsets are actually in nondecreasing order, per the spec. (I really want to get rid of _rsvg_css_hand_normalize_length(), but found these things along the way...) rsvg-cairo-draw.c | 40 +++++++++++++++++++++++++++++++++++----- rsvg-paint-server.c | 24 +++++++++++++++++------- rsvg-paint-server.h | 1 + 3 files changed, 53 insertions(+), 12 deletions(-) commit 38927a65143819acd00efc10288267baf1a78a5b Author: Federico Mena Quintero Date: Fri Nov 11 10:40:48 2016 -0600 Add official test files for gradients. Some do not pass. Mysteriously, pservers-grad-19-b.svg is missing from the original tarball of tests. .../reftests/svg1.1/pservers-grad-09-b-ref.png | Bin 0 -> 6268 bytes .../reftests/svg1.1/pservers-grad-09-b.svg | 107 +++++++++++++ .../reftests/svg1.1/pservers-grad-10-b-ref.png | Bin 0 -> 9316 bytes .../reftests/svg1.1/pservers-grad-10-b.svg | 93 +++++++++++ .../reftests/svg1.1/pservers-grad-11-b-ref.png | Bin 0 -> 57420 bytes .../reftests/svg1.1/pservers-grad-11-b.svg | 124 +++++++++++++++ .../reftests/svg1.1/pservers-grad-12-b-ref.png | Bin 0 -> 23962 bytes .../reftests/svg1.1/pservers-grad-12-b.svg | 110 +++++++++++++ .../reftests/svg1.1/pservers-grad-13-b-ref.png | Bin 0 -> 98222 bytes .../reftests/svg1.1/pservers-grad-13-b.svg | 171 +++++++++++++++++++++ .../reftests/svg1.1/pservers-grad-14-b-ref.png | Bin 0 -> 24931 bytes .../reftests/svg1.1/pservers-grad-14-b.svg | 120 +++++++++++++++ .../reftests/svg1.1/pservers-grad-15-b-ref.png | Bin 0 -> 10232 bytes .../reftests/svg1.1/pservers-grad-15-b.svg | 70 +++++++++ .../reftests/svg1.1/pservers-grad-16-b-ref.png | Bin 0 -> 6618 bytes .../reftests/svg1.1/pservers-grad-16-b.svg | 81 ++++++++++ .../reftests/svg1.1/pservers-grad-17-b-ref.png | Bin 0 -> 9478 bytes .../reftests/svg1.1/pservers-grad-17-b.svg | 92 +++++++++++ .../reftests/svg1.1/pservers-grad-18-b-ref.png | Bin 0 -> 5654 bytes .../reftests/svg1.1/pservers-grad-18-b.svg | 114 ++++++++++++++ .../reftests/svg1.1/pservers-grad-20-b-ref.png | Bin 0 -> 9478 bytes .../reftests/svg1.1/pservers-grad-20-b.svg | 92 +++++++++++ .../reftests/svg1.1/pservers-grad-21-b-ref.png | Bin 0 -> 12246 bytes .../reftests/svg1.1/pservers-grad-21-b.svg | 146 ++++++++++++++++++ .../reftests/svg1.1/pservers-grad-22-b-ref.png | Bin 0 -> 7596 bytes .../reftests/svg1.1/pservers-grad-22-b.svg | 97 ++++++++++++ .../reftests/svg1.1/pservers-grad-23-f-ref.png | Bin 0 -> 6522 bytes .../reftests/svg1.1/pservers-grad-23-f.svg | 80 ++++++++++ .../reftests/svg1.1/pservers-grad-24-f-ref.png | Bin 0 -> 7711 bytes .../reftests/svg1.1/pservers-grad-24-f.svg | 68 ++++++++ 30 files changed, 1565 insertions(+) commit 88a1fb46bb6c4ba199d550d0a4656292ddc6a881 Author: Federico Mena Quintero Date: Fri Nov 11 10:29:52 2016 -0600 Rename test-display.c to rsvg-view.c After all it's the main file for the test program rsvg-view-3. Makefile.am | 2 +- test-display.c => rsvg-view.c | 0 2 files changed, 1 insertion(+), 1 deletion(-) commit 1088bea7224077dff3b7c943cede57575b161362 Author: Federico Mena Quintero Date: Fri Nov 11 09:58:39 2016 -0600 rsvg-styles: Use g_message() instead of g_warning() for errors from libcroco Our test suite considers a test to fail if it calls g_warning(). Our code that uses libcroco would call g_warning() on invalid or unsupported CSS in