Closed Bug 1765013 Opened 3 years ago Closed 3 years ago

CSS filter: drop-shadow() incorrect offset on certain sizes

Categories

(Core :: Graphics: WebRender, defect)

Firefox 100
defect

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox99 --- wontfix
firefox100 --- fixed
firefox101 --- fixed

People

(Reporter: evan, Assigned: gw)

References

(Regressed 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Attached file testcase.html (deleted) —

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

Steps to reproduce:

  1. Create an element
  2. Make sure browser zoom is 100%
  3. Add drop-shadow with both x & y offsets set to 0 and blur <= 0.4rem to it

see testcase.html

Actual results:

Shadow is slightly offset top & left.

see https://i.imgur.com/vGEgDgY.png (firefox)

Note: It doesn't occur in some browser zoom levels (or at least it's less noticeable).

Expected results:

Shadow shouldn't have an offset.

see https://i.imgur.com/twkmuqo.png (chromium)

Note: this is a regression
Does not occur on: Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0
Does occur on: Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0

Also it doesn't affect Firefox Android: Mozilla/5.0 (Android 12; Mobile; rv:101.0) Gecko/101.0 Firefox/101.0

2022-04-16T17:54:38.426000: INFO : b'[Parent 15496, IPC I/O Parent] WARNING: file /builds/worker/checkouts/gecko/ipc/chromium/src/base/process_util_win.cc:167'
2022-04-16T17:54:42.918000: INFO : Narrowed integration regression window from [31dcf64c, fc2b3d64] (3 builds) to [c6f1243c, fc2b3d64] (2 builds) (~1 steps left)
2022-04-16T17:54:42.942000: DEBUG : Starting merge handling...
2022-04-16T17:54:42.942000: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=fc2b3d6448bcc3575fffb1abc923e7e703aeef54&full=1
2022-04-16T17:54:42.942000: DEBUG : redo: attempt 1/3
2022-04-16T17:54:42.942000: DEBUG : redo: retry: calling _default_get with args: ('https://hg.mozilla.org/integration/autoland/json-pushes?changeset=fc2b3d6448bcc3575fffb1abc923e7e703aeef54&full=1',), kwargs: {}, attempt #1
2022-04-16T17:54:42.946000: DEBUG : urllib3.connectionpool: Resetting dropped connection: hg.mozilla.org
2022-04-16T17:54:44.964000: DEBUG : urllib3.connectionpool: https://hg.mozilla.org:443 "GET /integration/autoland/json-pushes?changeset=fc2b3d6448bcc3575fffb1abc923e7e703aeef54&full=1 HTTP/1.1" 200 None
2022-04-16T17:54:44.995000: DEBUG : Found commit message:
Bug 1749380 - Part 2 - Performance and quality fixes for part 1. r=gfx-reviewers,nical

  • Add support for local scale factors to a surface, allowing it to
    be rasterized in root coordinate space. This allows snapping to
    work across surfaces where the surface transform is a fractional
    offset.

  • Calculate scaling factors per rasterized surface and propagate
    them. Ensures correct scale factor calculations when dealing with
    nested preserve-3d contexts with 90-degree axis rotations.

  • Support determining exact surface device rect for 2d surfaces
    with fractional surface transforms.

  • Fix line decoration cache key size calculations based on world
    scaling factor.

  • Remove get_clipped_device_rect usage for calculating clip-mask
    surface allocations, use surface.get_surface_rect instead. The
    prior method doesn't correctly account for expanded local regions
    from the current dirty rect, resulting in invalidation issues in
    some animated edge cases. Also unifies the way clip-mask surface
    allocations work with the way general render target surface
    allocations work.

Differential Revision: https://phabricator.services.mozilla.com/D138982

2022-04-16T17:54:44.995000: DEBUG : Did not find a branch, checking all integration branches
2022-04-16T17:54:44.995000: INFO : The bisection is done.
2022-04-16T17:54:44.995000: INFO : Stopped

Has Regression Range: --- → yes
Has STR: --- → yes
Component: CSS Parsing and Computation → Graphics: WebRender
Regressed by: 1749380
Status: UNCONFIRMED → NEW
Ever confirmed: true

STR:
Make sure that the browser zoom is 100%, and that the Windows DPI/scaling is also set to 100%.
Open the testcase.

Flags: needinfo?(gwatson)
Attached file about:support (deleted) —

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

Assignee: nobody → gwatson
Flags: needinfo?(gwatson)
Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/328b6a0945e1 Fix fractional blur radii on drop-shadow r=gfx-reviewers,mstange
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch

Comment on attachment 9273137 [details]
Bug 1765013 - Fix fractional blur radii on drop-shadow

Beta/Release Uplift Approval Request

  • User impact if declined: Incorrect drop-shadow rendering in some cases
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small patch, only affects drop-shadow blur radii.
  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9273137 - Flags: approval-mozilla-beta?

Comment on attachment 9273137 [details]
Bug 1765013 - Fix fractional blur radii on drop-shadow

Approved for 100.0rc1

Attachment #9273137 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Regressions: 1787132
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: