Bug 131487. Fix semantics of GetViewFlags/SetViewFlags. r=kmcclusk,sr=attinasi,a=asa

This commit is contained in:
roc+%cs.cmu.edu 2002-03-26 12:12:36 +00:00
Родитель 251d4521da
Коммит cb3fd90344
5 изменённых файлов: 6 добавлений и 48 удалений

Просмотреть файл

@ -495,9 +495,7 @@ NS_IMETHODIMP nsScrollPortView::ScrollByWhole(PRBool aTop)
PRBool nsScrollPortView::CannotBitBlt(nsView* aScrolledView) PRBool nsScrollPortView::CannotBitBlt(nsView* aScrolledView)
{ {
PRUint32 scrolledViewFlags; PRUint32 scrolledViewFlags = aScrolledView->GetViewFlags();
aScrolledView->GetViewFlags(&scrolledViewFlags);
return (mScrollProperties & NS_SCROLL_PROPERTY_NEVER_BLIT) || return (mScrollProperties & NS_SCROLL_PROPERTY_NEVER_BLIT) ||
(scrolledViewFlags & NS_VIEW_FLAG_DONT_BITBLT) || (scrolledViewFlags & NS_VIEW_FLAG_DONT_BITBLT) ||

Просмотреть файл

@ -1679,9 +1679,7 @@ NS_IMETHODIMP nsScrollingView::ScrollByWhole(PRBool aTop)
PRBool nsScrollingView::CannotBitBlt(nsView* aScrolledView) PRBool nsScrollingView::CannotBitBlt(nsView* aScrolledView)
{ {
PRUint32 scrolledViewFlags; PRUint32 scrolledViewFlags = aScrolledView->GetViewFlags();
aScrolledView->GetViewFlags(&scrolledViewFlags);
return (mScrollProperties & NS_SCROLL_PROPERTY_NEVER_BLIT) || return (mScrollProperties & NS_SCROLL_PROPERTY_NEVER_BLIT) ||
(scrolledViewFlags & NS_VIEW_FLAG_DONT_BITBLT) || (scrolledViewFlags & NS_VIEW_FLAG_DONT_BITBLT) ||

Просмотреть файл

@ -910,24 +910,6 @@ NS_IMETHODIMP nsView::List(FILE* out, PRInt32 aIndent) const
return NS_OK; 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) NS_IMETHODIMP nsView::GetOffsetFromWidget(nscoord *aDx, nscoord *aDy, nsIWidget *&aWidget)
{ {
nsView *ancestor = GetParent(); 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 // Walk all of the way up the views to see if any
// ancestor sets the NS_VIEW_PUBLIC_FLAG_CLIPCHILDREN // ancestor sets the NS_VIEW_PUBLIC_FLAG_CLIPCHILDREN
while (parentView) { while (parentView) {
PRUint32 flags; if ((parentView->GetViewFlags() & NS_VIEW_FLAG_CLIPCHILDREN) != 0) {
parentView->GetViewFlags(&flags);
if (flags & NS_VIEW_FLAG_CLIPCHILDREN) {
aIsClipped = PR_TRUE; aIsClipped = PR_TRUE;
// Adjust for clip specified by ancestor // Adjust for clip specified by ancestor
nscoord clipLeft; nscoord clipLeft;

Просмотреть файл

@ -257,24 +257,6 @@ public:
* @return error status * @return error status
*/ */
NS_IMETHOD SetWidget(nsIWidget *aWidget); 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 * Used by the compositor for temporary marking of a view during
* compositing. This will eventually replace GetScratchPoint above. * 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; } void SetNextSibling(nsView *aSibling) { mNextSibling = aSibling; }
PRUint32 GetViewFlags() const { return mVFlags; } PRUint32 GetViewFlags() const { return mVFlags; }
void SetViewFlags(PRUint32 aFlags) { mVFlags = aFlags; }
void ConvertToParentCoords(nscoord* aX, nscoord* aY) { *aX += mPosX; *aY += mPosY; } void ConvertToParentCoords(nscoord* aX, nscoord* aY) { *aX += mPosX; *aY += mPosY; }
void ConvertFromParentCoords(nscoord* aX, nscoord* aY) { *aX -= mPosX; *aY -= mPosY; } void ConvertFromParentCoords(nscoord* aX, nscoord* aY) { *aX -= mPosX; *aY -= mPosY; }

Просмотреть файл

@ -1500,8 +1500,7 @@ PRBool nsViewManager::UpdateAllCoveringWidgets(nsView *aView, nsView *aTarget,
aView->HasWidget(&hasWidget); aView->HasWidget(&hasWidget);
} }
PRUint32 flags = 0; PRUint32 flags = aView->GetViewFlags();
aView->GetViewFlags(&flags);
PRBool isBlittable = (flags & NS_VIEW_FLAG_DONT_BITBLT) == 0; PRBool isBlittable = (flags & NS_VIEW_FLAG_DONT_BITBLT) == 0;
nsView* childView = aView->GetFirstChild(); nsView* childView = aView->GetFirstChild();