Bug 899745. Remove top most z-index tracking from views because it is unused. r=mats

This commit is contained in:
Timothy Nikkel 2013-07-30 16:10:28 -05:00
parent 42cdab715a
commit d173081945
5 changed files with 8 additions and 21 deletions

View File

@ -820,7 +820,7 @@ nsContainerFrame::SyncFrameViewProperties(nsPresContext* aPresContext,
}
}
vm->SetViewZIndex(aView, autoZIndex, zIndex, isPositioned);
vm->SetViewZIndex(aView, autoZIndex, zIndex);
}
static nscoord GetCoord(const nsStyleCoord& aCoord, nscoord aIfNotCoord)

View File

@ -35,11 +35,6 @@ enum nsViewVisibility {
// Indicates that the view is a floating view.
#define NS_VIEW_FLAG_FLOATING 0x0008
// If set it indicates that this view should be
// displayed above z-index:auto views if this view
// is z-index:auto also
#define NS_VIEW_FLAG_TOPMOST 0x0010
//----------------------------------------------------------------------
/**
@ -344,7 +339,7 @@ public:
* relative to the view's siblings.
* @param zindex new z depth
*/
void SetZIndex(bool aAuto, int32_t aZIndex, bool aTopMost);
void SetZIndex(bool aAuto, int32_t aZIndex);
bool GetZIndexIsAuto() const { return (mVFlags & NS_VIEW_FLAG_AUTO_ZINDEX) != 0; }
int32_t GetZIndex() const { return mZIndex; }
@ -435,9 +430,6 @@ private:
void InsertChild(nsView *aChild, nsView *aSibling);
void RemoveChild(nsView *aChild);
void SetTopMost(bool aTopMost) { aTopMost ? mVFlags |= NS_VIEW_FLAG_TOPMOST : mVFlags &= ~NS_VIEW_FLAG_TOPMOST; }
bool IsTopMost() { return((mVFlags & NS_VIEW_FLAG_TOPMOST) != 0); }
void ResetWidgetBounds(bool aRecurse, bool aForceSync);
void AssertNoWindow();

View File

@ -203,12 +203,8 @@ public:
* relative to the view's siblings.
* @param aView view to change z depth of
* @param aZindex explicit z depth
* @param aTopMost used when this view is z-index:auto to compare against
* other z-index:auto views.
* true if the view should be topmost when compared with
* other z-index:auto views.
*/
void SetViewZIndex(nsView *aView, bool aAutoZIndex, int32_t aZindex, bool aTopMost = false);
void SetViewZIndex(nsView *aView, bool aAutoZIndex, int32_t aZindex);
/**
* Set whether the view "floats" above all other views,

View File

@ -735,12 +735,11 @@ nsresult nsView::DetachFromTopLevelWidget()
return NS_OK;
}
void nsView::SetZIndex(bool aAuto, int32_t aZIndex, bool aTopMost)
void nsView::SetZIndex(bool aAuto, int32_t aZIndex)
{
bool oldIsAuto = GetZIndexIsAuto();
mVFlags = (mVFlags & ~NS_VIEW_FLAG_AUTO_ZINDEX) | (aAuto ? NS_VIEW_FLAG_AUTO_ZINDEX : 0);
mZIndex = aZIndex;
SetTopMost(aTopMost);
if (HasWidget() || !oldIsAuto || !aAuto) {
UpdateNativeWidgetZIndexes(this, FindNonAutoZIndex(this));

View File

@ -160,7 +160,7 @@ nsViewManager::SetRootView(nsView *aView)
InvalidateHierarchy();
}
mRootView->SetZIndex(false, 0, false);
mRootView->SetZIndex(false, 0);
}
// Else don't touch mRootViewManager
}
@ -862,7 +862,7 @@ nsViewManager::InsertChild(nsView *aParent, nsView *aChild, int32_t aZIndex)
{
// no-one really calls this with anything other than aZIndex == 0 on a fresh view
// XXX this method should simply be eliminated and its callers redirected to the real method
SetViewZIndex(aChild, false, aZIndex, false);
SetViewZIndex(aChild, false, aZIndex);
InsertChild(aParent, aChild, nullptr, true);
}
@ -941,7 +941,7 @@ bool nsViewManager::IsViewInserted(nsView *aView)
}
void
nsViewManager::SetViewZIndex(nsView *aView, bool aAutoZIndex, int32_t aZIndex, bool aTopMost)
nsViewManager::SetViewZIndex(nsView *aView, bool aAutoZIndex, int32_t aZIndex)
{
NS_ASSERTION((aView != nullptr), "no view");
@ -955,7 +955,7 @@ nsViewManager::SetViewZIndex(nsView *aView, bool aAutoZIndex, int32_t aZIndex, b
aZIndex = 0;
}
aView->SetZIndex(aAutoZIndex, aZIndex, aTopMost);
aView->SetZIndex(aAutoZIndex, aZIndex);
}
nsViewManager*