зеркало из https://github.com/mozilla/gecko-dev.git
Bug 148350. Tweak code to avoid bug in gcc 2.95.3 with -O2. r=roc+moz,sr=jag
This commit is contained in:
Родитель
b9fd585526
Коммит
4492253e5a
|
@ -1021,14 +1021,15 @@ NS_IMETHODIMP nsView::GetClippedRect(nsRect& aClippedRect, PRBool& aIsClipped, P
|
|||
aIsClipped = PR_FALSE;
|
||||
|
||||
GetBounds(aClippedRect);
|
||||
nsView* parentView = GetParent();
|
||||
const nsView* parentView = GetParent();
|
||||
PRBool lastViewIsFloating = GetFloating();
|
||||
PRBool parentIsFloating;
|
||||
|
||||
// Walk all of the way up the views to see if any
|
||||
// ancestor sets the NS_VIEW_PUBLIC_FLAG_CLIPCHILDREN.
|
||||
// don't consider non-floating ancestors of a floating view.
|
||||
while (parentView && (!lastViewIsFloating || parentView->GetFloating())) {
|
||||
if ((parentView->GetViewFlags() & NS_VIEW_FLAG_CLIPCHILDREN) != 0) {
|
||||
while (parentView && (!lastViewIsFloating || (parentIsFloating = parentView->GetFloating()))) {
|
||||
if (parentView->GetClipChildren()) {
|
||||
aIsClipped = PR_TRUE;
|
||||
// Adjust for clip specified by ancestor
|
||||
nscoord clipLeft;
|
||||
|
@ -1051,7 +1052,7 @@ NS_IMETHODIMP nsView::GetClippedRect(nsRect& aClippedRect, PRBool& aIsClipped, P
|
|||
|
||||
parentView->ConvertFromParentCoords(&ancestorX, &ancestorY);
|
||||
|
||||
lastViewIsFloating = parentView->GetFloating();
|
||||
lastViewIsFloating = parentIsFloating;
|
||||
parentView = parentView->GetParent();
|
||||
}
|
||||
|
||||
|
|
|
@ -300,6 +300,7 @@ public: // NOT in nsIView, so only available in view module
|
|||
nsViewVisibility GetVisibility() const { return mVis; }
|
||||
void* GetClientData() const { return mClientData; }
|
||||
PRBool GetFloating() const { return (mVFlags & NS_VIEW_FLAG_FLOATING) != 0; }
|
||||
PRBool GetClipChildren() const { return (mVFlags & NS_VIEW_FLAG_CLIPCHILDREN) != 0; }
|
||||
|
||||
PRInt32 GetChildCount() const { return mNumKids; }
|
||||
nsView* GetChild(PRInt32 aIndex) const;
|
||||
|
@ -314,8 +315,8 @@ public: // NOT in nsIView, so only available in view module
|
|||
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; }
|
||||
void ConvertToParentCoords(nscoord* aX, nscoord* aY) const { *aX += mPosX; *aY += mPosY; }
|
||||
void ConvertFromParentCoords(nscoord* aX, nscoord* aY) const { *aX -= mPosX; *aY -= mPosY; }
|
||||
|
||||
protected:
|
||||
virtual ~nsView();
|
||||
|
|
Загрузка…
Ссылка в новой задаче