Closed Bug 2050692 Opened 22 days ago Closed 10 days ago

last character in channel names on Slack cut off

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- disabled
firefox-esr153 --- disabled
firefox152 --- disabled
firefox153 --- disabled
firefox154 --- fixed

People

(Reporter: aryx, Assigned: gw)

References

(Regressed 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Firefox Nightly 154.0a1 on Windows 11

Often the last character in channel names on Slack is cut off.

Flags: needinfo?(mozilla)

Could you attach your about:support (or comment here what display scale ratio you're running at)?

Flags: needinfo?(mozilla) → needinfo?(aryx.bugmail)

I can't repro locally on Linux at a variety of resolutions and device scales yet - is there anything about your setup or repro steps that might be worth trying here?

I can see it. I have to join the mozilla-org channel. FWIW, my DPR is 125%.

Anyway, that's odd, the clipped #mozilla-org is no clipped by any scroll container. And yeah, I think we can see #mozilla-ceo is also cut off in comment 0. Oops, #moco is also cut off.

Oops ^ above is wrong.

<span dir="auto" class="p-channel_sidebar__name" data-qa="channel_sidebar_name_mozilla-org" data-sk="tooltip_parent"><span>mozilla-org</span></span>

The .p-channel_sidebar__name has overflow: hidden style.

FWIW, the styles are:

p-channel_sidebar__name {
  color: var(--_sidebar-row-color,inherit);
  font-weight: var(--_sidebar-row-text-weight,inherit);
  opacity: var(--_sidebar-row-text-opacity,1);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

Windows Device Pixel Ratio is 1.25

Flags: needinfo?(aryx.bugmail)

Okay,

.c-scrollbar__hider {
 transform: translateZ(0);
}

This transform style is a trigger. If you uncheck the style on DevTools. the cut-off is gone.

Though mozregression didn't reliable work but I did kida git bisect. Now I am ~100% sure this is regressed by bug 2004666.

Regressed by: 2004666
No longer regressed by: 2048146
Assignee: nobody → mozilla

I'm still trying to repro this (setting up a comparable windows env), in the meantime it's possible that this might be fixed by https://phabricator.services.mozilla.com/D309279 if anyone who can repro it has time to apply that and check.

No, it's not. I applied D309279 and D309280.

Minimized wrench repro reftest:

root:
  items:
    - type: stacking-context
      bounds: [100.5, 80, 300, 100]
      transform: identity()
      is-2d: true
      items:
        - type: text
          text: "XXXXXXXX"
          origin: [0, 30]
          size: 32
          color: [0, 0, 0, 1]
          font: "Ahem.ttf"
root:
  items:
    - type: text
      text: "XXXXXXXX"
      origin: [100.5, 110]
      size: 32
      color: [0, 0, 0, 1]
      font: "Ahem.ttf"

A device-mode text run snapped its full reference-frame origin to the device
grid. An offset-only reference frame - one that merely positions content (an
nsIFrame layout offset or an identity transform such as translateZ(0)) - then
shifted the text ~1px off where the same content renders unframed, clipping the
last character of Slack channel names on Win11 at fractional device scales.

Mark such frames with an is_offset_only flag on ReferenceFrameKind::Transform,
set by the embedder at the single site that synthesizes them (the offset-only
reference frame in wr_dp_push_stacking_context, mirrored by wrench). Snap their
text like unframed content so the static origin stays sub-pixel; frames that
genuinely scale or rotate content keep the full-origin snap.

This also fixes css-transforms/backface-visibility-hidden-animated-002.html
(text inside a will-change:transform element), so drop its now-passing
expectation.

Pushed by gwatson@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/56bc004050fd https://hg.mozilla.org/integration/autoland/rev/30d67c948213 Leave offset-only reference frames sub-pixel when snapping device-mode text. r=gfx-reviewers,lsalzman
Status: NEW → RESOLVED
Closed: 17 days ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch

Behavior did not change with the latest Nightly.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 154 Branch → ---
Depends on: 2052391

Reclassifying given the regressor and assignee.

Component: Panning and Zooming → Graphics: WebRender

Slack channel-name characters were clipped at fractional device scales. Render
text runs at their exact device positions and keep a device-space text run's
clips unsnapped, so a fractional clip edge no longer rounds inward and shaves
the last glyph; a snapping primitive instead snaps every clip in its chain to
the device grid. Also rounds out the bounding rect of non-snapped primitives and
drops the now-dead is_offset_only reference-frame flag.

Updates the affected wrench reftest baselines and adds a unit test asserting the
device-text clip snap policy (the rendered difference is a sub-pixel clip shift
that headless software rasterization cannot surface, so it can't be reftested).

Pushed by gwatson@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0b40ca4b71f3 https://hg.mozilla.org/integration/autoland/rev/eb835be37e1f Render text runs in device space and snap clips to the device grid r=gfx-reviewers,lsalzman
Pushed by rperta@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c522ec359f7f https://hg.mozilla.org/integration/autoland/rev/6bfe3eff1a9c Revert "Bug 2050692 - Render text runs in device space and snap clips to the device grid r=gfx-reviewers,lsalzman" for causing wr failures at attributes-for-embedded-content-and-images/input-image-inline-alt.html

Backed out for causing wr failures at attributes-for-embedded-content-and-images/input-image-inline-alt.html
Backout link
Push with failures
Failure log(s)
and also this reftest

Flags: needinfo?(mozilla)

Fixed the fuzzy annotation for this test

Flags: needinfo?(mozilla)
Pushed by gwatson@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/98b6b93145bf https://hg.mozilla.org/integration/autoland/rev/79a3125a8baa Render text runs in device space and snap clips to the device grid r=gfx-reviewers,lsalzman
Status: REOPENED → RESOLVED
Closed: 17 days ago10 days ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
Regressions: 2054084
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: