mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 136441. Don't let floating views get clipped by non-floating parents. r=kmcclusk,sr=attinasi
This commit is contained in:
parent
4b7fb0a1f7
commit
d455318206
@ -1022,10 +1022,12 @@ NS_IMETHODIMP nsView::GetClippedRect(nsRect& aClippedRect, PRBool& aIsClipped, P
|
||||
|
||||
GetBounds(aClippedRect);
|
||||
nsView* parentView = GetParent();
|
||||
PRBool lastViewIsFloating = GetFloating();
|
||||
|
||||
// Walk all of the way up the views to see if any
|
||||
// ancestor sets the NS_VIEW_PUBLIC_FLAG_CLIPCHILDREN
|
||||
while (parentView) {
|
||||
// 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) {
|
||||
aIsClipped = PR_TRUE;
|
||||
// Adjust for clip specified by ancestor
|
||||
@ -1049,6 +1051,7 @@ NS_IMETHODIMP nsView::GetClippedRect(nsRect& aClippedRect, PRBool& aIsClipped, P
|
||||
|
||||
parentView->ConvertFromParentCoords(&ancestorX, &ancestorY);
|
||||
|
||||
lastViewIsFloating = parentView->GetFloating();
|
||||
parentView = parentView->GetParent();
|
||||
}
|
||||
|
||||
|
@ -299,6 +299,7 @@ public: // NOT in nsIView, so only available in view module
|
||||
nsViewManager* GetViewManager() const { return mViewManager; }
|
||||
nsViewVisibility GetVisibility() const { return mVis; }
|
||||
void* GetClientData() const { return mClientData; }
|
||||
PRBool GetFloating() const { return (mVFlags & NS_VIEW_FLAG_FLOATING) != 0; }
|
||||
|
||||
PRInt32 GetChildCount() const { return mNumKids; }
|
||||
nsView* GetChild(PRInt32 aIndex) const;
|
||||
|
Loading…
Reference in New Issue
Block a user