Scroll marks on the horizontal scrollbar don't work for vertical-rl content
Categories
(Toolkit :: Find Toolbar, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox100 | --- | fixed |
People
(Reporter: jfkthame, Assigned: hectorz)
References
Details
Attachments
(1 file)
|
Bug 1757800 - Calculate scrollbar marks' positions with explicit `window.scrollMin{X,Y}`. r?jfkthame
48 bytes,
text/x-phabricator-request
|
Details | Review |
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:
- Load https://bug1358017.bmoattachments.org/attachment.cgi?id=8961883
- Press Cmd-F (Ctl-F) to bring up the Find bar
- Ensure "Highlight All" is enabled
- Paste "報" into the Find bar
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.
| Reporter | ||
Comment 1•3 years ago
|
||
: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.
| Assignee | ||
Comment 2•3 years ago
|
||
(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.
| Assignee | ||
Comment 3•3 years ago
|
||
(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.
| Assignee | ||
Comment 4•3 years ago
|
||
In vertical-rl & sideways-rl writing modes, window.scrollMinX is not 0.
Updated•3 years ago
|
Comment 6•3 years ago
|
||
| bugherder | ||
Description
•