From bbbc1f29b96216dac833db0ca46c8363d2ea67ed Mon Sep 17 00:00:00 2001 From: "jkeiser%netscape.com" Date: Thu, 26 Sep 2002 23:51:23 +0000 Subject: [PATCH] Fix crash on fixed position selects (Rick.Ju@sun.com's patch, bug 166750), r=dbaron@fas.harvard.edu, sr=kin@netscape.com git-svn-id: svn://10.0.0.236/trunk@130551 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 6 ++++-- mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index daf722903ca..708ea892244 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -4248,7 +4248,8 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell, // a dropdown list. The display area and button are created through anonymous content. // The drop-down list's frame is created explicitly. The combobox frame shares it's content // with the drop-down list. - PRUint32 flags = NS_BLOCK_SHRINK_WRAP | (aIsAbsolutelyPositioned?NS_BLOCK_SPACE_MGR:0); + PRUint32 flags = NS_BLOCK_SHRINK_WRAP | + ((aIsAbsolutelyPositioned | aIsFixedPositioned)?NS_BLOCK_SPACE_MGR:0); nsIFrame * comboboxFrame; rv = NS_NewComboboxControlFrame(aPresShell, &comboboxFrame, flags); @@ -4363,7 +4364,8 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell, rv = NS_NewListControlFrame(aPresShell, &listFrame); aNewFrame = listFrame; - PRUint32 flags = NS_BLOCK_SHRINK_WRAP | (aIsAbsolutelyPositioned?NS_BLOCK_SPACE_MGR:0); + PRUint32 flags = NS_BLOCK_SHRINK_WRAP | + ((aIsAbsolutelyPositioned | aIsFixedPositioned)?NS_BLOCK_SPACE_MGR:0); nsIFrame* scrolledFrame = nsnull; NS_NewSelectsAreaFrame(aPresShell, &scrolledFrame, flags); diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index daf722903ca..708ea892244 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -4248,7 +4248,8 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell, // a dropdown list. The display area and button are created through anonymous content. // The drop-down list's frame is created explicitly. The combobox frame shares it's content // with the drop-down list. - PRUint32 flags = NS_BLOCK_SHRINK_WRAP | (aIsAbsolutelyPositioned?NS_BLOCK_SPACE_MGR:0); + PRUint32 flags = NS_BLOCK_SHRINK_WRAP | + ((aIsAbsolutelyPositioned | aIsFixedPositioned)?NS_BLOCK_SPACE_MGR:0); nsIFrame * comboboxFrame; rv = NS_NewComboboxControlFrame(aPresShell, &comboboxFrame, flags); @@ -4363,7 +4364,8 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell, rv = NS_NewListControlFrame(aPresShell, &listFrame); aNewFrame = listFrame; - PRUint32 flags = NS_BLOCK_SHRINK_WRAP | (aIsAbsolutelyPositioned?NS_BLOCK_SPACE_MGR:0); + PRUint32 flags = NS_BLOCK_SHRINK_WRAP | + ((aIsAbsolutelyPositioned | aIsFixedPositioned)?NS_BLOCK_SPACE_MGR:0); nsIFrame* scrolledFrame = nsnull; NS_NewSelectsAreaFrame(aPresShell, &scrolledFrame, flags);