fission breaks github rich diff preview
Categories
(Core :: DOM: Navigation, defect, P2)
Tracking
()
| Fission Milestone | Future |
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:
- set fission.autostart to true
- visit https://github.com/komeiji-satori/Dress/pull/1107/files?short_path=4952f1e#diff-4952f1e61c3d64398de58c0a12baf2d1a454fc3ebeb68124b79166940785ee67
- click the button "Display the rich diff"
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.
Comment 1•5 years ago
|
||
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.
(Just to clarify in case anyone else is unsure: the "Display the rich diff" button is the paper with fold icon beside the <>.)
Appears to apply to the regular file viewer as well: https://github.com/mozilla/gecko-dev/blob/d36cf98aa85f24ceefd07521b3d16b9edd2abcb7/testing/talos/talos/tests/svg_static/composite-scale.svg
Comment 4•5 years ago
|
||
Assigning to Kashav because he said he will investigate.
Tracking for Fission MVP.
Seems to be a layout issue. The iframe seems to think the image is 0x0.
(see discussion in #fission on Matrix)
Comment 6•5 years ago
|
||
So I looked into this, but in the meantime GitHub broke it also on Chrome, and on non-Fission.
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.
Comment 7•5 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #6)
I suspect they generally want to look at
naturalWidthandnaturalHeightinstead... 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.
Description
•