Bug 1129774. Part 2: Remove nsBaseWidget::mContext. r=jmathies

--HG--
extra : rebase_source : ca7dcac5d203c2b41736cc58163a1f055593cf02
This commit is contained in:
Robert O'Callahan 2015-02-05 17:54:45 +13:00
parent 477b9ab40e
commit b20e0a44bf
2 changed files with 0 additions and 24 deletions

View File

@ -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

View File

@ -432,7 +432,6 @@ protected:
nsIWidgetListener* mWidgetListener;
nsIWidgetListener* mAttachedWidgetListener;
nsDeviceContext* mContext;
nsRefPtr<LayerManager> mLayerManager;
nsRefPtr<LayerManager> mBasicLayerManager;
nsRefPtr<CompositorChild> mCompositorChild;