зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 3e2a441357ca (bug 1351148)
This commit is contained in:
Родитель
e34132948b
Коммит
9d71d0a026
|
@ -173,7 +173,6 @@ TabParent::TabParent(nsIContentParent* aManager,
|
|||
, mHasPresented(false)
|
||||
, mHasBeforeUnload(false)
|
||||
, mIsReadyToHandleInputEvents(false)
|
||||
, mIsMouseEnterIntoWidgetEventSuppressed(false)
|
||||
{
|
||||
MOZ_ASSERT(aManager);
|
||||
}
|
||||
|
@ -1093,7 +1092,7 @@ TabParent::SendKeyEvent(const nsAString& aType,
|
|||
void
|
||||
TabParent::SendRealMouseEvent(WidgetMouseEvent& aEvent)
|
||||
{
|
||||
if (mIsDestroyed) {
|
||||
if (mIsDestroyed || !mIsReadyToHandleInputEvents) {
|
||||
return;
|
||||
}
|
||||
aEvent.mRefPoint += GetChildProcessOffset();
|
||||
|
@ -1114,33 +1113,11 @@ TabParent::SendRealMouseEvent(WidgetMouseEvent& aEvent)
|
|||
mTabSetsCursor = false;
|
||||
}
|
||||
}
|
||||
if (!mIsReadyToHandleInputEvents) {
|
||||
if (eMouseEnterIntoWidget == aEvent.mMessage) {
|
||||
MOZ_ASSERT(!mIsMouseEnterIntoWidgetEventSuppressed);
|
||||
mIsMouseEnterIntoWidgetEventSuppressed = true;
|
||||
} else if (eMouseExitFromWidget == aEvent.mMessage) {
|
||||
MOZ_ASSERT(mIsMouseEnterIntoWidgetEventSuppressed);
|
||||
mIsMouseEnterIntoWidgetEventSuppressed = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
ScrollableLayerGuid guid;
|
||||
uint64_t blockId;
|
||||
ApzAwareEventRoutingToChild(&guid, &blockId, nullptr);
|
||||
|
||||
if (mIsMouseEnterIntoWidgetEventSuppressed) {
|
||||
// In the case that the TabParent suppressed the eMouseEnterWidget event due
|
||||
// to its corresponding TabChild wasn't ready to handle it, we have to
|
||||
// resend it when the TabChild is ready.
|
||||
mIsMouseEnterIntoWidgetEventSuppressed = false;
|
||||
WidgetMouseEvent localEvent(aEvent);
|
||||
localEvent.mMessage = eMouseEnterIntoWidget;
|
||||
DebugOnly<bool> ret = SendRealMouseButtonEvent(localEvent, guid, blockId);
|
||||
NS_WARNING_ASSERTION(ret, "SendRealMouseButtonEvent(eMouseEnterIntoWidget) failed");
|
||||
MOZ_ASSERT(!ret || localEvent.HasBeenPostedToRemoteProcess());
|
||||
}
|
||||
|
||||
if (eMouseMove == aEvent.mMessage) {
|
||||
if (aEvent.mReason == WidgetMouseEvent::eSynthesized) {
|
||||
DebugOnly<bool> ret = SendSynthMouseMoveEvent(aEvent, guid, blockId);
|
||||
|
|
|
@ -786,11 +786,6 @@ private:
|
|||
// True when the remote browser is created and ready to handle input events.
|
||||
bool mIsReadyToHandleInputEvents;
|
||||
|
||||
// True if we suppress the eMouseEnterIntoWidget event due to the TabChild was
|
||||
// not ready to handle it. We will resend it when the next time we fire a
|
||||
// mouse event and the TabChild is ready.
|
||||
bool mIsMouseEnterIntoWidgetEventSuppressed;
|
||||
|
||||
public:
|
||||
static TabParent* GetTabParentFromLayersId(uint64_t aLayersId);
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче