Closed Bug 1594986 Opened 6 years ago Closed 3 years ago

Intrinsic sizing of SVG embedded via <object>/<embed> doesn't disappear on navigation

Categories

(Core :: SVG, defect, P3)

defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: bzbarsky, Assigned: farre)

References

Details

(Whiteboard: [layout:backlog],[orb:m2], [wptsync upstream])

Attachments

(1 file)

If I do the following:

  1. Create a page that loads an SVG via <object>.
  2. Navigate the window the SVG is in (via frames[0].location.href) to an HTML page

the size the <object> determined from the SVG does not change when the navigation to the HTML happens (unlike the other direction: going from HTML to SVG resizes the <object>). This is not spec-compliant, and can be an information leak (from the SVG to the following HTML, which might not be same-origin).

Blocks: 1595491
Priority: -- → P2
Priority: P2 → P3
Whiteboard: [layout:backlog]

How surprising. Could we do something like just reframe the whole <object>/<embed> ?

Flags: needinfo?(emilio)

There should be no need to reframe, just clearing these two on navigation should work: https://searchfox.org/mozilla-central/rev/ace2c59e6c56b2dcba25af1aa8903a5e7f9a5857/dom/base/nsObjectLoadingContent.h#580-588

If the object element knows when it's been navigated then it's trivial to do, otherwise we need to clear it up from the child presumably.

Flags: needinfo?(emilio)
Whiteboard: [layout:backlog] → [layout:backlog],[orb:m2]
Severity: normal → S3
Assignee: nobody → afarre
Status: NEW → ASSIGNED
Attachment #9305245 - Attachment description: Bug 1594986 - Reset subdocument intrinsic size in `LoadObject`. r=emilio! → Bug 1594986 - Reset subdocument intrinsic size in `UnloadObject`. r=emilio!
Pushed by afarre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/00f3ae2cc1a3 Reset subdocument intrinsic size in `UnloadObject`. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/37166 for changes under testing/web-platform/tests
Whiteboard: [layout:backlog],[orb:m2] → [layout:backlog],[orb:m2], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: