Closed Bug 1764435 Opened 3 years ago Closed 2 years ago

Scrollbar caching busts native RTL scrollbar drawing

Categories

(Core :: Widget, defect, P2)

defect

Tracking

()

VERIFIED FIXED
102 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox99 --- wontfix
firefox100 --- wontfix
firefox101 --- verified
firefox102 --- verified

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Attached file testcase (deleted) —

Our scrollbars code checks the RTL-ness of the scrollbar in various places, but with scrollbar caching that doesn't work because of this all: initial.

So stuff like this looks a bit off (the scrollbar thumb is slightly off). We should look at the direction of the scroll frame or similar.

Regressed by: 1554571

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

Has Regression Range: --- → yes

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(spohl.mozilla.bugs)
Severity: -- → S2
Flags: needinfo?(spohl.mozilla.bugs)
Priority: -- → P2

Our scrollbar drawing code had various RTL checks for the writing mode.

These checks were busted since bug 1554571 (where the writing-mode of
the scrollbar frames and so on is reset). However, they also wouldn't be
correct (we allow to customize scrollbar position via pref).

Instead, look at the scrollable frame to really know if the scrollbar is
on the right or not. Compute that once in Theme.cpp and pass it around
light we were doing for the "is horizontal" bit.

Comment on attachment 9275687 [details]
Bug 1764435 - Fix scrollbar drawing when scrollbars are on the left. r=mstange,spohl

Beta/Release Uplift Approval Request

  • User impact if declined: Vertical scrollbars on the left look off. This is specially noticeable on Windows 11 and Linux which have overlay scrollbars now.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: see test-case, confirm that scrollbar doesn't look off, see also duplicates.
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patch looks bigger than it really is because it changes a bunch of arguments but is fairly straight-forward.
  • String changes made/needed: none
  • Is Android affected?: No
Attachment #9275687 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/43b6bff2db7e Fix scrollbar drawing when scrollbars are on the left. r=spohl
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
QA Whiteboard: [qa-triaged]
Attached image tc scroll left.png (deleted) —

Reproduced the issue on Firefox 100.0 on Windows 11 by using the TC provided in Comment 0.

The issue is fixed on Firefox 102.0a1 (2022-05-10 latest on treeherder). Tests were performed on Windows 11 and Ubuntu 22.04.

Seems that by introducing this fix, the macOS one was moved a bit too much on the left side (see attachment)

Emilio, can you look over this ? Thank you!

Flags: needinfo?(emilio)

That seems expected, and is just the opposite as scrollbars on the right behave. Though maybe when "always show scrollbars" is used the thumb should be centered? I don't have a strong opinion there.

In any case that seems like an unrelated bug.

Flags: needinfo?(spohl.mozilla.bugs)
Flags: needinfo?(mstange.moz)
Flags: needinfo?(emilio)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #10)

Created attachment 9276050 [details]
Test-case with scrollbar both on the left and right.

That seems expected, and is just the opposite as scrollbars on the right behave. Though maybe when "always show scrollbars" is used the thumb should be centered? I don't have a strong opinion there.

In any case that seems like an unrelated bug.

Safari shows a centered thumb when the scrollbar track is displayed, so it would be good to get a bug on file for this. However, this patch is still an improvement over the situation before this patch as it at least matches the behavior of scrollbars on the right, just opposite.

Flags: needinfo?(spohl.mozilla.bugs)
Flags: needinfo?(mstange.moz)

This introduced totally noisy debug console output in Thunderbird, at least on Windows:
WARNING: '!sf', file C:/mozilla-source/mozilla-central/widget/Theme.cpp:1052
https://searchfox.org/mozilla-central/rev/b72e9d7d63bf499d1d8168291b93d4ec7fde236e/widget/Theme.cpp#1052

Can that be toned down?

What are the scrollbars there? For the xul tree i guess? If so... Yes, I suppose

Blocks: 1769012

Will set this as verified then on Firefox 102.0a1 based on Comment 10 and Comment 11.

Comment on attachment 9275687 [details]
Bug 1764435 - Fix scrollbar drawing when scrollbars are on the left. r=mstange,spohl

Approved for 101.0b7. Did we ever get a bug filed for the issue reported by QA during Nightly verification, though?

Flags: needinfo?(emilio)
Flags: needinfo?(catalin.sasca)
Attachment #9275687 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Blocks: 1769269
Flags: needinfo?(emilio)
Flags: needinfo?(catalin.sasca)

Verified that the issue is fixed on Firefox 101.0b7. Tests were performed on Windows 11, Ubuntu 22.04 and macOS 12.3.1.

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: