Open Bug 1729641 Opened 5 years ago Updated 1 year ago

fission breaks github rich diff preview

Categories

(Core :: DOM: Navigation, defect, P2)

Firefox 94
defect

Tracking

()

Fission Milestone Future
Tracking Status
firefox93 --- ?
firefox94 --- affected

People

(Reporter: lilydjwg, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0

Steps to reproduce:

Actual results:

After loading completes, it displays a zero-height div (like a <hr>) in the content area.

Expected results:

The image should be displayed there with positive height.

I can't find a regression range. Probably a github change triggers this bug.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Navigation' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: Navigation
Product: Firefox → Core
Blocks: fission
Fission Milestone: --- → ?

(Just to clarify in case anyone else is unsure: the "Display the rich diff" button is the paper with fold icon beside the <>.)

Assigning to Kashav because he said he will investigate.

Tracking for Fission MVP.

Assignee: nobody → kmadan
Severity: -- → S3
Status: UNCONFIRMED → ASSIGNED
Fission Milestone: ? → MVP
Ever confirmed: true
Priority: -- → P2

Seems to be a layout issue. The iframe seems to think the image is 0x0.

(see discussion in #fission on Matrix)

Flags: needinfo?(emilio)

So I looked into this, but in the meantime GitHub broke it also on Chrome, and on non-Fission.

Test-case was: https://github.com/mozilla/gecko-dev/blob/d36cf98aa85f24ceefd07521b3d16b9edd2abcb7/testing/talos/talos/tests/svg_static/composite-scale.svg

There are various things going wrong in their code, but basically the main difference between fission and non-fission is that with fission we create a layout tree for the display: none iframe.

They called image.width and image.height in an image inside a display: none iframe. On Fission, that goes through here (and the image is laid out in a 0x0 iframe so we ended up returning that). On non-fission it used to go through the codepath below, which effectively returned naturalWidth.

But as I was writing and debugging my patch they changed the code so that it creates a 1x1 iframe rather than 0x0, and as a result they broke it in all browsers. shrug

I suspect they generally want to look at naturalWidth and naturalHeight instead... Will contact them. Will post the patch for reference since it's written and we might want to land it still as it might save some work... But we'll see.

Flags: needinfo?(emilio)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #6)

I suspect they generally want to look at naturalWidth and naturalHeight instead... Will contact them.

They made the change! This works with Fission now.

Keeping this open in case we want to land the patch anyways. Moving to Fission:Future.

Assignee: kmadan → nobody
Status: ASSIGNED → NEW
Fission Milestone: MVP → Future
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: