author | Timothy Nikkel <tnikkel@gmail.com> |
Tue, 30 Jul 2013 16:10:28 -0500 | |
changeset 140580 | 19f2120fc829dc092dbf16d7b1366398ae92a9de |
parent 140579 | eb89f19070ae9b03bac5c7e1c0f7c26e4e058817 |
child 140581 | e1987b49fdb4b690f10259e6fff0ff1e2f5d792c |
push id | 31807 |
push user | tnikkel@gmail.com |
push date | Tue, 30 Jul 2013 21:10:57 +0000 |
treeherder | mozilla-inbound@d1606467afd4 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mats |
bugs | 899745 |
milestone | 25.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -815,17 +815,17 @@ nsContainerFrame::SyncFrameViewPropertie if (position->mZIndex.GetUnit() == eStyleUnit_Integer) { zIndex = position->mZIndex.GetIntValue(); } else if (position->mZIndex.GetUnit() == eStyleUnit_Auto) { autoZIndex = true; } } - vm->SetViewZIndex(aView, autoZIndex, zIndex, isPositioned); + vm->SetViewZIndex(aView, autoZIndex, zIndex); } static nscoord GetCoord(const nsStyleCoord& aCoord, nscoord aIfNotCoord) { if (aCoord.ConvertsToLength()) { return nsRuleNode::ComputeCoordPercentCalc(aCoord, 0); } return aIfNotCoord;
--- a/view/public/nsView.h +++ b/view/public/nsView.h @@ -30,21 +30,16 @@ enum nsViewVisibility { // Public view flags // Indicates that the view is using auto z-indexing #define NS_VIEW_FLAG_AUTO_ZINDEX 0x0004 // 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 - //---------------------------------------------------------------------- /** * View interface * * Views are NOT reference counted. Use the Destroy() member function to * destroy a view. * @@ -339,17 +334,17 @@ public: * Called to indicate that the z-index of a view has been changed. * The z-index is relative to all siblings of the view. * @param aAuto Indicate that the z-index of a view is "auto". An "auto" z-index * means that the view does not define a new stacking context, * which means that the z-indicies of the view's children are * 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; } void SetParent(nsView *aParent) { mParent = aParent; } void SetNextSibling(nsView *aSibling) { NS_ASSERTION(aSibling != this, "Can't be our own sibling!"); mNextSibling = aSibling; @@ -430,19 +425,16 @@ private: bool HasNonEmptyDirtyRegion() { return mDirtyRegion && !mDirtyRegion->IsEmpty(); } 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(); void NotifyEffectiveVisibilityChanged(bool aEffectivelyVisible); // Update the cached RootViewManager for all view manager descendents, // If the hierarchy is being removed, aViewManagerParent points to the view // manager for the hierarchy's old parent, and will have its mouse grab
--- a/view/public/nsViewManager.h +++ b/view/public/nsViewManager.h @@ -198,22 +198,18 @@ public: * view is below its parent. * The view manager generates the appropriate dirty regions. * @param aAutoZIndex indicate that the z-index of a view is "auto". An "auto" z-index * means that the view does not define a new stacking context, * which means that the z-indicies of the view's children are * 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, * which tells the compositor not to consider higher views in * the view hierarchy that would geometrically intersect with * this view. This is a hack, but it fixes some problems with * views that need to be drawn in front of all other views. */
--- a/view/src/nsView.cpp +++ b/view/src/nsView.cpp @@ -730,22 +730,21 @@ nsresult nsView::DetachFromTopLevelWidge mWindow->SetAttachedWidgetListener(nullptr); NS_RELEASE(mWindow); mWidgetIsTopLevel = false; 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)); } } void nsView::AssertNoWindow() {
--- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -155,17 +155,17 @@ nsViewManager::SetRootView(nsView *aView if (parent) { // Calling InsertChild on |parent| will InvalidateHierarchy() on us, so // no need to set mRootViewManager ourselves here. parent->InsertChild(mRootView, nullptr); } else { InvalidateHierarchy(); } - mRootView->SetZIndex(false, 0, false); + mRootView->SetZIndex(false, 0); } // Else don't touch mRootViewManager } void nsViewManager::GetWindowDimensions(nscoord *aWidth, nscoord *aHeight) { if (nullptr != mRootView) { @@ -857,17 +857,17 @@ nsViewManager::InsertChild(nsView *aPare } } void 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); } void nsViewManager::RemoveChild(nsView *aChild) { NS_ASSERTION(aChild, "aChild must not be null"); @@ -936,31 +936,31 @@ bool nsViewManager::IsViewInserted(nsVie } view = view->GetNextSibling(); } return false; } } 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"); // don't allow the root view's z-index to be changed. It should always be zero. // This could be removed and replaced with a style rule, or just removed altogether, with interesting consequences if (aView == mRootView) { return; } if (aAutoZIndex) { aZIndex = 0; } - aView->SetZIndex(aAutoZIndex, aZIndex, aTopMost); + aView->SetZIndex(aAutoZIndex, aZIndex); } nsViewManager* nsViewManager::IncrementDisableRefreshCount() { if (!IsRootVM()) { return RootViewManager()->IncrementDisableRefreshCount(); }