Open
Bug 176800
Opened 22 years ago
Updated 2 years ago
Avoid sending coords for mouse wheel events when no move occurs
Categories
(Core :: XUL, defect)
Tracking
()
NEW
People
(Reporter: hyatt, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
3.65 KB,
patch
|
bryner
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
An optimization. The point on a mouse scroll event becomes irrelevant if you're in the middle of wheeling (it's only relevant for the first of several wheels). Speeds up mouse wheeling pretty substantially for me on some pages.
Reporter | ||
Comment 1•22 years ago
|
||
Comment 2•22 years ago
|
||
Does this change the way these events are viewed in the DOM too? Or do we not usefully expose them in the DOM yet?
Reporter | ||
Comment 3•22 years ago
|
||
Attachment #104201 -
Attachment is obsolete: true
Comment 4•22 years ago
|
||
Comment on attachment 104204 [details] [diff] [review] Better patch. Make it a global var. Lose the unneeded whitespace changes and r=bryner.
Attachment #104204 -
Flags: review+
Comment 5•22 years ago
|
||
Comment on attachment 104204 [details] [diff] [review] Better patch. Make it a global var. sr=bzbarsky if bryner's happy.
Attachment #104204 -
Flags: superreview+
Reporter | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Summary: Avoid sending coords for mouse wheel events when no move occurs → [trunk approval] Avoid sending coords for mouse wheel events when no move occurs
Target Milestone: --- → mozilla1.2final
Comment 6•22 years ago
|
||
hyatt, can you check this patch in?
Comment 8•22 years ago
|
||
Bringing jkeiser in since he's been doing heavy lifting with mouse events lately. The basic idea is that the only reason an event coordinate would be important for a mousewheel event is to clear the hover state on the content that the mouse pointer was previously over. Since we don't set :hover on any new content until the mouse is moved, there's no benefit to setting an event coordinate for subsequent scroll events without a move event, and it lets us avoid a potentially expensive GetFrameForPoint lookup. This works because scrolling views have widgets, so event coordinates anywhere within that widget will give you the same scrolling view. One thing I don't think we took into account is that we dispatch a DOMMouseScroll event (in nsEventStateManager::DoWheelScroll). This patch may cause the target of that event to be incorrect; we should check whether that breaks anything. It looks like XUL trees, listboxes, and tooltips make use of this event. No DOM event spec mentions this event, however, IE does fire a mousewheel event (see http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onmousewheel.asp ) I'd like to either get this in or decide that it's not a valid optimization and wontfix it.
Status: NEW → ASSIGNED
Summary: [trunk approval] Avoid sending coords for mouse wheel events when no move occurs → Avoid sending coords for mouse wheel events when no move occurs
Target Milestone: mozilla1.2final → mozilla1.4alpha
Updated•18 years ago
|
Assignee: bryner → jag
Status: ASSIGNED → NEW
QA Contact: jrgmorrison → xptoolkit.widgets
Target Milestone: mozilla1.4alpha → ---
Updated•16 years ago
|
Assignee: jag → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•