diff --git a/view/src/nsScrollPortView.cpp b/view/src/nsScrollPortView.cpp index 742053adb04..c266880d8b1 100644 --- a/view/src/nsScrollPortView.cpp +++ b/view/src/nsScrollPortView.cpp @@ -495,9 +495,7 @@ NS_IMETHODIMP nsScrollPortView::ScrollByWhole(PRBool aTop) PRBool nsScrollPortView::CannotBitBlt(nsView* aScrolledView) { - PRUint32 scrolledViewFlags; - - aScrolledView->GetViewFlags(&scrolledViewFlags); + PRUint32 scrolledViewFlags = aScrolledView->GetViewFlags(); return (mScrollProperties & NS_SCROLL_PROPERTY_NEVER_BLIT) || (scrolledViewFlags & NS_VIEW_FLAG_DONT_BITBLT) || diff --git a/view/src/nsScrollingView.cpp b/view/src/nsScrollingView.cpp index b8f61af9ed3..c35e1e8a0af 100644 --- a/view/src/nsScrollingView.cpp +++ b/view/src/nsScrollingView.cpp @@ -1679,9 +1679,7 @@ NS_IMETHODIMP nsScrollingView::ScrollByWhole(PRBool aTop) PRBool nsScrollingView::CannotBitBlt(nsView* aScrolledView) { - PRUint32 scrolledViewFlags; - - aScrolledView->GetViewFlags(&scrolledViewFlags); + PRUint32 scrolledViewFlags = aScrolledView->GetViewFlags(); return (mScrollProperties & NS_SCROLL_PROPERTY_NEVER_BLIT) || (scrolledViewFlags & NS_VIEW_FLAG_DONT_BITBLT) || diff --git a/view/src/nsView.cpp b/view/src/nsView.cpp index ea785eb1a29..d60db0a81f7 100644 --- a/view/src/nsView.cpp +++ b/view/src/nsView.cpp @@ -910,24 +910,6 @@ NS_IMETHODIMP nsView::List(FILE* out, PRInt32 aIndent) const return NS_OK; } -NS_IMETHODIMP nsView::SetViewFlags(PRUint32 aFlags) -{ - mVFlags |= aFlags; - return NS_OK; -} - -NS_IMETHODIMP nsView::ClearViewFlags(PRUint32 aFlags) -{ - mVFlags &= ~aFlags; - return NS_OK; -} - -NS_IMETHODIMP nsView::GetViewFlags(PRUint32 *aFlags) const -{ - *aFlags = mVFlags; - return NS_OK; -} - NS_IMETHODIMP nsView::GetOffsetFromWidget(nscoord *aDx, nscoord *aDy, nsIWidget *&aWidget) { nsView *ancestor = GetParent(); @@ -1044,9 +1026,7 @@ NS_IMETHODIMP nsView::GetClippedRect(nsRect& aClippedRect, PRBool& aIsClipped, P // Walk all of the way up the views to see if any // ancestor sets the NS_VIEW_PUBLIC_FLAG_CLIPCHILDREN while (parentView) { - PRUint32 flags; - parentView->GetViewFlags(&flags); - if (flags & NS_VIEW_FLAG_CLIPCHILDREN) { + if ((parentView->GetViewFlags() & NS_VIEW_FLAG_CLIPCHILDREN) != 0) { aIsClipped = PR_TRUE; // Adjust for clip specified by ancestor nscoord clipLeft; diff --git a/view/src/nsView.h b/view/src/nsView.h index 79a205cba09..3916f8c52d0 100644 --- a/view/src/nsView.h +++ b/view/src/nsView.h @@ -257,24 +257,6 @@ public: * @return error status */ NS_IMETHOD SetWidget(nsIWidget *aWidget); - /** - * Set flags on view to allow customization of view behavior during - * event handling - * @param aFlags flags to be added to view - */ - NS_IMETHOD SetViewFlags(PRUint32 aFlags); - /** - * Remove flags from view to allow customization of view behavior during - * event handling - * @param aFlags flags to be removed from view - */ - NS_IMETHOD ClearViewFlags(PRUint32 aFlags); - /** - * Get flags on view to allow customization of view behavior during - * event handling - * @param aFlags out parameter for view flags - */ - NS_IMETHOD GetViewFlags(PRUint32 *aFlags) const; /** * Used by the compositor for temporary marking of a view during * compositing. This will eventually replace GetScratchPoint above. @@ -329,6 +311,7 @@ public: // NOT in nsIView, so only available in view module void SetNextSibling(nsView *aSibling) { mNextSibling = aSibling; } PRUint32 GetViewFlags() const { return mVFlags; } + void SetViewFlags(PRUint32 aFlags) { mVFlags = aFlags; } void ConvertToParentCoords(nscoord* aX, nscoord* aY) { *aX += mPosX; *aY += mPosY; } void ConvertFromParentCoords(nscoord* aX, nscoord* aY) { *aX -= mPosX; *aY -= mPosY; } diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index 1e8061e3657..6c7c682d924 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -1500,8 +1500,7 @@ PRBool nsViewManager::UpdateAllCoveringWidgets(nsView *aView, nsView *aTarget, aView->HasWidget(&hasWidget); } - PRUint32 flags = 0; - aView->GetViewFlags(&flags); + PRUint32 flags = aView->GetViewFlags(); PRBool isBlittable = (flags & NS_VIEW_FLAG_DONT_BITBLT) == 0; nsView* childView = aView->GetFirstChild(); @@ -2422,7 +2421,7 @@ NS_IMETHODIMP nsViewManager::SetViewChildClipRegion(nsIView *aView, nsIRegion *a nsView* view = NS_STATIC_CAST(nsView*, aView); NS_ASSERTION(!(nsnull == view), "no view"); - + // XXX Shouldn't we repaint the view here? if (aRegion != nsnull) {