Closed Bug 769939 Opened 12 years ago Closed 4 months ago

Externally referenced SVG Patterns can't reference local Symbols

Categories

(Core :: SVG, defect)

13 Branch
x86
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 866655

People

(Reporter: mel, Unassigned)

Details

Attachments

(2 files, 1 obsolete file)

Attached image bar.svg
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1
Build ID: 20120615040410

Steps to reproduce:

Firefox 13.0.1; Linux (Ubuntu 10.04)

Two files: foo.svg references a pattern contained within bar.svg
The pattern in bar.svg references a symbol (red and blue vertical stripes), also in bar.svg

I have attached the bar.svg I used to test. My test foo.svg contains just the <rect> which appers at the end of bar.svg, but having fill="bar.svg#pattern".


Actual results:

* The pattern, when rendered inside bar.svg, includes the <symbol> from bar.svg
* The pattern, when rendered inside foo.svg, does not include the <symbol> from bar.svg



Expected results:

In both SVG files, the rendered pattern should include the <symbol>
Component: Untriaged → SVG
Product: Firefox → Core
QA Contact: untriaged → general
Attached image Attmpt at foo.svg (obsolete) —
Attached image Attempt at foo.svg
Attachment #639915 - Attachment is obsolete: true
Severity: normal → S3

bar.svg has no height and width for the use element or the symbol element, their size therefore defaults to 100%. Because of bug 866655 we resolve that 100% by looking at the width of the root SVG element, but that isn't set either so that defaults to 100% too.

When you view bar.svg directly the 100% height/width of the root SVG element is resolved as the viewport height/width. When you view it indirectly (as a resource document) then there's nothing to resolve the height/width against so the width/height resolves to 0 and therefore the width/height of the symbol and use resolve to 0 and since we clip them, we clip to an empty rect.

If you replace the use/symbol with an svg element you get the same result.

Status: UNCONFIRMED → RESOLVED
Closed: 4 months ago
Duplicate of bug: 866655
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: