Closed Bug 1757800 Opened 3 years ago Closed 3 years ago

Scroll marks on the horizontal scrollbar don't work for vertical-rl content

Categories

(Toolkit :: Find Toolbar, defect, P3)

defect

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: jfkthame, Assigned: hectorz)

References

Details

Attachments

(1 file)

It appears that the horizontal-scrollbar marks introduced for vertical writing modes in bug 1700292 don't work correctly for vertical-rl mode (probably a result of mishandling the reversed x-coordinate system somewhere).

STR:

Expected:
There are 12 matches for this character, which are highlighted. There should also be corresponding scroll-marks on the horizontal scrollbar.

Actual:
The matches are highlighted in the text, but no scroll-marks appear.

Clicking the button at the top of the page to toggle the direction to vertical-lr makes the marks appear; toggling back to vertical-rl makes them disappear again.

:hectorz, can you look into this? I wouldn't be surprised if it's basically an issue of the marks being misplaced off-screen, and we need to invert a sign somewhere to get the x-coordinates right, or maybe left-shift by the width of the element, or something like that.

Flags: needinfo?(bzhao)

(In reply to Jonathan Kew (:jfkthame) from comment #1)

:hectorz, can you look into this?

Hi :jfkthame I’ll look into this but not immediately. I hope that would be ok. And thanks for the tips.

(In reply to Jonathan Kew (:jfkthame) from comment #1)

I wouldn't be surprised if it's basically an issue of the marks being misplaced off-screen, and we need to invert a sign somewhere to get the x-coordinates right, or maybe left-shift by the width of the element, or something like that.

Hi :jfkthame,

It looks like the primary issue here is window.scrollMaxX being 0 for vertical-rl page, since all possible window.scrollX are negative. Even w/o the window.scrollMaxX > 0 check, it will produce a zero xAdj from let xAdj = window.scrollMaxX / scrollWidth and draw a single mark on the left most position.

I'll see whether there's an alternative way to get the intended information.

Flags: needinfo?(bzhao)

In vertical-rl & sideways-rl writing modes, window.scrollMinX is not 0.

Assignee: nobody → bzhao
Status: NEW → ASSIGNED
Pushed by bzhao@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/90543529b51a Calculate scrollbar marks' positions with explicit `window.scrollMin{X,Y}`. r=jfkthame,emilio
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: