Backed out changeset 70d9a096070b (bug 1619187) for causing Gtest failures. CLOSED TREE

This commit is contained in:
Cosmin Sabou 2020-05-02 03:29:43 +03:00
Родитель 540b9db4a6
Коммит b9a814e53b
14 изменённых файлов: 74 добавлений и 299 удалений

Просмотреть файл

@ -1720,9 +1720,6 @@ APZEventResult APZCTreeManager::ReceiveInputEvent(InputData& aEvent) {
aEvent.mLayersId = hit.mLayersId;
hitResult = hit.mHitResult;
// We always handle pinch gestures as pinch zooms.
pinchInput.mHandledByAPZ = true;
if (hit.mTargetApzc) {
MOZ_ASSERT(hitResult != CompositorHitTestInvisibleToHit);

Просмотреть файл

@ -5026,11 +5026,6 @@ PanGestureBlockState* AsyncPanZoomController::GetCurrentPanGestureBlock()
return GetInputQueue()->GetCurrentPanGestureBlock();
}
PinchGestureBlockState* AsyncPanZoomController::GetCurrentPinchGestureBlock()
const {
return GetInputQueue()->GetCurrentPinchGestureBlock();
}
void AsyncPanZoomController::ResetTouchInputState() {
MultiTouchInput cancel(MultiTouchInput::MULTITOUCH_CANCEL, 0,
TimeStamp::Now(), 0);

Просмотреть файл

@ -1335,7 +1335,6 @@ class AsyncPanZoomController {
bool HasReadyTouchBlock() const;
PanGestureBlockState* GetCurrentPanGestureBlock() const;
PinchGestureBlockState* GetCurrentPinchGestureBlock() const;
private:
/* ===================================================================

Просмотреть файл

@ -579,47 +579,6 @@ void PanGestureBlockState::SetNeedsToWaitForContentResponse(
mWaitingForContentResponse = aWaitForContentResponse;
}
PinchGestureBlockState::PinchGestureBlockState(
const RefPtr<AsyncPanZoomController>& aTargetApzc,
TargetConfirmationFlags aFlags)
: CancelableBlockState(aTargetApzc, aFlags),
mInterrupted(false),
mWaitingForContentResponse(false) {}
bool PinchGestureBlockState::MustStayActive() { return true; }
const char* PinchGestureBlockState::Type() { return "pinch gesture"; }
bool PinchGestureBlockState::SetContentResponse(bool aPreventDefault) {
if (aPreventDefault) {
TBS_LOG("%p setting interrupted flag\n", this);
mInterrupted = true;
}
bool stateChanged = CancelableBlockState::SetContentResponse(aPreventDefault);
if (mWaitingForContentResponse) {
mWaitingForContentResponse = false;
stateChanged = true;
}
return stateChanged;
}
bool PinchGestureBlockState::HasReceivedAllContentNotifications() const {
return CancelableBlockState::HasReceivedAllContentNotifications() &&
!mWaitingForContentResponse;
}
bool PinchGestureBlockState::IsReadyForHandling() const {
if (!CancelableBlockState::IsReadyForHandling()) {
return false;
}
return !mWaitingForContentResponse || IsContentResponseTimerExpired();
}
void PinchGestureBlockState::SetNeedsToWaitForContentResponse(
bool aWaitForContentResponse) {
mWaitingForContentResponse = aWaitForContentResponse;
}
TouchBlockState::TouchBlockState(
const RefPtr<AsyncPanZoomController>& aTargetApzc,
TargetConfirmationFlags aFlags, TouchCounter& aCounter)

Просмотреть файл

@ -29,7 +29,6 @@ class TouchBlockState;
class WheelBlockState;
class DragBlockState;
class PanGestureBlockState;
class PinchGestureBlockState;
class KeyboardBlockState;
/**
@ -60,7 +59,6 @@ class InputBlockState : public RefCounted<InputBlockState> {
virtual WheelBlockState* AsWheelBlock() { return nullptr; }
virtual DragBlockState* AsDragBlock() { return nullptr; }
virtual PanGestureBlockState* AsPanGestureBlock() { return nullptr; }
virtual PinchGestureBlockState* AsPinchGestureBlock() { return nullptr; }
virtual KeyboardBlockState* AsKeyboardBlock() { return nullptr; }
virtual bool SetConfirmedTargetApzc(
@ -359,31 +357,6 @@ class PanGestureBlockState : public CancelableBlockState {
ScrollDirections mAllowedScrollDirections;
};
/**
* A single block of pinch gesture events.
*/
class PinchGestureBlockState : public CancelableBlockState {
public:
PinchGestureBlockState(const RefPtr<AsyncPanZoomController>& aTargetApzc,
TargetConfirmationFlags aFlags);
bool SetContentResponse(bool aPreventDefault) override;
bool HasReceivedAllContentNotifications() const override;
bool IsReadyForHandling() const override;
bool MustStayActive() override;
const char* Type() override;
PinchGestureBlockState* AsPinchGestureBlock() override { return this; }
bool WasInterrupted() const { return mInterrupted; }
void SetNeedsToWaitForContentResponse(bool aWaitForContentResponse);
private:
bool mInterrupted;
bool mWaitingForContentResponse;
};
/**
* This class represents a single touch block. A touch block is
* a set of touch events that can be cancelled by web content via

Просмотреть файл

@ -52,11 +52,6 @@ nsEventStatus InputQueue::ReceiveInputEvent(
return ReceivePanGestureInput(aTarget, aFlags, event, aOutInputBlockId);
}
case PINCHGESTURE_INPUT: {
const PinchGestureInput& event = aEvent.AsPinchGestureInput();
return ReceivePinchGestureInput(aTarget, aFlags, event, aOutInputBlockId);
}
case MOUSE_INPUT: {
const MouseInput& event = aEvent.AsMouseInput();
return ReceiveMouseInput(aTarget, aFlags, event, aOutInputBlockId);
@ -415,54 +410,6 @@ nsEventStatus InputQueue::ReceivePanGestureInput(
return result;
}
nsEventStatus InputQueue::ReceivePinchGestureInput(
const RefPtr<AsyncPanZoomController>& aTarget,
TargetConfirmationFlags aFlags, const PinchGestureInput& aEvent,
uint64_t* aOutInputBlockId) {
PinchGestureBlockState* block = nullptr;
if (aEvent.mType != PinchGestureInput::PINCHGESTURE_START) {
block = mActivePinchGestureBlock.get();
}
nsEventStatus result = nsEventStatus_eConsumeDoDefault;
if (!block || block->WasInterrupted()) {
if (aEvent.mType != PinchGestureInput::PINCHGESTURE_START) {
// Only PINCHGESTURE_START events are allowed to start a new pinch gesture
// block.
INPQ_LOG("pinchgesture block %p was interrupted %d\n", block,
block ? block->WasInterrupted() : 0);
return nsEventStatus_eConsumeDoDefault;
}
block = new PinchGestureBlockState(aTarget, aFlags);
INPQ_LOG("started new pinch gesture block %p id %" PRIu64
" for target %p\n",
block, block->GetBlockId(), aTarget.get());
mActivePinchGestureBlock = block;
block->SetNeedsToWaitForContentResponse(true);
CancelAnimationsForNewBlock(block);
MaybeRequestContentResponse(aTarget, block);
} else {
INPQ_LOG("received new event in block %p\n", block);
}
if (aOutInputBlockId) {
*aOutInputBlockId = block->GetBlockId();
}
// Note that the |aTarget| the APZCTM sent us may contradict the confirmed
// target set on the block. In this case the confirmed target (which may be
// null) should take priority. This is equivalent to just always using the
// target (confirmed or not) from the block, which is what
// ProcessQueue() does.
mQueuedInputs.AppendElement(MakeUnique<QueuedInput>(aEvent, *block));
ProcessQueue();
return result;
}
void InputQueue::CancelAnimationsForNewBlock(InputBlockState* aBlock,
CancelAnimationFlags aExtraFlags) {
// We want to cancel animations here as soon as possible (i.e. without waiting
@ -557,11 +504,6 @@ PanGestureBlockState* InputQueue::GetCurrentPanGestureBlock() const {
return block ? block->AsPanGestureBlock() : mActivePanGestureBlock.get();
}
PinchGestureBlockState* InputQueue::GetCurrentPinchGestureBlock() const {
InputBlockState* block = GetCurrentBlock();
return block ? block->AsPinchGestureBlock() : mActivePinchGestureBlock.get();
}
KeyboardBlockState* InputQueue::GetCurrentKeyboardBlock() const {
InputBlockState* block = GetCurrentBlock();
return block ? block->AsKeyboardBlock() : mActiveKeyboardBlock.get();
@ -654,9 +596,6 @@ InputBlockState* InputQueue::FindBlockForId(uint64_t aInputBlockId,
} else if (mActivePanGestureBlock &&
mActivePanGestureBlock->GetBlockId() == aInputBlockId) {
block = mActivePanGestureBlock.get();
} else if (mActivePinchGestureBlock &&
mActivePinchGestureBlock->GetBlockId() == aInputBlockId) {
block = mActivePinchGestureBlock.get();
} else if (mActiveKeyboardBlock &&
mActiveKeyboardBlock->GetBlockId() == aInputBlockId) {
block = mActiveKeyboardBlock.get();
@ -841,9 +780,6 @@ void InputQueue::ProcessQueue() {
if (CanDiscardBlock(mActivePanGestureBlock)) {
mActivePanGestureBlock = nullptr;
}
if (CanDiscardBlock(mActivePinchGestureBlock)) {
mActivePinchGestureBlock = nullptr;
}
if (CanDiscardBlock(mActiveKeyboardBlock)) {
mActiveKeyboardBlock = nullptr;
}
@ -879,7 +815,6 @@ void InputQueue::Clear() {
mActiveWheelBlock = nullptr;
mActiveDragBlock = nullptr;
mActivePanGestureBlock = nullptr;
mActivePinchGestureBlock = nullptr;
mActiveKeyboardBlock = nullptr;
mLastActiveApzc = nullptr;
}

Просмотреть файл

@ -31,7 +31,6 @@ class TouchBlockState;
class WheelBlockState;
class DragBlockState;
class PanGestureBlockState;
class PinchGestureBlockState;
class KeyboardBlockState;
class AsyncDragMetrics;
class QueuedInput;
@ -113,7 +112,6 @@ class InputQueue {
WheelBlockState* GetCurrentWheelBlock() const;
DragBlockState* GetCurrentDragBlock() const;
PanGestureBlockState* GetCurrentPanGestureBlock() const;
PinchGestureBlockState* GetCurrentPinchGestureBlock() const;
KeyboardBlockState* GetCurrentKeyboardBlock() const;
/**
* Returns true iff the pending block at the head of the queue is a touch
@ -191,10 +189,6 @@ class InputQueue {
const RefPtr<AsyncPanZoomController>& aTarget,
TargetConfirmationFlags aFlags, const PanGestureInput& aEvent,
uint64_t* aOutInputBlockId);
nsEventStatus ReceivePinchGestureInput(
const RefPtr<AsyncPanZoomController>& aTarget,
TargetConfirmationFlags aFlags, const PinchGestureInput& aEvent,
uint64_t* aOutInputBlockId);
nsEventStatus ReceiveKeyboardInput(
const RefPtr<AsyncPanZoomController>& aTarget,
const KeyboardInput& aEvent, uint64_t* aOutInputBlockId);
@ -231,7 +225,6 @@ class InputQueue {
RefPtr<WheelBlockState> mActiveWheelBlock;
RefPtr<DragBlockState> mActiveDragBlock;
RefPtr<PanGestureBlockState> mActivePanGestureBlock;
RefPtr<PinchGestureBlockState> mActivePinchGestureBlock;
RefPtr<KeyboardBlockState> mActiveKeyboardBlock;
// The APZC to which the last event was delivered

Просмотреть файл

@ -28,10 +28,6 @@ QueuedInput::QueuedInput(const PanGestureInput& aInput,
PanGestureBlockState& aBlock)
: mInput(MakeUnique<PanGestureInput>(aInput)), mBlock(&aBlock) {}
QueuedInput::QueuedInput(const PinchGestureInput& aInput,
PinchGestureBlockState& aBlock)
: mInput(MakeUnique<PinchGestureInput>(aInput)), mBlock(&aBlock) {}
QueuedInput::QueuedInput(const KeyboardInput& aInput,
KeyboardBlockState& aBlock)
: mInput(MakeUnique<KeyboardInput>(aInput)), mBlock(&aBlock) {}

Просмотреть файл

@ -39,7 +39,6 @@ class QueuedInput {
QueuedInput(const ScrollWheelInput& aInput, WheelBlockState& aBlock);
QueuedInput(const MouseInput& aInput, DragBlockState& aBlock);
QueuedInput(const PanGestureInput& aInput, PanGestureBlockState& aBlock);
QueuedInput(const PinchGestureInput& aInput, PinchGestureBlockState& aBlock);
QueuedInput(const KeyboardInput& aInput, KeyboardBlockState& aBlock);
InputData* Input();

Просмотреть файл

@ -537,9 +537,7 @@ ParentLayerPoint PanGestureInput::UserMultipliedLocalPanDisplacement() const {
}
PinchGestureInput::PinchGestureInput()
: InputData(PINCHGESTURE_INPUT),
mType(PINCHGESTURE_START),
mHandledByAPZ(false) {}
: InputData(PINCHGESTURE_INPUT), mType(PINCHGESTURE_START) {}
PinchGestureInput::PinchGestureInput(
PinchGestureType aType, uint32_t aTime, TimeStamp aTimeStamp,
@ -550,8 +548,7 @@ PinchGestureInput::PinchGestureInput(
mFocusPoint(aFocusPoint),
mScreenOffset(aScreenOffset),
mCurrentSpan(aCurrentSpan),
mPreviousSpan(aPreviousSpan),
mHandledByAPZ(false) {}
mPreviousSpan(aPreviousSpan) {}
bool PinchGestureInput::TransformToLocal(
const ScreenToParentLayerMatrix4x4& aTransform) {
@ -568,74 +565,6 @@ bool PinchGestureInput::TransformToLocal(
return true;
}
WidgetWheelEvent PinchGestureInput::ToWidgetWheelEvent(
nsIWidget* aWidget) const {
WidgetWheelEvent wheelEvent(true, eWheel, aWidget);
wheelEvent.mModifiers = this->modifiers | MODIFIER_CONTROL;
wheelEvent.mTime = mTime;
wheelEvent.mTimeStamp = mTimeStamp;
wheelEvent.mRefPoint = RoundedToInt(ViewAs<LayoutDevicePixel>(
mFocusPoint,
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
wheelEvent.mButtons = 0;
wheelEvent.mFlags.mHandledByAPZ = mHandledByAPZ;
wheelEvent.mDeltaMode = WheelEvent_Binding::DOM_DELTA_PIXEL;
#if defined(OS_MACOSX)
// This converts the pinch gesture value to a fake wheel event that has the
// control key pressed so that pages can implement custom pinch gesture
// handling. It may seem strange that this doesn't use a wheel event with
// the deltaZ property set, but this matches Chrome's behavior as described
// at https://code.google.com/p/chromium/issues/detail?id=289887
//
// The intent of the formula below is to produce numbers similar to Chrome's
// implementation of this feature. Chrome implements deltaY using the formula
// "-100 * log(1 + [event magnification])" which is unfortunately incorrect.
// All deltas for a single pinch gesture should sum to 0 if the start and end
// of a pinch gesture end up in the same place. This doesn't happen in Chrome
// because they followed Apple's misleading documentation, which implies that
// "1 + [event magnification]" is the scale factor. The scale factor is
// instead "pow(ratio, [event magnification])" so "[event magnification]" is
// already in log space.
//
// The multiplication by the backing scale factor below counteracts the
// division by the backing scale factor in WheelEvent.
// We want to set deltaY to |-100.0 * M * GetDefaultScaleInternal()| where M
// is [event magnification] but [event magnification] is only available in the
// macOS widget code so we have to reverse engineer from mCurrentSpan and
// mPreviousSpan (which are derived from [event magnification]) to get it.
// Specifically, we know |mCurrentSpan == 100.0| and |mPreviousSpan == 100.0 *
// (1.0 - M)|. We can calculate deltaY by solving the mPreviousSpan equation
// for M in terms of mPreviousSpan and plugging that into to the formula for
// deltaY.
wheelEvent.mDeltaY = (mPreviousSpan - 100.0) *
(aWidget ? aWidget->GetDefaultScaleInternal() : 1.f);
#else
// This calculation is based on what the Windows widget code does.
// Specifically, it creates a PinchGestureInput with |mCurrentSpan == 100.0 *
// currentScale| and |mPreviousSpan == 100.0 * lastScale| where currentScale
// is the scale from the current OS event and lastScale is the scale when the
// previous OS event happened. It then seems reasonable to calculate |M =
// currentScale / lastScale| and use the same formula as the macOS code
// (|-100.0 * M * GetDefaultScaleInternal()|).
// XXX When we write the code for other platforms to do the same we'll need to
// make sure this calculation is reasonable.
if (mPreviousSpan != 0.f) {
wheelEvent.mDeltaY = -100.0 * (mCurrentSpan / mPreviousSpan) *
(aWidget ? aWidget->GetDefaultScaleInternal() : 1.f);
} else {
// Not sure what makes sense here, this seems reasonable.
wheelEvent.mDeltaY = -100.0 * mCurrentSpan *
(aWidget ? aWidget->GetDefaultScaleInternal() : 1.f);
}
#endif
return wheelEvent;
}
TapGestureInput::TapGestureInput()
: InputData(TAPGESTURE_INPUT), mType(TAPGESTURE_LONG) {}

Просмотреть файл

@ -452,8 +452,6 @@ class PinchGestureInput : public InputData {
bool TransformToLocal(const ScreenToParentLayerMatrix4x4& aTransform);
WidgetWheelEvent ToWidgetWheelEvent(nsIWidget* aWidget) const;
// Warning, this class is serialized and sent over IPC. Any change to its
// fields must be reflected in its ParamTraits<>, in nsGUIEventIPC.h
PinchGestureType mType;
@ -484,8 +482,6 @@ class PinchGestureInput : public InputData {
// of this type then there must have been a history of spans.
ScreenCoord mPreviousSpan;
bool mHandledByAPZ;
// A special value for mFocusPoint used in PINCHGESTURE_END events to
// indicate that both fingers have been lifted. If only one finger has
// been lifted, the coordinates of the remaining finger are expected to

Просмотреть файл

@ -2049,23 +2049,10 @@ void nsChildView::ReportSwipeStarted(uint64_t aInputBlockId, bool aStartSwipe) {
}
nsEventStatus nsChildView::DispatchAPZInputEvent(InputData& aEvent) {
APZEventResult result;
if (mAPZC) {
result = mAPZC->InputBridge()->ReceiveInputEvent(aEvent);
return mAPZC->InputBridge()->ReceiveInputEvent(aEvent).mStatus;
}
if (result.mStatus == nsEventStatus_eConsumeNoDefault) {
return result.mStatus;
}
if (aEvent.mInputType == PINCHGESTURE_INPUT) {
PinchGestureInput& pinchEvent = aEvent.AsPinchGestureInput();
WidgetWheelEvent wheelEvent = pinchEvent.ToWidgetWheelEvent(this);
ProcessUntransformedAPZEvent(&wheelEvent, result);
}
return result.mStatus;
return nsEventStatus_eIgnore;
}
void nsChildView::DispatchAPZWheelInputEvent(InputData& aEvent, bool aCanTriggerSwipe) {
@ -2804,53 +2791,53 @@ NSEvent* gLastDragMouseDownEvent = nil; // [strong]
return;
}
NSPoint locationInWindow = nsCocoaUtils::EventLocationForWindow(anEvent, [self window]);
ScreenPoint position =
ViewAs<ScreenPixel>([self convertWindowCoordinatesRoundDown:locationInWindow],
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent);
ExternalPoint screenOffset =
ViewAs<ExternalPixel>(mGeckoChild->WidgetToScreenOffset(),
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent);
PRIntervalTime eventIntervalTime = PR_IntervalNow();
TimeStamp eventTimeStamp = nsCocoaUtils::GetEventTimeStamp([anEvent timestamp]);
NSEventPhase eventPhase = [anEvent phase];
PinchGestureInput::PinchGestureType pinchGestureType;
switch (eventPhase) {
case NSEventPhaseBegan: {
pinchGestureType = PinchGestureInput::PINCHGESTURE_START;
break;
}
case NSEventPhaseChanged: {
pinchGestureType = PinchGestureInput::PINCHGESTURE_SCALE;
break;
}
case NSEventPhaseEnded: {
pinchGestureType = PinchGestureInput::PINCHGESTURE_END;
break;
}
default: {
NS_WARNING("Unexpected phase for pinch gesture event.");
return;
}
}
PinchGestureInput event{pinchGestureType,
eventIntervalTime,
eventTimeStamp,
screenOffset,
position,
100.0,
100.0 * (1.0 - [anEvent magnification]),
nsCocoaUtils::ModifiersForEvent(anEvent)};
if (pinchGestureType == PinchGestureInput::PINCHGESTURE_END) {
event.mFocusPoint = PinchGestureInput::BothFingersLifted<ScreenPixel>();
}
// FIXME: bug 1525793 -- this may need to handle zooming or not on a per-document basis.
if (StaticPrefs::apz_allow_zooming()) {
NSPoint locationInWindow = nsCocoaUtils::EventLocationForWindow(anEvent, [self window]);
ScreenPoint position =
ViewAs<ScreenPixel>([self convertWindowCoordinatesRoundDown:locationInWindow],
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent);
ExternalPoint screenOffset =
ViewAs<ExternalPixel>(mGeckoChild->WidgetToScreenOffset(),
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent);
PRIntervalTime eventIntervalTime = PR_IntervalNow();
TimeStamp eventTimeStamp = nsCocoaUtils::GetEventTimeStamp([anEvent timestamp]);
NSEventPhase eventPhase = [anEvent phase];
PinchGestureInput::PinchGestureType pinchGestureType;
switch (eventPhase) {
case NSEventPhaseBegan: {
pinchGestureType = PinchGestureInput::PINCHGESTURE_START;
break;
}
case NSEventPhaseChanged: {
pinchGestureType = PinchGestureInput::PINCHGESTURE_SCALE;
break;
}
case NSEventPhaseEnded: {
pinchGestureType = PinchGestureInput::PINCHGESTURE_END;
break;
}
default: {
NS_WARNING("Unexpected phase for pinch gesture event.");
return;
}
}
PinchGestureInput event{pinchGestureType,
eventIntervalTime,
eventTimeStamp,
screenOffset,
position,
100.0,
100.0 * (1.0 - [anEvent magnification]),
nsCocoaUtils::ModifiersForEvent(anEvent)};
if (pinchGestureType == PinchGestureInput::PINCHGESTURE_END) {
event.mFocusPoint = PinchGestureInput::BothFingersLifted<ScreenPixel>();
}
mGeckoChild->DispatchAPZInputEvent(event);
} else {
if (!anEvent || [self beginOrEndGestureForEventPhase:anEvent]) {
@ -2878,10 +2865,29 @@ NSEvent* gLastDragMouseDownEvent = nil; // [strong]
return;
}
// See PinchGestureInput::ToWidgetWheelEvent for a lengthy explanation of the values we put into
// the WidgetWheelEvent that used to be here.
WidgetWheelEvent geckoWheelEvent(event.ToWidgetWheelEvent(mGeckoChild));
// This sends the pinch gesture value as a fake wheel event that has the
// control key pressed so that pages can implement custom pinch gesture
// handling. It may seem strange that this doesn't use a wheel event with
// the deltaZ property set, but this matches Chrome's behavior as described
// at https://code.google.com/p/chromium/issues/detail?id=289887
//
// The intent of the formula below is to produce numbers similar to Chrome's
// implementation of this feature. Chrome implements deltaY using the formula
// "-100 * log(1 + [event magnification])" which is unfortunately incorrect.
// All deltas for a single pinch gesture should sum to 0 if the start and end
// of a pinch gesture end up in the same place. This doesn't happen in Chrome
// because they followed Apple's misleading documentation, which implies that
// "1 + [event magnification]" is the scale factor. The scale factor is
// instead "pow(ratio, [event magnification])" so "[event magnification]" is
// already in log space.
//
// The multiplication by the backing scale factor below counteracts the
// division by the backing scale factor in WheelEvent.
WidgetWheelEvent geckoWheelEvent(true, EventMessage::eWheel, mGeckoChild);
[self convertCocoaMouseEvent:anEvent toGeckoEvent:&geckoWheelEvent];
double backingScale = mGeckoChild->BackingScaleFactor();
geckoWheelEvent.mDeltaY = -100.0 * [anEvent magnification] * backingScale;
geckoWheelEvent.mModifiers |= MODIFIER_CONTROL;
mGeckoChild->DispatchWindowEvent(geckoWheelEvent);
// If the fake wheel event wasn't stopped, then send a normal magnify event.

Просмотреть файл

@ -1297,7 +1297,6 @@ struct ParamTraits<mozilla::PinchGestureInput> {
WriteParam(aMsg, aParam.mLocalFocusPoint);
WriteParam(aMsg, aParam.mCurrentSpan);
WriteParam(aMsg, aParam.mPreviousSpan);
WriteParam(aMsg, aParam.mHandledByAPZ);
}
static bool Read(const Message* aMsg, PickleIterator* aIter,
@ -1308,8 +1307,7 @@ struct ParamTraits<mozilla::PinchGestureInput> {
ReadParam(aMsg, aIter, &aResult->mFocusPoint) &&
ReadParam(aMsg, aIter, &aResult->mLocalFocusPoint) &&
ReadParam(aMsg, aIter, &aResult->mCurrentSpan) &&
ReadParam(aMsg, aIter, &aResult->mPreviousSpan) &&
ReadParam(aMsg, aIter, &aResult->mHandledByAPZ);
ReadParam(aMsg, aIter, &aResult->mPreviousSpan);
}
};

Просмотреть файл

@ -2155,13 +2155,13 @@ class nsIWidget : public nsISupports {
static already_AddRefed<nsIBidiKeyboard> CreateBidiKeyboard();
protected:
/**
* Like GetDefaultScale, but taking into account only the system settings
* and ignoring Gecko preferences.
*/
virtual double GetDefaultScaleInternal() { return 1.0; }
protected:
// keep the list of children. We also keep track of our siblings.
// The ownership model is as follows: parent holds a strong ref to
// the first element of the list, and each element holds a strong