Closed Bug 1778298 Opened 2 years ago Closed 2 years ago

SVGs not working properly, specifically xlink:href, when setting <base /> html tag

Categories

(Core :: SVG, defect)

Firefox 104
defect

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: caj, Assigned: longsonr)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.66 Safari/537.36 Edg/103.0.1264.44

Steps to reproduce:

Use an SVG with linearGradients linking with xlink:href. If the index.html has set the <base / > html tag, it will not work, only in Firefox. All other browsers work.

<linearGradient id="b" data-name="nice grad 7" x1="-1372.65" y1="1548.68" x2="4432.08" y2="1548.68" gradientTransform="matrix(-0.15, 0.29, -0.3, -0.29, 2219.44, 1557.59)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#fff"/>
<stop offset="0.47" stop-color="#a578b5"/>
<stop offset="0.54" stop-color="#9e76b0"/>
<stop offset="0.65" stop-color="#8c71a3"/>
<stop offset="0.78" stop-color="#6d698c"/>
<stop offset="0.92" stop-color="#435d6e"/>
<stop offset="1" stop-color="#275559"/>
</linearGradient>
<linearGradient id="c" x1="-1372.65" y1="1548.68" x2="4432.08" y2="1548.68" gradientTransform="matrix(0.18, -0.27, 0.28, 0.32, 808.66, 1467.72)" xlink:href="#b"/>

Actual results:

The linked gradients won't be rendered

Expected results:

They should have been rendered

Component: Untriaged → SVG
Product: Firefox → Core
Assignee: nobody → longsonr
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/fad2ed37e56b
gradient href should ignore base tag if local r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: