style on defs not inherited, pattern not workin outside defs

Bug #167834 reported by Bug Importer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
High
David Turner
Revision history for this message
Daniel Pope (djpope) wrote :

> http://vdxtosvg.sourceforge.net/examples/text_tests.svg

These graphics appear to require Javascript scripting, which
Inkscape does not support. Scripting is not required for a
conforming static SVG viewer.

The same script is used in all the images. Note that the
scripting doesn't even work in Firefox; it appears to refer
to some variable evt which is in scope in the onload=""
event handlers, something which I don't think is in the specs.

The animation test requires SMIL animation, which again,
Inkscape doesn't support.

I think the other problems do constitute bugs in Inkscape,
including:

- CSS styles applying to <defs> elements aren't inherited by
their children
- <pattern> elements are ignored if specified outside of a
<defs> section.

I think, looking at the spec, <defs> isn't given any special
status over, say, <g> and these examples really should work.

Revision history for this message
Bryce Harrington (bryce) wrote :

Dropping priority since these are just needed for 3rd party svg support

Changed in inkscape:
importance: Critical → High
status: New → Triaged
Bryce Harrington (bryce)
Changed in inkscape:
status: Triaged → Confirmed
su_v (suv-lp)
tags: added: css pattern
removed: win32
tags: added: styles
Revision history for this message
Martin Owens (doctormo) wrote :

> http://vdxtosvg.sourceforge.net/examples/basic_tests.svg

This actually causes the current trunk to freeze while opening from the open menu. (opening via inkscape basic_tests.svg works)

Warning given:

** (inkscape:15740): WARNING **: More than 32 iteration while updating document '/home/doctormo/Desktop/basic_tests.svg'

The traceback is as follows:

#0 0xb657e8c0 in g_slice_alloc () from /lib/i386-linux-gnu/libglib-2.0.so.0
#1 0xb657f70b in g_slist_prepend () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2 0x0814f92c in SPObject::childList (this=this@entry=0xbb09550, add_ref=add_ref@entry=true) at ../../src/sp-object.cpp:425
#3 0x0812e6d0 in CGroup::onModified (this=0xbb50570, flags=12) at ../../src/sp-item-group.cpp:668
#4 0x081512c3 in SPObject::emitModified (this=this@entry=0xbb09550, flags=flags@entry=12) at ../../src/sp-object.cpp:1326
#5 0x081749e6 in sp_use_modified (object=0xbb48048, flags=12) at ../../src/sp-use.cpp:639
#6 0x081512c3 in SPObject::emitModified (this=this@entry=0xbb48048, flags=flags@entry=12) at ../../src/sp-object.cpp:1326
#7 0x08158ca1 in sp_pattern_modified (object=0x98e43c0, flags=12) at ../../src/sp-pattern.cpp:319
#8 0x081512c3 in SPObject::emitModified (this=this@entry=0x98e43c0, flags=13, flags@entry=12) at ../../src/sp-object.cpp:1326
#9 0x0812e719 in CGroup::onModified (this=0xbb4f540, flags=12) at ../../src/sp-item-group.cpp:673
#10 0x081512c3 in SPObject::emitModified (this=this@entry=0xbb42838, flags=11, flags@entry=0) at ../../src/sp-object.cpp:1326
#11 0x0812e719 in CGroup::onModified (this=0xbb4f128, flags=0) at ../../src/sp-item-group.cpp:673
#12 0x081512c3 in SPObject::emitModified (this=this@entry=0x98ee2a0, flags=2, flags@entry=0) at ../../src/sp-object.cpp:1326
#13 0x0812e719 in CGroup::onModified (this=0xba66850, flags=0) at ../../src/sp-item-group.cpp:673
#14 0x0815f88c in sp_root_modified (object=0x98a1040, flags=2) at ../../src/sp-root.cpp:502
#15 0x081512c3 in SPObject::emitModified (this=0x98a1040, flags=2, flags@entry=0) at ../../src/sp-object.cpp:1326
#16 0x080a739b in SPDocument::_emitModified (this=this@entry=0x9187e40) at ../../src/document.cpp:824

Revision history for this message
David Turner (novalis) wrote :

Simplified version of basic_tests -- hits the bug a bit differently, but hits it

Revision history for this message
David Turner (novalis) wrote :

This is the converse case -- a pattern inherits from its parent

Revision history for this message
Martin Owens (doctormo) wrote :

David, you can assign yourself to the bug report, I've marked it as in progress while you're working on it.

Changed in inkscape:
status: Confirmed → In Progress
David Turner (novalis)
Changed in inkscape:
assignee: nobody → David Turner (novalis)
Revision history for this message
David Turner (novalis) wrote :

I've created a patch that goes through and removes recursive patterns and such from the document.

Revision history for this message
David Turner (novalis) wrote :

Is this roughly what people are looking for? Do I need to do something special to have someone review this?

Revision history for this message
jazzynico (jazzynico) wrote :

Patch tested successfully on Windows XP, Inkscape trunk revision 12845, with the files attached comments #4 and #5.
More regression tested needed.

Revision history for this message
David Mathog (mathog) wrote :

0.48.4 and trunk r13422 on XP, patch from post 7 not applied. Nothing is visible for examples from posts 4 and 5.
These are not visible in Seamonkey either, but basic_tests.svg from 4 is visible in Opera, while pattern-inherits-child.svg is not visible in Opera either.

Revision history for this message
jazzynico (jazzynico) wrote :

> Nothing is visible for examples from posts 4 and 5.

Confirmed. The files are now completely invisible in Inkscape, patch applied or not. None of them shows in Iceweasel, Opera and Chromium.
And I don't remember what I tested last year, and how I tested it...

Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

Testing in 1.1-dev (6b4d57f, 2020-04-01), Windows 10:

* Pattern outside defs are working fine.
* The file test_basic creates a hang in the Fill & stroke dialog (https://gitlab.com/inkscape/inbox/-/issues/2215). That's due to the circular reference. The file pattern-inherits-child interestingly does not.
* Nothing is visible in the test files. I haven't found another renderer which renders the files, so I guess that's okay.
* The file seq_test doesn't load due to the large number of style tags. https://gitlab.com/inkscape/inbox/-/issues/2216

Closing as part of Inkscape's bug migration. If I have missed anything, feel free to reopen on Gitlab.

Closed by: https://gitlab.com/jhofinger

Changed in inkscape:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.