mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 8499eefa342e (bug 958868) for m2 test failures on a CLOSED TREE
This commit is contained in:
parent
9a780974cc
commit
e4e57eea11
@ -879,8 +879,12 @@ nsDOMWindowUtils::SendWheelEvent(float aX,
|
||||
wheelEvent.deltaMode = aDeltaMode;
|
||||
wheelEvent.isMomentum =
|
||||
(aOptions & WHEEL_EVENT_CAUSED_BY_MOMENTUM) != 0;
|
||||
wheelEvent.mIsNoLineOrPageDelta =
|
||||
(aOptions & WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE) != 0;
|
||||
wheelEvent.isPixelOnlyDevice =
|
||||
(aOptions & WHEEL_EVENT_CAUSED_BY_PIXEL_ONLY_DEVICE) != 0;
|
||||
NS_ENSURE_TRUE(
|
||||
!wheelEvent.isPixelOnlyDevice ||
|
||||
aDeltaMode == nsIDOMWheelEvent::DOM_DELTA_PIXEL,
|
||||
NS_ERROR_INVALID_ARG);
|
||||
wheelEvent.customizedByUserPrefs =
|
||||
(aOptions & WHEEL_EVENT_CUSTOMIZED_BY_USER_PREFS) != 0;
|
||||
wheelEvent.lineOrPageDeltaX = aLineOrPageDeltaX;
|
||||
|
@ -5071,7 +5071,7 @@ EventStateManager::DeltaAccumulator::InitLineOrPageDelta(
|
||||
if (IsInTransaction()) {
|
||||
// If wheel event type is changed, reset the values.
|
||||
if (mHandlingDeltaMode != aEvent->deltaMode ||
|
||||
mIsNoLineOrPageDeltaDevice != aEvent->mIsNoLineOrPageDelta) {
|
||||
mHandlingPixelOnlyDevice != aEvent->isPixelOnlyDevice) {
|
||||
Reset();
|
||||
} else {
|
||||
// If the delta direction is changed, we should reset only the
|
||||
@ -5086,12 +5086,13 @@ EventStateManager::DeltaAccumulator::InitLineOrPageDelta(
|
||||
}
|
||||
|
||||
mHandlingDeltaMode = aEvent->deltaMode;
|
||||
mIsNoLineOrPageDeltaDevice = aEvent->mIsNoLineOrPageDelta;
|
||||
mHandlingPixelOnlyDevice = aEvent->isPixelOnlyDevice;
|
||||
|
||||
// If it's handling neither a device that does not provide line or page deltas
|
||||
// nor delta values multiplied by prefs, we must not modify lineOrPageDelta
|
||||
// If it's handling neither pixel scroll mode for pixel only device nor
|
||||
// delta values multiplied by prefs, we must not modify lineOrPageDelta
|
||||
// values.
|
||||
if (!mIsNoLineOrPageDeltaDevice &&
|
||||
if (!(mHandlingDeltaMode == nsIDOMWheelEvent::DOM_DELTA_PIXEL &&
|
||||
mHandlingPixelOnlyDevice) &&
|
||||
!EventStateManager::WheelPrefs::GetInstance()->
|
||||
NeedToComputeLineOrPageDelta(aEvent)) {
|
||||
// Set the delta values to mX and mY. They would be used when above block
|
||||
@ -5152,7 +5153,7 @@ EventStateManager::DeltaAccumulator::Reset()
|
||||
mX = mY = 0.0;
|
||||
mPendingScrollAmountX = mPendingScrollAmountY = 0.0;
|
||||
mHandlingDeltaMode = UINT32_MAX;
|
||||
mIsNoLineOrPageDeltaDevice = false;
|
||||
mHandlingPixelOnlyDevice = false;
|
||||
}
|
||||
|
||||
nsIntPoint
|
||||
|
@ -702,7 +702,7 @@ protected:
|
||||
private:
|
||||
DeltaAccumulator() :
|
||||
mX(0.0), mY(0.0), mPendingScrollAmountX(0.0), mPendingScrollAmountY(0.0),
|
||||
mHandlingDeltaMode(UINT32_MAX), mIsNoLineOrPageDeltaDevice(false)
|
||||
mHandlingDeltaMode(UINT32_MAX), mHandlingPixelOnlyDevice(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -718,7 +718,7 @@ protected:
|
||||
TimeStamp mLastTime;
|
||||
|
||||
uint32_t mHandlingDeltaMode;
|
||||
bool mIsNoLineOrPageDeltaDevice;
|
||||
bool mHandlingPixelOnlyDevice;
|
||||
|
||||
static DeltaAccumulator* sInstance;
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -468,11 +468,9 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||
* scroll.
|
||||
* @param aOptions Set following flags.
|
||||
*/
|
||||
const unsigned long WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE = 0x0001;
|
||||
// @deprecated Use WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE.
|
||||
const unsigned long WHEEL_EVENT_CAUSED_BY_PIXEL_ONLY_DEVICE = 0x0001;
|
||||
const unsigned long WHEEL_EVENT_CAUSED_BY_MOMENTUM = 0x0002;
|
||||
const unsigned long WHEEL_EVENT_CUSTOMIZED_BY_USER_PREFS = 0x0004;
|
||||
const unsigned long WHEEL_EVENT_CAUSED_BY_PIXEL_ONLY_DEVICE = 0x0001;
|
||||
const unsigned long WHEEL_EVENT_CAUSED_BY_MOMENTUM = 0x0002;
|
||||
const unsigned long WHEEL_EVENT_CUSTOMIZED_BY_USER_PREFS = 0x0004;
|
||||
// If any of the following flags is specified this method will throw an
|
||||
// exception in case the relevant overflowDelta has an unexpected value.
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_ZERO = 0x0010;
|
||||
|
@ -317,9 +317,8 @@ function synthesizeTouchAtCenter(aTarget, aEvent, aWindow)
|
||||
*
|
||||
* aEvent is an object which may contain the properties:
|
||||
* shiftKey, ctrlKey, altKey, metaKey, accessKey, deltaX, deltaY, deltaZ,
|
||||
* deltaMode, lineOrPageDeltaX, lineOrPageDeltaY, isMomentum,
|
||||
* isNoLineOrPageDelta, isCustomizedByPrefs, expectedOverflowDeltaX,
|
||||
* expectedOverflowDeltaY
|
||||
* deltaMode, lineOrPageDeltaX, lineOrPageDeltaY, isMomentum, isPixelOnlyDevice,
|
||||
* isCustomizedByPrefs, expectedOverflowDeltaX, expectedOverflowDeltaY
|
||||
*
|
||||
* deltaMode must be defined, others are ok even if undefined.
|
||||
*
|
||||
@ -337,8 +336,9 @@ function synthesizeWheel(aTarget, aOffsetX, aOffsetY, aEvent, aWindow)
|
||||
|
||||
var modifiers = _parseModifiers(aEvent);
|
||||
var options = 0;
|
||||
if (aEvent.isNoLineOrPageDelta) {
|
||||
options |= utils.WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE;
|
||||
if (aEvent.isPixelOnlyDevice &&
|
||||
(aEvent.deltaMode == WheelEvent.DOM_DELTA_PIXEL)) {
|
||||
options |= utils.WHEEL_EVENT_CAUSED_BY_PIXEL_ONLY_DEVICE;
|
||||
}
|
||||
if (aEvent.isMomentum) {
|
||||
options |= utils.WHEEL_EVENT_CAUSED_BY_MOMENTUM;
|
||||
@ -364,7 +364,8 @@ function synthesizeWheel(aTarget, aOffsetX, aOffsetY, aEvent, aWindow)
|
||||
options |= utils.WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_NEGATIVE;
|
||||
}
|
||||
}
|
||||
var isNoLineOrPageDelta = aEvent.isNoLineOrPageDelta;
|
||||
var isPixelOnlyDevice =
|
||||
aEvent.isPixelOnlyDevice && aEvent.deltaMode == WheelEvent.DOM_DELTA_PIXEL;
|
||||
|
||||
// Avoid the JS warnings "reference to undefined property"
|
||||
if (!aEvent.deltaX) {
|
||||
|
@ -342,9 +342,8 @@ function synthesizeTouchAtCenter(aTarget, aEvent, aWindow)
|
||||
*
|
||||
* aEvent is an object which may contain the properties:
|
||||
* shiftKey, ctrlKey, altKey, metaKey, accessKey, deltaX, deltaY, deltaZ,
|
||||
* deltaMode, lineOrPageDeltaX, lineOrPageDeltaY, isMomentum,
|
||||
* isNoLineOrPageDelta, isCustomizedByPrefs, expectedOverflowDeltaX,
|
||||
* expectedOverflowDeltaY
|
||||
* deltaMode, lineOrPageDeltaX, lineOrPageDeltaY, isMomentum, isPixelOnlyDevice,
|
||||
* isCustomizedByPrefs, expectedOverflowDeltaX, expectedOverflowDeltaY
|
||||
*
|
||||
* deltaMode must be defined, others are ok even if undefined.
|
||||
*
|
||||
@ -362,8 +361,9 @@ function synthesizeWheel(aTarget, aOffsetX, aOffsetY, aEvent, aWindow)
|
||||
|
||||
var modifiers = _parseModifiers(aEvent);
|
||||
var options = 0;
|
||||
if (aEvent.isNoLineOrPageDelta) {
|
||||
options |= utils.WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE;
|
||||
if (aEvent.isPixelOnlyDevice &&
|
||||
(aEvent.deltaMode == WheelEvent.DOM_DELTA_PIXEL)) {
|
||||
options |= utils.WHEEL_EVENT_CAUSED_BY_PIXEL_ONLY_DEVICE;
|
||||
}
|
||||
if (aEvent.isMomentum) {
|
||||
options |= utils.WHEEL_EVENT_CAUSED_BY_MOMENTUM;
|
||||
@ -389,7 +389,8 @@ function synthesizeWheel(aTarget, aOffsetX, aOffsetY, aEvent, aWindow)
|
||||
options |= utils.WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_NEGATIVE;
|
||||
}
|
||||
}
|
||||
var isNoLineOrPageDelta = aEvent.isNoLineOrPageDelta;
|
||||
var isPixelOnlyDevice =
|
||||
aEvent.isPixelOnlyDevice && aEvent.deltaMode == WheelEvent.DOM_DELTA_PIXEL;
|
||||
|
||||
// Avoid the JS warnings "reference to undefined property"
|
||||
if (!aEvent.deltaX) {
|
||||
|
@ -420,7 +420,7 @@ public:
|
||||
WidgetMouseEventBase(aIsTrusted, aMessage, aWidget, NS_WHEEL_EVENT),
|
||||
deltaX(0.0), deltaY(0.0), deltaZ(0.0),
|
||||
deltaMode(nsIDOMWheelEvent::DOM_DELTA_PIXEL),
|
||||
customizedByUserPrefs(false), isMomentum(false), mIsNoLineOrPageDelta(false),
|
||||
customizedByUserPrefs(false), isMomentum(false), isPixelOnlyDevice(false),
|
||||
lineOrPageDeltaX(0), lineOrPageDeltaY(0), scrollType(SCROLL_DEFAULT),
|
||||
overflowDeltaX(0.0), overflowDeltaY(0.0),
|
||||
mViewPortIsOverscrolled(false)
|
||||
@ -460,9 +460,9 @@ public:
|
||||
|
||||
// If device event handlers don't know when they should set lineOrPageDeltaX
|
||||
// and lineOrPageDeltaY, this is true. Otherwise, false.
|
||||
// If mIsNoLineOrPageDelta is true, ESM will generate NS_MOUSE_SCROLL events
|
||||
// when accumulated delta values reach a line height.
|
||||
bool mIsNoLineOrPageDelta;
|
||||
// If isPixelOnlyDevice is true, ESM will generate NS_MOUSE_SCROLL events
|
||||
// when accumulated pixel delta values reach a line height.
|
||||
bool isPixelOnlyDevice;
|
||||
|
||||
// If widget sets lineOrPageDelta, EventStateManager will dispatch
|
||||
// NS_MOUSE_SCROLL event for compatibility. Note that the delta value means
|
||||
@ -531,7 +531,7 @@ public:
|
||||
deltaMode = aEvent.deltaMode;
|
||||
customizedByUserPrefs = aEvent.customizedByUserPrefs;
|
||||
isMomentum = aEvent.isMomentum;
|
||||
mIsNoLineOrPageDelta = aEvent.mIsNoLineOrPageDelta;
|
||||
isPixelOnlyDevice = aEvent.isPixelOnlyDevice;
|
||||
lineOrPageDeltaX = aEvent.lineOrPageDeltaX;
|
||||
lineOrPageDeltaY = aEvent.lineOrPageDeltaY;
|
||||
scrollType = aEvent.scrollType;
|
||||
|
@ -141,7 +141,7 @@ struct ParamTraits<mozilla::WidgetWheelEvent>
|
||||
WriteParam(aMsg, aParam.deltaMode);
|
||||
WriteParam(aMsg, aParam.customizedByUserPrefs);
|
||||
WriteParam(aMsg, aParam.isMomentum);
|
||||
WriteParam(aMsg, aParam.mIsNoLineOrPageDelta);
|
||||
WriteParam(aMsg, aParam.isPixelOnlyDevice);
|
||||
WriteParam(aMsg, aParam.lineOrPageDeltaX);
|
||||
WriteParam(aMsg, aParam.lineOrPageDeltaY);
|
||||
WriteParam(aMsg, static_cast<int32_t>(aParam.scrollType));
|
||||
@ -161,7 +161,7 @@ struct ParamTraits<mozilla::WidgetWheelEvent>
|
||||
ReadParam(aMsg, aIter, &aResult->deltaMode) &&
|
||||
ReadParam(aMsg, aIter, &aResult->customizedByUserPrefs) &&
|
||||
ReadParam(aMsg, aIter, &aResult->isMomentum) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mIsNoLineOrPageDelta) &&
|
||||
ReadParam(aMsg, aIter, &aResult->isPixelOnlyDevice) &&
|
||||
ReadParam(aMsg, aIter, &aResult->lineOrPageDeltaX) &&
|
||||
ReadParam(aMsg, aIter, &aResult->lineOrPageDeltaY) &&
|
||||
ReadParam(aMsg, aIter, &scrollType) &&
|
||||
|
@ -576,7 +576,7 @@ nsWinGesture::PanDeltaToPixelScroll(WidgetWheelEvent& aWheelEvent)
|
||||
aWheelEvent.refPoint.y = mPanRefPoint.y;
|
||||
aWheelEvent.deltaMode = nsIDOMWheelEvent::DOM_DELTA_PIXEL;
|
||||
aWheelEvent.scrollType = WidgetWheelEvent::SCROLL_SYNCHRONOUSLY;
|
||||
aWheelEvent.mIsNoLineOrPageDelta = true;
|
||||
aWheelEvent.isPixelOnlyDevice = true;
|
||||
|
||||
aWheelEvent.overflowDeltaX = 0.0;
|
||||
aWheelEvent.overflowDeltaY = 0.0;
|
||||
|
Loading…
Reference in New Issue
Block a user