mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1129774. Part 2: Remove nsBaseWidget::mContext. r=jmathies
--HG-- extra : rebase_source : ca7dcac5d203c2b41736cc58163a1f055593cf02
This commit is contained in:
parent
477b9ab40e
commit
b20e0a44bf
@ -118,7 +118,6 @@ nsAutoRollup::~nsAutoRollup()
|
||||
nsBaseWidget::nsBaseWidget()
|
||||
: mWidgetListener(nullptr)
|
||||
, mAttachedWidgetListener(nullptr)
|
||||
, mContext(nullptr)
|
||||
, mCompositorVsyncDispatcher(nullptr)
|
||||
, mCursor(eCursor_standard)
|
||||
, mUpdateCursor(true)
|
||||
@ -246,7 +245,6 @@ nsBaseWidget::~nsBaseWidget()
|
||||
printf("WIDGETS- = %d\n", gNumWidgets);
|
||||
#endif
|
||||
|
||||
NS_IF_RELEASE(mContext);
|
||||
delete mOriginalBounds;
|
||||
|
||||
// Can have base widgets that are things like tooltips which don't have CompositorVsyncDispatchers
|
||||
@ -274,16 +272,6 @@ void nsBaseWidget::BaseCreate(nsIWidget *aParent,
|
||||
}
|
||||
|
||||
// keep a reference to the device context
|
||||
if (aContext) {
|
||||
mContext = aContext;
|
||||
NS_ADDREF(mContext);
|
||||
}
|
||||
else {
|
||||
mContext = new nsDeviceContext();
|
||||
NS_ADDREF(mContext);
|
||||
mContext->Init(nullptr);
|
||||
}
|
||||
|
||||
if (nullptr != aInitData) {
|
||||
mWindowType = aInitData->mWindowType;
|
||||
mBorderStyle = aInitData->mBorderStyle;
|
||||
@ -366,14 +354,6 @@ nsBaseWidget::AttachViewToTopLevel(bool aUseAttachedEvents,
|
||||
|
||||
mUseAttachedEvents = aUseAttachedEvents;
|
||||
|
||||
if (aContext) {
|
||||
if (mContext) {
|
||||
NS_IF_RELEASE(mContext);
|
||||
}
|
||||
mContext = aContext;
|
||||
NS_ADDREF(mContext);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -1134,9 +1114,6 @@ TemporaryRef<mozilla::gfx::DrawTarget> nsBaseWidget::StartRemoteDrawing()
|
||||
//-------------------------------------------------------------------------
|
||||
void nsBaseWidget::OnDestroy()
|
||||
{
|
||||
// release references to device context and app shell
|
||||
NS_IF_RELEASE(mContext);
|
||||
|
||||
if (mTextEventDispatcher) {
|
||||
mTextEventDispatcher->OnDestroyWidget();
|
||||
// Don't release it until this widget actually released because after this
|
||||
|
@ -432,7 +432,6 @@ protected:
|
||||
|
||||
nsIWidgetListener* mWidgetListener;
|
||||
nsIWidgetListener* mAttachedWidgetListener;
|
||||
nsDeviceContext* mContext;
|
||||
nsRefPtr<LayerManager> mLayerManager;
|
||||
nsRefPtr<LayerManager> mBasicLayerManager;
|
||||
nsRefPtr<CompositorChild> mCompositorChild;
|
||||
|
Loading…
Reference in New Issue
Block a user