зеркало из https://github.com/mozilla/pjs.git
Bug 131487. Fix semantics of GetViewFlags/SetViewFlags. r=kmcclusk,sr=attinasi,a=asa
This commit is contained in:
Родитель
251d4521da
Коммит
cb3fd90344
|
@ -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) ||
|
||||
|
|
|
@ -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) ||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче