visible child in hidden parent

Bug #166042 reported by Peter Moulder
2
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Low
Unassigned

Bug Description

In the following example:

<svg>
 <g style="visibility:hidden">
  <rect style="fill:red;visibility:visible" x="100"
y="100" width="50" height="50"/>
  <rect style="fill:yellow" x="200" y="100" width="50"
height="50"/>
 </g>
</svg>

we believe the "correct" rendering[*1] is to draw the
red rectangle but not the yellow one, whereas various
versions of inkscape draw either both or neither
(before/after mental's sp-item.cpp and style.cpp
changes committed 2004-10-16 07:21:01 UTC).

[One complication in evaluating inkscape's behaviour
with that one-line test case I gave on jabber is that
until Sunday, Inkscape wasn't reading visibility
attributes, it only consulted visibility in style strings.]

[*1] This is what batik and adobe's viewer do (Bulia
you may wish to confirm that this is still the case
with this revised example), and is in line with one
sentence in
http://www.w3.org/TR/SVG11/painting.html#VisibilityControl
("Setting 'visibility' to hidden on a 'g' will make its
children invisible as long as the children do not
specify their own 'visibility' properties as
visible."), though elsewhere there is some confusion as
to whether or not visibility is an inherited property.
 The very next sentence claims that it is not, but the
table below it claims that it is. CSS2
(http://www.w3.org/TR/REC-CSS2/visufx.html#propdef-visibility)
has a different table for visibility (inherited: no,
but initial value: inherit). The SVG spec says that
the CSS2 definition is normative "Except for any
additional information provided in this specification",
which to me is unclear as to which is authoritative
where the two specs conflict.

Tags: css svg
Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Confirm that batik/adobe show red but not yellow. Inkscape
currently shows none.

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

This is less relevant now that we switched to display
property. CSS visibility property is not officially
supported still.

Revision history for this message
Bug Importer (bug-importer) wrote :

0.42.2+ shows both rectangles, again

Revision history for this message
Peter Lewerin (vermeil-deactivatedaccount) wrote :

0.45.1 shows both.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :

No improvement with 0.48 and trunk revision 10444.

tags: added: css
removed: all-platforms
Revision history for this message
su_v (suv-lp) wrote :

Related request:
* Bug #166181 (sf1096205) “Support for visibility property”
  https://bugs.launchpad.net/inkscape/+bug/166181

Revision history for this message
su_v (suv-lp) wrote :

Attaching test case to ease testing/comparing with current browsers.

Revision history for this message
su_v (suv-lp) wrote :

--
namespace declaration added.

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

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/issues/2177
Closed by: https://gitlab.com/jhofinger

Changed in inkscape:
status: Confirmed → 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.