commit ec1fda53b71bcb1ba94414febd0e5e377d95bbe2 Author: Federico Mena Quintero Date: Fri Sep 1 14:25:14 2017 -0500 Oops, distribute the svg1.1/resources for the tests as well. tests/Makefile.am | 53 +++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) commit 5f67aee2aaaac2db8ddcdd0e7d997691f8120dc9 Author: Federico Mena Quintero Date: Fri Sep 1 13:38:51 2017 -0500 Update NEWS NEWS | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit d54556007d35611e03fb9e8c8d98093fec5bb460 Author: Federico Mena Quintero Date: Fri Sep 1 13:16:15 2017 -0500 Don't pass --verbose to cargo build Quiet the build a little... Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0216b4d9cf5c36f8e67dbcc0c9ec9b19d45b7f91 Author: Federico Mena Quintero Date: Fri Sep 1 13:14:53 2017 -0500 Makefile.am: Add "cargo vendor" to dist-hook Thanks to https://github.com/endlessm/ostree/blob/47a54bf876023b0cb457bc8a4f4264f9b2ed5438/Makefile.am for the incantations. This makes it possible to release tarballs with all the Rust dependencies embedded in them. Hopefully this paves the way for distros to use Cargo's source replacement to build librsvg with their own versions of dependencies. Makefile.am | 9 ++++++++- rust/cargo-vendor-config | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) commit d6683eb7ebb6fe4f3efd7c82e706caf9970ed756 Author: Federico Mena Quintero Date: Fri Sep 1 11:30:38 2017 -0500 pattern.rs: shorten the way we map option values Thanks to Sergey Bugaev for the tip. rust/src/pattern.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bdc1d2c6975c7882351b3fe0401fee1448444767 Author: Federico Mena Quintero Date: Fri Sep 1 09:39:30 2017 -0500 RsvgCairoClipRender: Implement the ::render_pango_layout() method, so we can clip text With this, the test masking-path-04-b.svg passes. rsvg-cairo-clip.c | 28 +++++++- .../reftests/svg1.1/masking-path-04-b-ref.png | Bin 88260 -> 92911 bytes .../fixtures/reftests/svg1.1/masking-path-04-b.svg | 79 +++++++++++++++++++++ .../reftests/svg1.1/resources/bluesquidj.png | Bin 0 -> 37497 bytes 4 files changed, 106 insertions(+), 1 deletion(-) commit 589e2dcf53bd05213bb17ed48e24d3f166e4fc92 Author: Federico Mena Quintero Date: Fri Sep 1 08:45:31 2017 -0500 bgo#621088: rsvg_cairo_clip_render_new(): Don't leave uninitialized fields in the parent RsvgCairoRender A text object used as a clip path caused librsvg to crash. The reason is that when we create an RsvgCairoClipRender, we were leaving an all-zeros clip_render->super.bbox field. This caused two things: 1. An all-zeros RsvgBbox is invalid; it should be "virgin" or actually have a valid affine. 2. We were not preserving the bbox from the parent rendering context, so the clipped objects would not know their viewport size. Now we copy the original cairo_render->bbox to our derived clip_render->super.bbox, and start afresh with an empty bb_stack inside the clip_render. rsvg-cairo-clip.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit dde39fccd1804b09ba1d4bfbc784fea8f72e13f6 Author: Federico Mena Quintero Date: Fri Sep 1 08:09:35 2017 -0500 Remove unused prototype rsvg-cairo-render.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2f858993d9acf6e57be016b8688e02d0aecb0c25 Author: Federico Mena Quintero Date: Fri Sep 1 07:54:33 2017 -0500 Add a bunch of masking/clipping tests from the SVG test suite .../reftests/svg1.1/masking-intro-01-f-ref.png | Bin 0 -> 14528 bytes .../reftests/svg1.1/masking-intro-01-f.svg | 81 +++++++++++++ .../reftests/svg1.1/masking-mask-01-b-ref.png | Bin 0 -> 17887 bytes .../fixtures/reftests/svg1.1/masking-mask-01-b.svg | 131 ++++++++++++++++++++ .../reftests/svg1.1/masking-mask-02-f-ref.png | Bin 0 -> 4512 bytes .../fixtures/reftests/svg1.1/masking-mask-02-f.svg | 50 ++++++++ .../reftests/svg1.1/masking-opacity-01-b-ref.png | Bin 0 -> 30924 bytes .../reftests/svg1.1/masking-opacity-01-b.svg | 125 +++++++++++++++++++ .../reftests/svg1.1/masking-path-01-b-ref.png | Bin 0 -> 12226 bytes .../fixtures/reftests/svg1.1/masking-path-01-b.svg | 95 +++++++++++++++ .../reftests/svg1.1/masking-path-02-b-ref.png | Bin 0 -> 13294 bytes .../fixtures/reftests/svg1.1/masking-path-02-b.svg | 84 +++++++++++++ .../reftests/svg1.1/masking-path-03-b-ref.png | Bin 0 -> 23263 bytes .../fixtures/reftests/svg1.1/masking-path-03-b.svg | 134 +++++++++++++++++++++ .../reftests/svg1.1/masking-path-04-b-ref.png | Bin 0 -> 88260 bytes 15 files changed, 700 insertions(+) commit 8b98d9929e071b7f66bf2a3c7b87c60803b50048 Author: Federico Mena Quintero Date: Fri Sep 1 07:12:13 2017 -0500 rsvg-cairo-draw: Comment on how we should be computing bounding boxes for viewports/clipping rsvg-cairo-draw.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit fd6f94b99932d64daca0b6959e73d0ff2d80dfae Author: Federico Mena Quintero Date: Thu Aug 31 21:21:01 2017 -0500 marker: Pop the things in the same order as NodeSvg and NodeUse, to make this easier to refactor rust/src/marker.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 5405a2fb96ea7a39cd17d78499279f11c1dfbd9d Author: Federico Mena Quintero Date: Thu Aug 31 21:04:38 2017 -0500 marker.rs: Unconditionally push a viewbox, to make this easier to refactor rust/src/marker.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d2549f2fc2782c970c121305df041201590165dc Author: Federico Mena Quintero Date: Thu Aug 31 20:48:26 2017 -0500 Add coords-viewattr-03-b.svg to the test suite .../reftests/svg1.1/coords-viewattr-03-b-ref.png | Bin 0 -> 24302 bytes .../reftests/svg1.1/coords-viewattr-03-b.svg | 94 +++++++++++++++++++++ 2 files changed, 94 insertions(+) commit 5cc00b78918bfb8dcd4b62f440d80a2148ee17d4 Author: Federico Mena Quintero Date: Thu Aug 31 20:39:48 2017 -0500 NodeUse: Unconditionally push a viewbox, to make this easier to refactor rust/src/structure.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 060c3ef390519ccd708255fd65bf8adc09644175 Author: Federico Mena Quintero Date: Thu Aug 31 20:29:07 2017 -0500 Add struct-use-09-b.svg and coords-viewattr-02-b.svg to the test suite The "use" one is for nested use/symbol. The "viewattr" one is for preserveAspectRatio on image elements. .../reftests/svg1.1/coords-viewattr-02-b-ref.png | Bin 0 -> 37569 bytes .../reftests/svg1.1/coords-viewattr-02-b.svg | 716 +++++++++++++++++++++ .../reftests/svg1.1/struct-use-09-b-ref.png | Bin 0 -> 6556 bytes tests/fixtures/reftests/svg1.1/struct-use-09-b.svg | 74 +++ 4 files changed, 790 insertions(+) commit 5afb3a858f63e7dedf6ef7b73726acb3d2072175 Author: Federico Mena Quintero Date: Thu Aug 31 20:03:22 2017 -0500 ViewBox: Represent unspecified view boxes as Option We still have RsvgViewBox with an "active" boolean field for the C code. The Rust code now handles Option throughout, and only exposes that to C with rsvg_node_svg_get_view_box(). rust/src/marker.rs | 28 ++++++++-------- rust/src/pattern.rs | 26 ++++++++------- rust/src/structure.rs | 46 ++++++++++++-------------- rust/src/viewbox.rs | 89 +++++++++++++++++++++++---------------------------- 4 files changed, 89 insertions(+), 100 deletions(-) commit 60b1a31da424a1700c4d3dc6ca7d3f515bc1f420 Author: Federico Mena Quintero Date: Thu Aug 31 18:44:19 2017 -0500 NodeUse: normalize to default values as early as possible rust/src/structure.rs | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) commit 6dab70a53f480a61ca04c3b93d83b8b23a464842 Author: Federico Mena Quintero Date: Thu Aug 31 13:46:29 2017 -0500 Remove unnecessary includes rsvg-base-file-util.c | 3 +-- rsvg-base.c | 3 +-- rsvg-cairo-render.c | 2 +- rsvg-cond.c | 1 - rsvg-file-util.c | 1 - rsvg-filter.h | 3 +-- rsvg-gobject.c | 1 - rsvg-styles.c | 1 - rsvg.c | 1 - 9 files changed, 4 insertions(+), 12 deletions(-) commit b97e590442e3178298cee47dd5239cb71a709720 Author: Federico Mena Quintero Date: Wed Aug 30 10:01:58 2017 -0500 Regenerate test reference files now that text rendering is fixed .../reftests/svg1.1/coords-trans-02-t-ref.png | Bin 8349 -> 8286 bytes .../reftests/svg1.1/coords-trans-03-t-ref.png | Bin 7902 -> 7889 bytes .../reftests/svg1.1/coords-trans-04-t-ref.png | Bin 6655 -> 6654 bytes .../reftests/svg1.1/coords-trans-05-t-ref.png | Bin 8140 -> 8105 bytes .../reftests/svg1.1/coords-trans-06-t-ref.png | Bin 8526 -> 8493 bytes .../reftests/svg1.1/filters-composite-02-b-ref.png | Bin 16647 -> 16613 bytes .../reftests/svg1.1/paths-data-04-t-ref.png | Bin 18160 -> 18138 bytes .../reftests/svg1.1/paths-data-05-t-ref.png | Bin 16048 -> 16037 bytes .../reftests/svg1.1/paths-data-06-t-ref.png | Bin 7255 -> 7242 bytes .../reftests/svg1.1/paths-data-07-t-ref.png | Bin 6646 -> 6628 bytes .../reftests/svg1.1/paths-data-08-t-ref.png | Bin 19314 -> 19317 bytes .../reftests/svg1.1/pservers-grad-08-b-ref.png | Bin 38874 -> 38874 bytes 12 files changed, 0 insertions(+), 0 deletions(-) commit c70000117fb6e7dabdb77c1c8cc1067add7da6d9 Author: Massimo Date: Wed Aug 30 09:55:48 2017 -0500 bgo#587721: Update the PangoLayout for the new matrix before rendering If the cairo_t's transformation changes between the time the PangoLayout is created and the time it is shown, one needs to pango_cairo_update_layout() first. rsvg-cairo-draw.c | 4 ++++ .../reftests/bugs/587721-text-transform-ref.png | Bin 0 -> 3910 bytes .../fixtures/reftests/bugs/587721-text-transform.svg | 13 +++++++++++++ .../reftests/bugs/777834-empty-text-children-ref.png | Bin 9653 -> 9386 bytes 4 files changed, 17 insertions(+) commit 6c3bccd588571c102003fcc2dca67a01623f04e6 Author: Federico Mena Quintero Date: Tue Aug 29 15:15:01 2017 -0500 Oops, sort the list of supported SVG features so works We use the list of supported features with bsearch(), and the list was not sorted. Added struct-cond-03-t.svg from the SVG test suite to this effect. The reference PNG is different from the official test suite's original one, because we do NOT support the SVG DOM feature. Still, the test file lets us test for working based on supported feature names. rsvg-cond.c | 7 +- .../reftests/svg1.1/struct-cond-03-t-ref.png | Bin 0 -> 4433 bytes .../fixtures/reftests/svg1.1/struct-cond-03-t.svg | 83 +++++++++++++++++++++ 3 files changed, 87 insertions(+), 3 deletions(-) commit 86bb7e1e43312314ca53417b85df7f6667dfa78a Author: Federico Mena Quintero Date: Tue Aug 29 09:19:41 2017 -0500 bgo#785276: Don't crash on empty or single-byte files Sigh... We also modify tests/crash.c to test for this condition, and add a couple of new tests. rsvg-base.c | 11 ++++++++++- tests/crash.c | 12 ++++++++---- tests/fixtures/crash/785276-empty.svg | 0 tests/fixtures/crash/785276-short-file.svg | 1 + 4 files changed, 19 insertions(+), 5 deletions(-) commit 4b67fb5d7690419d1b2f97c380f6245b81d4604a Author: Federico Mena Quintero Date: Tue Aug 29 08:50:22 2017 -0500 Add struct-cond-01-t.svg from the SVG test suite This is a basic test for the element that uses an unsupported extension name in the requiredExtensions attribute. .../reftests/svg1.1/struct-cond-01-t-ref.png | Bin 0 -> 4498 bytes .../fixtures/reftests/svg1.1/struct-cond-01-t.svg | 61 +++++++++++++++++++++ 2 files changed, 61 insertions(+) commit d38cb2e3de1a5a23e14e9ea5d0f788cab3511088 Author: Federico Mena Quintero Date: Tue Aug 29 08:48:08 2017 -0500 bgo#634514: Don't render unknown elements and their sub-elements We were representing unknown elements as a NodeGroup, so their children would be rendered. Now we represent them as NodeDefs. This is like a NodeGroup, but it doesn't do any rendering of itself or its children. The SVG spec says that we should stop rendering the file if we encounter an unknown element, but it seems that real-world renderers are more lenient - so we'll just not render unknown elements and their children. https://bugzilla.gnome.org/show_bug.cgi?id=634514 rsvg-base.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 40a049cee1705e768d43d67d6dfc4bcda0be0098 Author: Federico Mena Quintero Date: Tue Aug 29 08:27:18 2017 -0500 PathBuilder: use LargeArc and Sweep types instead of plain booleans This makes it easier to see what the arguments PathBuilder::arc() are about. rust/src/path_builder.rs | 27 ++++++++++++++++++++------- rust/src/path_parser.rs | 11 +++++++++-- rust/src/shapes.rs | 8 ++++---- 3 files changed, 33 insertions(+), 13 deletions(-) commit 95355f7f0ab0cb1ad0313bbf7a93d0e403c5810e Author: Federico Mena Quintero Date: Tue Aug 22 20:50:50 2017 -0500 PathCommand: derive PartialEq so we can remove a custom comparison function rust/src/path_builder.rs | 3 ++- rust/src/path_parser.rs | 66 ++---------------------------------------------- 2 files changed, 4 insertions(+), 65 deletions(-) commit 177b7401265c1adfd6a973067ded31f17ffb3fe2 Author: Federico Mena Quintero Date: Tue Aug 22 20:33:08 2017 -0500 Switch from cairo::PathSegment to our own PathCommand throughout rust/src/marker.rs | 12 ++++++------ rust/src/path_builder.rs | 28 ++++++++++++++-------------- rust/src/path_parser.rs | 44 ++++++++++++++++++++++---------------------- 3 files changed, 42 insertions(+), 42 deletions(-) commit d7aff34d2fa7e5b6c059b049b9f50ed858949ebc Author: Federico Mena Quintero Date: Thu Mar 2 12:15:52 2017 -0600 path_builder.rs: Declare a PathCommand enum We will move PathBuilder from storing cairo::PathSegment directly, to storing its own PathCommand. This will be an enum similar to Cairo's, but that can also store SVG's Arc command, and possibly SVG's quadratic Béziers, too. Currently, when adding markers to a path, we have unwanted markers in the middle of arcs, as they get exploded into Bézier curve segments. By having our own Arc PathCommand, we can defer the arc-to-Béziers step until we finally feed the PathBuilder into Cairo. This should also make it possible to have tests for parsing Arc commands; currently there are none. rust/src/path_builder.rs | 7 +++++++ 1 file changed, 7 insertions(+) commit 29dce41359437df138bda8ddb1971dbfbe8b4187 Author: Federico Mena Quintero Date: Tue Aug 22 20:41:03 2017 -0500 Require lalrpop 0.13.1 - now we can build on Rust nightly as well rust/Cargo.lock | 189 +++++++++++++++++++++----------------------------------- rust/Cargo.toml | 4 +- 2 files changed, 73 insertions(+), 120 deletions(-) commit 1ef560fef2c41686fa7ff165c038b12978327102 Author: Federico Mena Quintero Date: Mon Aug 21 14:30:41 2017 -0500 Update to the released cairo-rs 0.2.0 Yay! rust/Cargo.lock | 50 +++++++++++++++++++++++++------------------------- rust/Cargo.toml | 20 ++++++++++++-------- 2 files changed, 37 insertions(+), 33 deletions(-) commit caf234cf0453cc9a1b1ad9144562c2f0f309c79f Author: Federico Mena Quintero Date: Thu Aug 17 15:23:16 2017 -0500 bgo#786372 - In the style element, the type attribute should default to "text/css" Per https://www.w3.org/TR/SVG/styling.html#StyleElementTypeAttribute , if a