зеркало из https://github.com/mozilla/gecko-dev.git
Bug 594271. Don't send synth mouse moves to hidden documents. r=dbaron a=dbaron
This commit is contained in:
Родитель
b18c3838c6
Коммит
a5e4490b95
|
@ -7932,9 +7932,7 @@ nsCSSFrameConstructor::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
|
|||
didInvalidate = PR_TRUE;
|
||||
}
|
||||
if (hint & nsChangeHint_UpdateCursor) {
|
||||
nsIViewManager* viewMgr = mPresShell->GetViewManager();
|
||||
if (viewMgr)
|
||||
viewMgr->SynthesizeMouseMove(PR_FALSE);
|
||||
mPresShell->SynthesizeMouseMove(PR_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,8 +139,8 @@ typedef struct CapturingContentInfo {
|
|||
} CapturingContentInfo;
|
||||
|
||||
#define NS_IPRESSHELL_IID \
|
||||
{ 0xe63a350c, 0x4e04, 0x4056, \
|
||||
{ 0x8d, 0xa0, 0x51, 0xcc, 0x55, 0x68, 0x68, 0x42 } }
|
||||
{ 0x28d10cd2, 0x90a9, 0x4416, \
|
||||
{ 0x8e, 0x88, 0x2a, 0xe3, 0x3d, 0xb1, 0x73, 0xd4 } }
|
||||
|
||||
// Constants for ScrollContentIntoView() function
|
||||
#define NS_PRESSHELL_SCROLL_TOP 0
|
||||
|
@ -1053,6 +1053,13 @@ public:
|
|||
*/
|
||||
virtual LayerManager* GetLayerManager() = 0;
|
||||
|
||||
/**
|
||||
* Dispatch a mouse move event based on the most recent mouse position if
|
||||
* this PresShell is visible. This is used when the contents of the page
|
||||
* moved (aFromScroll is false) or scrolled (aFromScroll is true).
|
||||
*/
|
||||
virtual void SynthesizeMouseMove(PRBool aFromScroll) = 0;
|
||||
|
||||
/**
|
||||
* Refresh observer management.
|
||||
*/
|
||||
|
|
|
@ -815,6 +815,8 @@ public:
|
|||
|
||||
virtual LayerManager* GetLayerManager();
|
||||
|
||||
virtual void SynthesizeMouseMove(PRBool aFromScroll);
|
||||
|
||||
//nsIViewObserver interface
|
||||
|
||||
NS_IMETHOD Paint(nsIView* aDisplayRoot,
|
||||
|
@ -4557,8 +4559,8 @@ PresShell::UnsuppressAndInvalidate()
|
|||
if (win)
|
||||
win->SetReadyForFocus();
|
||||
|
||||
if (!mHaveShutDown && mViewManager)
|
||||
mViewManager->SynthesizeMouseMove(PR_FALSE);
|
||||
if (!mHaveShutDown)
|
||||
SynthesizeMouseMove(PR_FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -5861,6 +5863,13 @@ LayerManager* PresShell::GetLayerManager()
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
void PresShell::SynthesizeMouseMove(PRBool aFromScroll)
|
||||
{
|
||||
if (mViewManager && !mPaintingSuppressed && mIsActive) {
|
||||
mViewManager->SynthesizeMouseMove(aFromScroll);
|
||||
}
|
||||
}
|
||||
|
||||
static void DrawThebesLayer(ThebesLayer* aLayer,
|
||||
gfxContext* aContext,
|
||||
const nsIntRegion& aRegionToDraw,
|
||||
|
@ -7434,10 +7443,7 @@ PresShell::DidDoReflow(PRBool aInterruptible)
|
|||
mFrameConstructor->EndUpdate();
|
||||
|
||||
HandlePostedReflowCallbacks(aInterruptible);
|
||||
// Null-check mViewManager in case this happens during Destroy. See
|
||||
// bugs 244435 and 238546.
|
||||
if (!mPaintingSuppressed && mViewManager)
|
||||
mViewManager->SynthesizeMouseMove(PR_FALSE);
|
||||
SynthesizeMouseMove(PR_FALSE);
|
||||
if (mCaret) {
|
||||
// Update the caret's position now to account for any changes created by
|
||||
// the reflow.
|
||||
|
|
|
@ -1696,7 +1696,7 @@ nsGfxScrollFrameInner::ScrollToImpl(nsPoint aPt)
|
|||
// We pass in the amount to move visually
|
||||
ScrollVisual(curPosDevPx - ptDevPx);
|
||||
|
||||
presContext->PresShell()->GetViewManager()->SynthesizeMouseMove(PR_TRUE);
|
||||
presContext->PresShell()->SynthesizeMouseMove(PR_TRUE);
|
||||
UpdateScrollbarPosition();
|
||||
PostScrollEvent();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче