Gecko:Mouse Wheel Scrolling

Revision as of 08:02, 26 January 2010 by Masayuki (talk | contribs) (Creating new document)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Overview

Gecko can have many scrollable frames at one time. This documents the detail of mouse wheel scrolling processing in Gecko.

Gecko honors mouse cursor position

Basically, turning mouse wheel scrolls a scrollable view under mouse cursor. This behavior was designed in bug 97283.

Note that on Windows, most mouse drivers honors keyboard focus rather than mouse cursor position. However, Internet Explorer and other web browsers honor the cursor position too. So, it's not a problem, probably.

Deciding a scrolling target from cursor position

There can be two or more scrollable frames at a point (i.e., under mouse cursor). Gecko decides one scrolling target by following rules:

  1. Finds a frame under mouse cursor.
  2. Checks whether the frame is scrollable to the direction by user operation.
  3. If the frame is scrollable, Gecko scrolls the frame.
  4. Otherwise, repeats the steps with its ancestor frames.

There is a special case. If gecko finds a drop down frame of a select element, it stops going up the frame hierarchy.

Mouse wheel transaction

DOM event vs. Scrolling

Issues