Closed Bug 804486 Opened 12 years ago Closed 12 years ago

horizontal scrolling amount is too small

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: tnikkel, Assigned: MatsPalmgren_bugz)

Details

Attachments

(3 files)

Horizontal scrolling is far too slow. I think we scroll 10 pixels per key press or scrollbar arrow button click.
Assignee: nobody → matspal
Attached patch fixSplinter Review
Our horizontal "line" scroll is currently hard-coded to 10px.
This patch changes it to 5 * AveCharWidth() for the scroll frame's font,
where the 5 can be changed with the pref
"toolkit.scrollbox.horizontalScrollDistance".

I've tested this on Linux at various fonts/sizes, and as far as I can tell
this is identical to what Chrome does.  Opera is also close but generally
scrolls slightly less.
Attachment #675998 - Flags: review?(roc)
Attached patch fix testsSplinter Review
Adjusting some tests that makes wrong assumptions about horizontal
line scroll distance.

All tests now pass:
https://tbpl.mozilla.org/?tree=Try&rev=3d841c269a9a
Attachment #676001 - Flags: review?(roc)
Comment on attachment 675998 [details] [diff] [review]
fix

Review of attachment 675998 [details] [diff] [review]:
-----------------------------------------------------------------

::: modules/libpref/src/init/all.js
@@ +343,5 @@
>  pref("toolkit.scrollbox.smoothScroll", true);
>  pref("toolkit.scrollbox.scrollIncrement", 20);
>  // Make sure to update NS_DEFAULT_VERTICAL_SCROLL_DISTANCE if changing this default.
>  pref("toolkit.scrollbox.verticalScrollDistance", 3);
> +// Make sure to update NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE if changing this default.

Why? I don't think it matters if NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE is not updated.
Attachment #675998 - Flags: review?(roc) → review+
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #4)
> Why? I don't think it matters if NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE is
> not updated.

True, but I think it's merely documenting the existence of that symbol
so that it can be found easily.  Should I remove both comments in the
prefs file then?  And do we really need the symbols?  (there's no other use
of these symbols other than the fallback arg to Preferences::GetInt)
I think you can just remove the comments. There's no need to keep the all.js default in sync with the no-pref-at-all default.

Other than that, you might as well just leave the symbols as-is.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: