Loading layout/base/PresShell.cpp +13 −9 Original line number Diff line number Diff line Loading @@ -8472,18 +8472,22 @@ void PresShell::EventHandler::MaybeHandleKeyboardEventBeforeDispatch( } } nsCOMPtr<Document> pointerLockedDoc = PointerLockManager::GetLockedDocument(); if (!mPresShell->mIsLastChromeOnlyEscapeKeyConsumed && pointerLockedDoc) { if (XRE_IsParentProcess() && !mPresShell->mIsLastChromeOnlyEscapeKeyConsumed) { if (PointerLockManager::GetLockedRemoteTarget() || PointerLockManager::IsLocked()) { // XXX See above comment to understand the reason why this needs // to claim that the Escape key event is consumed by content // even though it will be dispatched only into chrome. aKeyboardEvent->PreventDefaultBeforeDispatch(CrossProcessForwarding::eStop); aKeyboardEvent->PreventDefaultBeforeDispatch( CrossProcessForwarding::eStop); aKeyboardEvent->mFlags.mOnlyChromeDispatch = true; if (aKeyboardEvent->mMessage == eKeyUp) { PointerLockManager::Unlock(); } } } } void PresShell::EventHandler::RecordEventPreparationPerformance( const WidgetEvent* aEvent) { Loading Loading
layout/base/PresShell.cpp +13 −9 Original line number Diff line number Diff line Loading @@ -8472,18 +8472,22 @@ void PresShell::EventHandler::MaybeHandleKeyboardEventBeforeDispatch( } } nsCOMPtr<Document> pointerLockedDoc = PointerLockManager::GetLockedDocument(); if (!mPresShell->mIsLastChromeOnlyEscapeKeyConsumed && pointerLockedDoc) { if (XRE_IsParentProcess() && !mPresShell->mIsLastChromeOnlyEscapeKeyConsumed) { if (PointerLockManager::GetLockedRemoteTarget() || PointerLockManager::IsLocked()) { // XXX See above comment to understand the reason why this needs // to claim that the Escape key event is consumed by content // even though it will be dispatched only into chrome. aKeyboardEvent->PreventDefaultBeforeDispatch(CrossProcessForwarding::eStop); aKeyboardEvent->PreventDefaultBeforeDispatch( CrossProcessForwarding::eStop); aKeyboardEvent->mFlags.mOnlyChromeDispatch = true; if (aKeyboardEvent->mMessage == eKeyUp) { PointerLockManager::Unlock(); } } } } void PresShell::EventHandler::RecordEventPreparationPerformance( const WidgetEvent* aEvent) { Loading