Open Bug 934285 Opened 7 years ago Updated 2 years ago

mousewheel scroll_amount is not consistent across sites

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

24 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

UNCONFIRMED

People

(Reporter: manishsin8, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release)
Build ID: 20130910160258

Steps to reproduce:

Open about:config
Change "mousewheel.min_line_scroll_amount" to a new value, say, 6.



Actual results:

The scroll amount changed for a few sites but not for all.


Expected results:

The scroll amount should be independent of the sites.
Manishsin8, can you give a couple of urls where it did and did not change? Thanks!
Flags: needinfo?(manishsin8)
You may also need to change different preferences for Windows as described here
https://support.mozilla.org/en-US/questions/959354
Component: Untriaged → Event Handling
Product: Firefox → Core
Sorry for a late reply.

I checked it, and the change is not getting reflected in Wikipedia, GMail..

It works with http://en.cppreference.com
Flags: needinfo?(manishsin8)
Also works with this site.
I'm not sure if you understand the pref correctly.

If a scroll target is specified very small size such as |font-size: 0;| or |font-size: 1px;| and the scrolling speed based on DOM_DELTA_LINE, the scroll never occurs or occurs but very slowly. Preventing this issue, I added the pref which defines alternative line height value for such case.

When its value is 6, it means the scroll target should be scrolled 6px per 1 line scroll event.

If you understand this correctly, could you explain what's a problem on where?
Flags: needinfo?(manishsin8)
(
referring to
https://wiki.mozilla.org/Gecko:Mouse_Wheel_Scrolling
http://support.mozilla.org/en-US/questions/942303
)

What I am saying is this:

Initially, mousewheel.min_line_scroll_amount is set to 4
One mouse scroll event produces certain amount of scrolling (in px).

Change mousewheel.min_line_scroll_amount to 8.
The scrolling amount for one mouse scroll event remains the same.
Flags: needinfo?(manishsin8)
(In reply to manishsin8 from comment #6)
> What I am saying is this:
> 
> Initially, mousewheel.min_line_scroll_amount is set to 4
> One mouse scroll event produces certain amount of scrolling (in px).

Only when the line height is less than 4px per 1 line scroll event, not per wheel event.

> Change mousewheel.min_line_scroll_amount to 8.
> The scrolling amount for one mouse scroll event remains the same.

This means that the special path runs when the line height is less than 8px.

It's very complex to understand the behavior with wheel event because a lot of mice and touchpads for Windows support high resolution scroll. Therefore, a wheel event may cause scrolling less than 1 line (e.g., 1/3 line).

You should test with arrow keys. They also refer the pref.
Actually, I did check with the arrow keys and I get the same results.

But, I have a question:
What is meant by line/line height here.
(In reply to manishsin8 from comment #8)
> What is meant by line/line height here.

Actually, the font height (ascent + descent) of scrollable element.
http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsGfxScrollFrame.cpp#2631
OK, but, these font metrics depend on font-size.
Which font-size do we consider for calculations.
Is it the font-size set by the user through Options (/preferences)
I want to state some points here:

1) As Liz Henry indicated, the scroll amount also changes by mousewheel.default.delta_multiplier_y.

Now, if I change it from 100 to 110, the scroll amount decreases. The scroll amount also decreases when value is changed from 100 to 95.



2) "mousewheel.min_line_scroll_amount pref. If line height of the scroll target is smaller than this value in pixels, a wheel event which represents one line scroll scrolls this amount. "

So, I changed min_line_scroll_amount to 32 (as it is certainly greater than line height), and the scroll amount did change.

But, if this value is supposed to be in pixels, then the scroll amount was too much (for a value of 32 px).

For an incremental increase in min_line_scroll_amount, the corresponding increase in the scroll amount is greater than 1 px.
(In reply to manishsin8 from comment #12)
> I want to state some points here:
> 
> 1) As Liz Henry indicated, the scroll amount also changes by
> mousewheel.default.delta_multiplier_y.
> 
> Now, if I change it from 100 to 110, the scroll amount decreases.

I guess that your environment causes enabling system scroll speed overriding:
https://wiki.mozilla.org/Gecko:Mouse_Wheel_Scrolling#Override_system_of_system_scroll_speed

This is disabled if you customize mouse wheel related prefs.

> 2) "mousewheel.min_line_scroll_amount pref. If line height of the scroll
> target is smaller than this value in pixels, a wheel event which represents
> one line scroll scrolls this amount. "
> 
> So, I changed min_line_scroll_amount to 32 (as it is certainly greater than
> line height), and the scroll amount did change.
> 
> But, if this value is supposed to be in pixels, then the scroll amount was
> too much (for a value of 32 px).

How do you test it? It's difficult to fire just one line scroll wheel event. And arrow keys cause 3 line scroll in default settings (see toolkit.scrollbox.verticalScrollDistance).

> For an incremental increase in min_line_scroll_amount, the corresponding
> increase in the scroll amount is greater than 1 px.
> I guess that your environment causes enabling system scroll speed overriding:
> https://wiki.mozilla.org/Gecko:
> Mouse_Wheel_Scrolling#Override_system_of_system_scroll_speed
> 
> This is disabled if you customize mouse wheel related prefs.
> 

All the mouse wheel related prefs are at default values.
But, the point is that modification of mousewheel.default.delta_multiplier_y is producing changes.
It's just that they are unexpected.
(In reply to manishsin8 from comment #14)
> > I guess that your environment causes enabling system scroll speed overriding:
> > https://wiki.mozilla.org/Gecko:
> > Mouse_Wheel_Scrolling#Override_system_of_system_scroll_speed
> > 
> > This is disabled if you customize mouse wheel related prefs.
> > 
> 
> All the mouse wheel related prefs are at default values.
> But, the point is that modification of mousewheel.default.delta_multiplier_y
> is producing changes.
> It's just that they are unexpected.



Any comment on this?
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.