Closed Bug 325614 Opened 20 years ago Closed 20 years ago

markers with visibility:hidden not shown

Categories

(Core :: SVG, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: tdys, Unassigned)

Details

Attachments

(3 files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060124 Firefox/1.5.0.1 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060124 Firefox/1.5.0.1 cannot refer to markers that are defined in a different svg node within the same document. The two svg elements were siblings not parent/child. Reproducible: Always
Could you provide a simple testcase demonstrating this as an attachment to this bug please?
Attached file demonstrates problem
the marker that I am trying to use is wrapped in a hidden span. If you remove the "visibility:hidden" style the problem goes away. I'm not sure if this is a bug, but "symbols" and gradients don't have this problem.
problem seems to be if you use def from a svg wrapped in a span with display:hidden. This behavior is different than "symbols" and "gradients"
Attached file correct attachment
Sorry the previous attachement was the wrong file
There does seem to be an issue but its about the visibility of defs elements, rather than anything to do with different SVG elements as this attachment shows. http://www.w3.org/TR/SVG/struct.html#DefsElement says: Note, however, that the descendants of a 'defs' are always present in the source tree and thus can always be referenced by other elements; thus, the value of the 'display' property on the 'defs' element or any of its descendants does not prevent those elements from being referenced by other elements. The defs element inherits the visibility of the span element in your example.
(In reply to comment #5) > Created an attachment (id=211034) [edit] > shows visibility hidden on defs issue > > There does seem to be an issue but its about the visibility of defs elements, > rather than anything to do with different SVG elements as this attachment > shows. > > http://www.w3.org/TR/SVG/struct.html#DefsElement says: > > Note, however, that the descendants of a 'defs' are always present in the > source tree and thus can always be referenced by other elements; thus, the > value of the 'display' property on the 'defs' element or any of its descendants > does not prevent those elements from being referenced by other elements. > > The defs element inherits the visibility of the span element in your example. > Referencing a "symbol" does not have this problem, neither do gradients. One of them must be wrong.
I think our behavior in not showing the markers is correct, as visibility is an inherited property that cascades down to the contents of the marker. The visibility property applies to graphics elements and thus shouldn't affect gradients, so our behavior is correct. It's entirely possible the case for symbol/use might not be right; we don't currently implement the SVG rules for property inheritence over <use>. (Side note: our current behavior with display:none has bugs, but not directly related to the reported bug with visiblity.)
Summary: Cannot refer to markers with a different svg parent within the same document → markers with visibility:hidden not shown
(In reply to comment #7) I'm not sure what the specs say, but it doesn't seem correct that a definition would inherit visibility from the defining container. It would seem to me that it should inherit from the container that is applying it. The way it is currently implemented an svg element's visibility could be changed by any node higher up in tree even if they are on seperate branches. This will result in a lot of very difficult to identify problems.
Unfortunately, what you think seems correct doesn't affect what the spec says. (I'm not saying that the SVG spec makes sense, but that isn't the issue here.)
Following CSS and XSL, property specification is tree-based as is propoert inheritance. use has a special rule for property inheritsnce, which as tor mentions is not yet impleented in Mozilla. The use case for richer inheritance possibilities (inherit visibility from the point of application; inherit stroke color or fill color for markers, control whether markers are ebove or below the stroke, etc) is understood, and addressed in SVG 1.2 with the vector-effects functionality.
Marking as invalid if what I've read is correct.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: