Closed
Bug 512235
Opened 15 years ago
Closed 15 years ago
bug 462809 should be implemented in content/events, not widget/src/*
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P1)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
FIXED
mozilla1.9.2b1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(3 files, 1 obsolete file)
20.79 KB,
patch
|
vlad
:
review+
roc
:
review+
|
Details | Diff | Splinter Review |
21.02 KB,
patch
|
Details | Diff | Splinter Review | |
21.03 KB,
patch
|
Details | Diff | Splinter Review |
I suggested this bug in bug 462809 comment 37, but it's ignored :-(
Bug 462809 changes the widget/src/windows/nsWindow.cpp. However, it shouldn't be so. The bug wanted to make the consistency between platforms. So, the software acceleration must be implemented in XP level.
The attached patch ports the patch of bug 462809 to nsEventStateManager (ESM). By it, fixing following problems:
* bug 508747
* bug 462809 will be fixed on *all* platforms.
* The acceleration is *only* applied to the scrolling, so, not applied to zoom and DOM events.
All other works should be based on this implementation.
# The patch doesn't change the actual behavior on Windows. So, the all regressions (excepting bug 508747) are kept.
Flags: blocking1.9.2?
Attachment #396199 -
Flags: review?(vladimir)
Attachment #396199 -
Flags: review?(roc)
Comment 1•15 years ago
|
||
(In reply to comment #0)
> The bug wanted to make the consistency between platforms. So, the
> software acceleration must be implemented in XP level.
How does this affect native acceleration on OS X?
Blocks: 462809
Assignee | ||
Comment 2•15 years ago
|
||
(In reply to comment #1)
> (In reply to comment #0)
> > The bug wanted to make the consistency between platforms. So, the
> > software acceleration must be implemented in XP level.
>
> How does this affect native acceleration on OS X?
I don't know. But if so, the current implementation is wrong. Some mouse drivers on Windows also have the native acceleration.
Assignee | ||
Comment 3•15 years ago
|
||
And also the patch implements the acceleration for the horizontal scrolling.
Assignee | ||
Comment 4•15 years ago
|
||
Comment on attachment 396199 [details] [diff] [review]
Patch v1.0
oops, cannot build on Linux. Sorry for the spam.
Attachment #396199 -
Flags: review?(vladimir)
Attachment #396199 -
Flags: review?(roc)
Assignee | ||
Comment 5•15 years ago
|
||
Attachment #396199 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Attachment #396218 -
Flags: review?(vladimir)
Attachment #396218 -
Flags: review?(roc)
Assignee | ||
Comment 6•15 years ago
|
||
Comment on attachment 396218 [details] [diff] [review]
Patch v1.1
ok, passed all tests.
Assignee | ||
Comment 7•15 years ago
|
||
Assignee | ||
Comment 8•15 years ago
|
||
Ah,
In my patch:
> +PRInt32
> +nsMouseWheelTransaction::ComputeWheelDelta(PRInt32 aDelta, PRInt32 aFactor)
> +{
> + if (aDelta == 0)
> + return 0;
> +
> + return PRInt32(0.5 + (aDelta * sScrollSeriesCounter * (double)aFactor / 10));
> +}
But currently:
> -// If the scroll notification is part of a series of notifications we should
> -// increase scollEvent.delta to create an acceleration effect
> -int nsWindow::ComputeMouseWheelDelta(int currentVDelta,
> - int iDeltaPerLine,
> - ULONG ulScrollLines)
> -{
> - // scrollAccelerationStart: click number at which acceleration starts
> - int scrollAccelerationStart = gScrollPrefObserver->GetScrollAccelerationStart();
> - // scrollNumlines: number of lines per scroll before acceleration
> - int scrollNumLines = gScrollPrefObserver->GetScrollNumLines();
> - // scrollAccelerationFactor: factor muliplied for constant acceleration
> - int scrollAccelerationFactor = gScrollPrefObserver->GetScrollAccelerationFactor();
> -
> - // compute delta that obeys numlines pref
> - int ulScrollLinesInt = static_cast<int>(ulScrollLines);
> - // currentVDelta is a multiple of (iDeltaPerLine * ulScrollLinesInt)
> - int delta = scrollNumLines * currentVDelta / (iDeltaPerLine * ulScrollLinesInt);
> -
> - // mScrollSeriesCounter: the index of the scroll notification in a series
> - if (mScrollSeriesCounter < scrollAccelerationStart ||
> - scrollAccelerationStart < 0 ||
> - scrollAccelerationFactor < 0)
> - return delta;
> - else
> - return int(0.5 + delta * mScrollSeriesCounter *
> - (double) scrollAccelerationFactor / 10);
> -}
So, the current |delta| was additionally divided by |ulScrollLinesInt| which is a value of |SPI_GETWHEELSCROLLLINES|. So, the my patch is little faster than the current implementation if the value is larger than 1. (But I don't think this is not a new problem, because current implementation (or current pref value) is very high speed settings as most people cannot use it :-p
I think that we need additional tuning for this code by the workers of the app level acceleration. But it should be worked on bug 508785. It's known bug.
Assignee | ||
Comment 9•15 years ago
|
||
> But I don't think this is not a new problem
I meant "I *think* this is not a new problem". Sorry for the spam.
Assignee | ||
Comment 10•15 years ago
|
||
This repairs the DOM mouse wheel event behavior changes, we should fix this bug until 1.9.2b1 which is a first release after bug 462809.
Target Milestone: --- → mozilla1.9.2b1
Assignee | ||
Comment 11•15 years ago
|
||
Additional information for comment 8.
The |ulScrollLines| is a system setting value. And |iDeltaPerLine| is computed from the |ulScrollLines| and a const |WHEEL_DELTA| (the value is 120). So, they cannot be referred from XP level code. Therefore, my patch can *not* accelerate to same result under current settings (and without new APIs for getting them). Therefore, I'll not modify the patch before the reviews. But in fact, we need a tuning *after* this bug.
Attachment #396218 -
Flags: review?(roc) → review+
Assignee | ||
Comment 12•15 years ago
|
||
vlad:
Would you review the patch?
Comment on attachment 396218 [details] [diff] [review]
Patch v1.1
Sorry; roc's review is good enough here, but this looks fine.
Attachment #396218 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 14•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/7475d595c48a
Landed to trunk. The accelerated scrolling speed may be to fast. If so, we should change the default pref settings, Don't backout this patch by the reason.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•15 years ago
|
Attachment #396218 -
Flags: approval1.9.2?
Assignee | ||
Comment 15•15 years ago
|
||
Actual checked-in patch.
![]() |
||
Comment 16•15 years ago
|
||
> I don't know. But if so, the current implementation is wrong. Some mouse
> drivers on Windows also have the native acceleration.
Yes, the current implementation is wrong if the driver has native acceleration. That's been a major cause of complaints recently.
It was apparently the plan to NOT enable acceleration on non-Windows by default. what happened to that?
Assignee | ||
Comment 17•15 years ago
|
||
(In reply to comment #16)
> It was apparently the plan to NOT enable acceleration on non-Windows by
> default. what happened to that?
I don't think the acceleration should be implemented only on Windows. Because the function was implemented for the constancy between platforms. And implementing in widget/src/* doesn't make sense for me, see comment 0.
And I posted a patch which disables the wheel acceleration in default settings, see bug 513817.
Comment 18•15 years ago
|
||
Yes, it was surprising to suddenly find acceleration enabled for OS X (and presumably Linux, too).
![]() |
||
Comment 19•15 years ago
|
||
For what it's worth, the mac builds that have acceleration are completely unusable. I've had to downgrade to a build from before this bug landed. If nothing else, I couldn't use bugzilla (kept ending up at the end of the bug, not at the next comment).
Assignee | ||
Comment 20•15 years ago
|
||
If you cannot use the accelerated scrolling, set "mousewheel.acceleration.start" to -1 until bug 513817 will be fixed.
Assignee | ||
Comment 21•15 years ago
|
||
beltzner:
If we will land the patch of bug 513817, we need this patch before it.
Assignee | ||
Comment 22•15 years ago
|
||
Nominating b1 blocker.
-> P1
-> target to 3.6b1
See bug 513817 comment 63 for the reason. Note that if we land this patch without the patch of bug 518317, we need to change the default settings of the app level mouse acceleration, see comment 20.
Priority: -- → P1
Assignee | ||
Comment 23•15 years ago
|
||
Updated•15 years ago
|
Flags: blocking1.9.2? → blocking1.9.2+
Assignee | ||
Comment 24•15 years ago
|
||
Assignee | ||
Updated•15 years ago
|
status1.9.2:
--- → beta1-fixed
Assignee | ||
Updated•15 years ago
|
Attachment #396218 -
Flags: approval1.9.2?
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•