diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-08-18 16:25:15 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-08-18 16:26:16 +0200 |
commit | 202296d02aa99afa90581333ab059c050b9c3ade (patch) | |
tree | 6ed8a1289bed1bb06d2703ea77cba5fccd3bdffa /layout/base/nsPresShell.cpp | |
parent | 1530f48c27fb13d7cbd2708c9f0fcf2dabc6ed6a (diff) | |
parent | ab6242a93b849b0a3c7525b16bc01dd3172fc167 (diff) | |
download | UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.gz UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.lz UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.xz UXP-202296d02aa99afa90581333ab059c050b9c3ade.zip |
Pull Basilisk-release forward.
Diffstat (limited to 'layout/base/nsPresShell.cpp')
-rw-r--r-- | layout/base/nsPresShell.cpp | 47 |
1 files changed, 14 insertions, 33 deletions
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index d4fbebbf2..264b52b18 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -1306,19 +1306,6 @@ PresShell::Destroy() // Destroy the frame manager. This will destroy the frame hierarchy mFrameConstructor->WillDestroyFrameTree(); - // Destroy all frame properties (whose destruction was suppressed - // while destroying the frame tree, but which might contain more - // frames within the properties. - if (mPresContext) { - // Clear out the prescontext's property table -- since our frame tree is - // now dead, we shouldn't be looking up any more properties in that table. - // We want to do this before we call DetachShell() on the prescontext, so - // property destructors can usefully call GetPresShell() on the - // prescontext. - mPresContext->PropertyTable()->DeleteAll(); - } - - NS_WARNING_ASSERTION(!mWeakFrames, "Weak frames alive after destroying FrameManager"); while (mWeakFrames) { @@ -2047,7 +2034,7 @@ PresShell::NotifyDestroyingFrame(nsIFrame* aFrame) } // Remove frame properties - mPresContext->NotifyDestroyingFrame(aFrame); + aFrame->DeleteAllProperties(); if (aFrame == mCurrentEventFrame) { mCurrentEventContent = aFrame->GetContent(); @@ -2076,8 +2063,7 @@ PresShell::NotifyDestroyingFrame(nsIFrame* aFrame) // frame from FrameLayerBuilder::DisplayItemData::mFrameList -- otherwise // the DisplayItemData destructor will use the destroyed frame when it // tries to remove it from the (array) value of this property. - mPresContext->PropertyTable()-> - Delete(aFrame, FrameLayerBuilder::LayerManagerDataProperty()); + aFrame->DeleteProperty( FrameLayerBuilder::LayerManagerDataProperty()); } } @@ -8192,9 +8178,6 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent, } } } - if (aEvent->mMessage == eKeyDown) { - mIsLastKeyDownCanceled = aEvent->mFlags.mDefaultPrevented; - } break; } case eMouseUp: @@ -8984,9 +8967,6 @@ PresShell::FireOrClearDelayedEvents(bool aFireEvents) !doc->EventHandlingSuppressed()) { nsAutoPtr<DelayedEvent> ev(mDelayedEvents[0].forget()); mDelayedEvents.RemoveElementAt(0); - if (ev->IsKeyPressEvent() && mIsLastKeyDownCanceled) { - continue; - } ev->Dispatch(); } if (!doc->EventHandlingSuppressed()) { @@ -9781,12 +9761,6 @@ PresShell::DelayedKeyEvent::DelayedKeyEvent(WidgetKeyboardEvent* aEvent) : mEvent = keyEvent; } -bool -PresShell::DelayedKeyEvent::IsKeyPressEvent() -{ - return mEvent->mMessage == eKeyPress; -} - // Start of DEBUG only code #ifdef DEBUG @@ -10929,11 +10903,12 @@ PresShell::GetRootPresShell() void PresShell::AddSizeOfIncludingThis(MallocSizeOf aMallocSizeOf, - nsArenaMemoryStats *aArenaObjectsSize, - size_t *aPresShellSize, - size_t *aStyleSetsSize, - size_t *aTextRunsSize, - size_t *aPresContextSize) + nsArenaMemoryStats* aArenaObjectsSize, + size_t* aPresShellSize, + size_t* aStyleSetsSize, + size_t* aTextRunsSize, + size_t* aPresContextSize, + size_t* aFramePropertiesSize) { mFrameArena.AddSizeOfExcludingThis(aMallocSizeOf, aArenaObjectsSize); *aPresShellSize += aMallocSizeOf(this); @@ -10953,6 +10928,12 @@ PresShell::AddSizeOfIncludingThis(MallocSizeOf aMallocSizeOf, *aTextRunsSize += SizeOfTextRuns(aMallocSizeOf); *aPresContextSize += mPresContext->SizeOfIncludingThis(aMallocSizeOf); + + nsIFrame* rootFrame = mFrameConstructor->GetRootFrame(); + if (rootFrame) { + *aFramePropertiesSize += + rootFrame->SizeOfFramePropertiesForTree(aMallocSizeOf); + } } size_t |