Closed Bug 1822116 Opened 1 year ago Closed 1 year ago

Image is rotated differently in Chrome and Firefox

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

defect

Tracking

()

VERIFIED FIXED
114 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox111 --- wontfix
firefox112 --- wontfix
firefox113 --- wontfix
firefox114 --- verified
firefox115 --- verified

People

(Reporter: twisniewski, Assigned: dlrobertson)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(2 files)

Attached file testcase.html

In the attached test-case, the JPEG image has a particular combination of crossorigin=anonymous, transform:rotate(90deg), and image-orientation:none. Something about this combination seems to cause Chrome to rotate it -90 degrees again despite the transform, while Firefox does not do so.

Dropping the crossorigin attribute causes Chrome to not rotate the image -90 degrees again, but I'm not well versed in whether or how these attributes are supposed to interplay, so I thought a second opinion would be good here.

Summary: Image is rotated in Chrome, but not in Firefox → Image is rotated differently in Chrome and Firefox

The severity field is not set for this bug.
:emilio, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)
Keywords: regression
Regressed by: 1655598
Assignee: nobody → drobertson
Severity: -- → S3
Flags: needinfo?(emilio)

The fix for this should be easy. To match the behavior of blink and webkit we need to use imgIRequest::GetCORSMode to get the request's cors mode and add logic to this check to ensure we do not take that branch that ignores image-orientation: none in the case that imgIRequest::GetCORSMode returned CORS_ANONYMOUS.

That being said, it is unclear to me currently if this is the expected or correct behavior. Based on the discussion in w3c/csswg-drafts#5165, I'd think we'd want to ignore image-orientation: none regardless of crossorigin="anonymous".

Set release status flags based on info from the regressing bug 1655598

The image-orientation: none property should apply to images with
crossorigin="anonymous".

Set release status flags based on info from the regressing bug 1655598

Attachment #9327798 - Attachment description: Bug 1822116 - image-orientation: none should apply to cors anonymous images. r=emilio → Bug 1822116 - image-orientation: none should apply to CORS image requests. r=emilio
Pushed by drobertson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aa0c6e706e6f
image-orientation: none should apply to CORS image requests. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39513 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
Upstream PR merged by moz-wptsync-bot

The patch landed in nightly and beta is affected.
:dlrobertson, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox113 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(drobertson)

IMO not important enough for a uplift.

Flags: needinfo?(drobertson)
Flags: qe-verify+

Reproducible on a 2023-04-10 Nightly build on Windows 10.
Verified as fixed on Firefox 114.0b2(build ID: 20230509180058) and Nightly 115.0a1(build ID: 20230509215006) on Windows 10, macOS 12, Ubuntu 22.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: