Closed Bug 1501062 Opened 6 years ago Closed 6 years ago

Even while dragging the scroll thumb, if the mouse pointer is far enough away from the scrollbar, page scroll position should back to its original position

Categories

(Core :: Graphics: WebRender, defect, P2)

64 Branch
x86_64
Windows 10
defect

Tracking

()

VERIFIED FIXED
mozilla65
Tracking Status
firefox-esr60 --- unaffected
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- verified

People

(Reporter: alice0775, Assigned: kats)

References

Details

(Keywords: regression)

Attachments

(2 obsolete files)

Reproducible: always when WebRender is enabled

Steps To Reproduce:
1. Open long page
    --- remember original scroll position
2. Dragging scroll thumb
3. Keeping mouse down, move the mouse pointer away from the scroll bar

Actual results:
Page scroll position does tot back to its original position.

Expected Results:
Page scroll position should back to its original position. This is Windows default behavior.
Strange, this should be handled in the part of the APZ code that is shared between WR and non-WR. I can look into it if it's deemed to be a blocker.
same as bug 1501092?
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=17a1159f7f4d&tochange=273f8af59697

Regressed by:	43963e011193	Kartikaya Gupta — Bug 1389000 - Turn on webrender layers-free mode by default. r=jrmuizel
Blocks: 1389000
No one sets WebRenderLayerScrollData::mVisibleRegion?
(In reply to Botond Ballo [:botond] from comment #6)
> No one sets WebRenderLayerScrollData::mVisibleRegion?

To elaborate on that: triggering the scrollbar sanp-back feature from APZ requires knowing the bounds of the scrollbar thumb node, which comes from ScrollNode::GetVisibleRegion() in APZCTreeManager::UpdateHitTestingTree().

When I fixed bug 1352863, I implemented GetVisibleRegion() for ScrollNode=WebRenderScrollDataWrapper; the value came from WebRenderLayerScrollData::mVisibleRegion which was set in WebRenderLayerScrollData::Initialize(). At the time WebRenderLayerScrollData objects were constructed from layers.

Since then, things were refactored so WebRenderLayerScrollData objects are constructed from display items, and the setting of mVisibleRegion seems to have gotten lost.
https://searchfox.org/mozilla-central/rev/a7f4d3ba4fbfe3efbde832869f1d672fce7122f6/layout/painting/nsDisplayList.cpp#7070

^ This would be the place to re-add the setter, if we can get an equivalent rect from the display item.
Priority: -- → P2
Assignee: nobody → kats
I have a fix, but I'll try to write a test to go with it.
This field is used by APZ to implement the feature where the scrollbar snaps
back to the starting position if the mouse gets too far away.
This field is used by APZ to implement the feature where the scrollbar snaps
back to the starting position if the mouse gets too far away.
Sorry, I tried evolving the changeset via prune -s but I guess phabricator didn't like that...
Attachment #9020822 - Attachment is obsolete: true
Attachment #9020843 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/c44da5dca91c
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Flags: qe-verify+
Flags: in-testsuite+
Verified on latest Nightly 65.0a1 with WebRender activated and the issue is fixed, the page scroll position goes back to its original position.
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: