зеркало из https://github.com/mozilla/pjs.git
Bug 530880, r=bz, sr=roc
--HG-- extra : rebase_source : 4f1e95223fd0c167fa5ec882b46ae36f9edbb071
This commit is contained in:
Родитель
302d099b34
Коммит
a9ecd1c99c
|
@ -1900,6 +1900,8 @@ PresShell::Destroy()
|
||||||
mCurrentEventFrameStack[i] = nsnull;
|
mCurrentEventFrameStack[i] = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mFramesToDirty.Clear();
|
||||||
|
|
||||||
if (mViewManager) {
|
if (mViewManager) {
|
||||||
// Clear the view manager's weak pointer back to |this| in case it
|
// Clear the view manager's weak pointer back to |this| in case it
|
||||||
// was leaked.
|
// was leaked.
|
||||||
|
@ -2862,6 +2864,29 @@ PresShell::NotifyDestroyingFrame(nsIFrame* aFrame)
|
||||||
|
|
||||||
// Remove frame properties
|
// Remove frame properties
|
||||||
mPresContext->PropertyTable()->DeleteAllPropertiesFor(aFrame);
|
mPresContext->PropertyTable()->DeleteAllPropertiesFor(aFrame);
|
||||||
|
|
||||||
|
if (aFrame == mCurrentEventFrame) {
|
||||||
|
mCurrentEventContent = aFrame->GetContent();
|
||||||
|
mCurrentEventFrame = nsnull;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef NS_DEBUG
|
||||||
|
if (aFrame == mDrawEventTargetFrame) {
|
||||||
|
mDrawEventTargetFrame = nsnull;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
for (unsigned int i=0; i < mCurrentEventFrameStack.Length(); i++) {
|
||||||
|
if (aFrame == mCurrentEventFrameStack.ElementAt(i)) {
|
||||||
|
//One of our stack frames was deleted. Get its content so that when we
|
||||||
|
//pop it we can still get its new frame from its content
|
||||||
|
nsIContent *currentEventContent = aFrame->GetContent();
|
||||||
|
mCurrentEventContentStack.ReplaceObjectAt(currentEventContent, i);
|
||||||
|
mCurrentEventFrameStack[i] = nsnull;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mFramesToDirty.RemoveEntry(aFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -3633,29 +3658,6 @@ NS_IMETHODIMP
|
||||||
PresShell::ClearFrameRefs(nsIFrame* aFrame)
|
PresShell::ClearFrameRefs(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
mPresContext->EventStateManager()->ClearFrameRefs(aFrame);
|
mPresContext->EventStateManager()->ClearFrameRefs(aFrame);
|
||||||
|
|
||||||
if (aFrame == mCurrentEventFrame) {
|
|
||||||
mCurrentEventContent = aFrame->GetContent();
|
|
||||||
mCurrentEventFrame = nsnull;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
|
||||||
if (aFrame == mDrawEventTargetFrame) {
|
|
||||||
mDrawEventTargetFrame = nsnull;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (unsigned int i=0; i < mCurrentEventFrameStack.Length(); i++) {
|
|
||||||
if (aFrame == mCurrentEventFrameStack.ElementAt(i)) {
|
|
||||||
//One of our stack frames was deleted. Get its content so that when we
|
|
||||||
//pop it we can still get its new frame from its content
|
|
||||||
nsIContent *currentEventContent = aFrame->GetContent();
|
|
||||||
mCurrentEventContentStack.ReplaceObjectAt(currentEventContent, i);
|
|
||||||
mCurrentEventFrameStack[i] = nsnull;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mFramesToDirty.RemoveEntry(aFrame);
|
|
||||||
|
|
||||||
nsWeakFrame* weakFrame = mWeakFrames;
|
nsWeakFrame* weakFrame = mWeakFrames;
|
||||||
while (weakFrame) {
|
while (weakFrame) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче