Open Bug 1126823 Opened 5 years ago Updated 5 years ago

Many of MDN's embedded SVG examples broken in Firefox

Categories

(Developer Documentation :: SVG, defect)

All
Other
defect
Not set

Tracking

(Not tracked)

People

(Reporter: callahad, Unassigned)

Details

(Whiteboard: [specification][type:bug])

Attachments

(1 file)

What did you do?
================
Visit https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient in Chrome and Firefox.

What happened?
==============
I see a nice gradient in the "Output Results" column in Chrome, and nothing in Firefox. Inspecting the empty cell in Firefox reveals an iframe to https://mdn.mozillademos.org/files/3265/linearGradient.svg, but when I view frame info, it's pointing to about:blank. The Network panel and console never show an attempt to load the SVG.

What should have happened?
==========================
The SVG should appear in the output results panel. This affects almost all of the SVG pages on MDN (line, tspan, etc.)

Is there anything else we should know?
======================================
If I edit the src of the iframe in the inspector to "http://mdn.mozillademos.org/files/3265/linearGradient.svg", I see the expected "Blocked loading mixed active content "http://mdn.mozillademos.org/files/3265/linearGradient.svg""

If I then change it back to HTTPS, I get: "Load denied by X-Frame-Options: https://mdn.mozillademos.org/files/3265/linearGradient.svg does not permit framing by https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient."

The X-FRAME-OPTIONS response header I'm seeing is: "ALLOW-FROM: developer.mozilla.org".
Looks like some pages work (https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Patterns)
Summary: All embedded SVG examples broken in Firefox → Many of MDN's embedded SVG examples broken in Firefox
Broken pages are those which embed an attachment as an iframe.
https://developer.mozilla.org/en-US/search?locale=*&kumascript_macros=EmbedSVG (52)

These should probably use the livesample system.
https://developer.mozilla.org/en-US/docs/MDN/Contribute/Editor/Live_samples

I updated https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient to show how that would look like.


See https://developer.mozilla.org/fr/docs/Web/SVG/Element/animateTransform for another test case, that has not been updated yet and still uses the EmbedSVG macro.
EmbedSVG macro is a legacy macro from post Kuma migration, it needs to be cleaned up everywhere. We shouldn't use it anymore.
Component: General → SVG
Product: Mozilla Developer Network → Developer Documentation
You need to log in before you can comment on or make changes to this bug.