Closed Bug 1792285 Opened 2 years ago Closed 2 years ago

ResizeObserver devicePixelContentBox size still broken

Categories

(Core :: Layout, defect)

Firefox 107
defect

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: mozilla2, Assigned: dshin)

References

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

Steps to reproduce:

On a Mac

  1. Go to https://jsgist.org/?src=c2e4cdca322620bdaf4e46764d6ce761
  2. Zoom to 67% (press Cmd Minus 3 times)
  3. Resize the window

Actual results:

The top rectangles should appear to have a gradient at certain sizes

Expected results:

The top rectangles should never appear to have a gradient (changing brightness across or down)

See https://bugzilla.mozilla.org/show_bug.cgi?id=1774135#c14 for more details

Also I think this wpt test may surface the issue

https://github.com/web-platform-tests/wpt/pull/36057

Component: Untriaged → Layout
Product: Firefox → Core

(sorry, hit submit without finishing my comment. :) )

dshin might be interested to take a look here...

Assignee: nobody → dshin
Severity: -- → S3
Flags: needinfo?(dshin)
Status: NEW → ASSIGNED
Attached file Mimimum Reproducible Case (deleted) —

Case I've been using for reproducing on my Linux machine. Zooming to 140% causes the same gradient behaviour.

Attachment #9299537 - Attachment description: Bug 1792285 - Use properly snapped bounds for WebRender commands in `<canvas>`. r=#layout-reviewers → Bug 1792285 - Part 1: Add helper function for `nsDisplayCanvas` to calculate subpixel snapped rect size. r=#layout-reviewers

This address the scaling/interpolation artifacts while zooming when
<canvas> rescales and/or redraws itself based on ResizeObserver's
devicePixelContentBox output.

Depends on D159884

Attachment #9299537 - Attachment description: Bug 1792285 - Part 1: Add helper function for `nsDisplayCanvas` to calculate subpixel snapped rect size. r=#layout-reviewers → Bug 1792285 - Part 1: Refactor `DisplayListBuilder::PushIFrame` in preperation for proper subpixel snapping. r=#layout-reviewers
Attachment #9299898 - Attachment description: Bug 1792285 - Part 2: Use helper function added in Part 1 to provide snapped bounds for WebRender commands. r=#layout-reviewers → Bug 1792285 - Part 2: Do proper subpixel snapping before pushing `iframe` to WebRender. r=#layout-reviewers
Attachment #9299537 - Attachment description: Bug 1792285 - Part 1: Refactor `DisplayListBuilder::PushIFrame` in preperation for proper subpixel snapping. r=#layout-reviewers → Bug 1792285 - Part 1: Refactor `DisplayListBuilder::PushIFrame` in preparation for proper subpixel snapping. r=#layout-reviewers
Pushed by dshin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/125a0d6ca184 Part 1: Refactor `DisplayListBuilder::PushIFrame` in preparation for proper subpixel snapping. r=emilio https://hg.mozilla.org/integration/autoland/rev/f03fabffc6c6 Part 2: Do proper subpixel snapping before pushing `iframe` to WebRender. r=gfx-reviewers,gw
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
Regressions: 1798863
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: