Closed Bug 1682759 Opened 5 years ago Closed 2 months ago

New wpt failures in /css/css-images/image-orientation/image-orientation-exif-png.html (Firefox doesn't support EXIF orientation data from PNG images)

Categories

(Core :: Graphics: ImageLib, defect)

defect

Tracking

()

RESOLVED FIXED
141 Branch
Tracking Status
firefox141 --- fixed

People

(Reporter: wpt-sync, Assigned: tnikkel)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Whiteboard: [wpt])

Attachments

(5 files)

Syncing wpt PR 26915 found new untriaged test failures in CI

Tests Affected

New Tests That Don't Pass

/css/css-images/image-orientation/image-orientation-exif-png.html: FAIL (Chrome: FAIL, Safari: PASS)

CI Results

Gecko CI (Treeherder)
GitHub PR Head

Notes

These updates will be on mozilla-central once bug 1682720 lands.

Note: this bug is for tracking fixing the issues and is not
owned by the wpt sync bot.

This bug is linked to the relevant tests by an annotation in
https://github.com/web-platform-tests/wpt-metadata. These annotations
can be edited using the wpt interop dashboard
https://jgraham.github.io/wptdash/

If this bug is split into multiple bugs, please also update the
annotations, otherwise we are unable to track which wpt issues are
already triaged. Resolving as duplicate or closing this issue should
be cause the bot to automatically update or remove the annotation.

Severity: -- → S4

This probably more-directly belongs in ImageLib, given that per https://github.com/w3c/PNG-spec/issues/310#issuecomment-1883520532 it seems the issue is just the fact that we ignore (don't parse?) EXIF information from PNG images.

If we had that information parsed/available in imagelib, presumably we would honor it in layout, just like we do for JPEG images.

Component: Layout: Images, Video, and HTML Frames → Graphics: ImageLib
Summary: New wpt failures in /css/css-images/image-orientation/image-orientation-exif-png.html → New wpt failures in /css/css-images/image-orientation/image-orientation-exif-png.html (Firefox doesn't support EXIF orientation data from PNG images)
Depends on: 1627423

Refactor the format conversion code to a function so we can re-use it.

To update the giant if in CreateReorientSurfacePipe I just copied the one from CreateSurfacePipe and then removed cases that were not possible so it should be correct.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED

Exif data in jpegs includes the leading "Exif\0\0", but exif data in pngs does not include it.

The conversion from unoriented to oriented (ie exif rotations/flips) happens at the last step in the surface pipe. mFrameRect is mostly used for things that are before this last step. There are a few uses where mFrameRect needs to be in oriented space so we just convert at those places.

Since the reorienting surface pipe doesn't support some features we need to prioritize. If the png has animation then we ignore exif data. We disable progressive display and interlacing if the png has exif data and the effect is not the identity (we don't take advantage of the improved experience while the image is loading, but it still works fine when fully loaded).

QA Whiteboard: [qa-triage-done-c142/b141]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: