Bug 18542. Make sure that we don't over-write aContentStyle arg when GFX scrollbars are turned on. r=evaughan

git-svn-id: svn://10.0.0.236/trunk@53244 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
waterson%netscape.com
1999-11-11 21:48:17 +00:00
parent 95b77ece6f
commit 9d218e2b5b
2 changed files with 16 additions and 12 deletions

View File

@@ -3962,12 +3962,14 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresContext* aPresCon
nsFrameItems anonymousItems;
nsCOMPtr<nsIStyleContext> contentStyle = dont_QueryInterface(aContentStyle);
PRBool isGfx = HasGfxScrollbars(aPresContext);
if (isGfx) {
BuildGfxScrollFrame(aPresContext, aState, aContent, aDocument, aParentFrame,
aContentStyle, gfxScrollFrame, anonymousItems);
contentStyle, gfxScrollFrame, anonymousItems);
scrollFrame = anonymousItems.childList;
parentFrame = gfxScrollFrame;
@@ -3977,17 +3979,17 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresContext* aPresCon
nsCOMPtr<nsIStyleContext> scrollPseudoStyle;
aPresContext->ResolvePseudoStyleContextFor(aContent,
nsLayoutAtoms::scrolledContentPseudo,
aContentStyle, PR_FALSE,
&aContentStyle);
contentStyle, PR_FALSE,
getter_AddRefs(contentStyle));
scrollFrame->Init(*aPresContext, aContent, parentFrame, aContentStyle,
scrollFrame->Init(*aPresContext, aContent, parentFrame, contentStyle,
nsnull);
} else {
NS_NewScrollFrame(&scrollFrame);
aNewFrame = scrollFrame;
parentFrame = aParentFrame;
scrollFrame->Init(*aPresContext, aContent, parentFrame, aContentStyle,
scrollFrame->Init(*aPresContext, aContent, parentFrame, contentStyle,
nsnull);
}
@@ -3998,7 +4000,7 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresContext* aPresCon
nsCOMPtr<nsIStyleContext> scrolledPseudoStyle;
aPresContext->ResolvePseudoStyleContextFor(aContent,
aScrolledPseudo,
aContentStyle, PR_FALSE,
contentStyle, PR_FALSE,
getter_AddRefs(scrolledPseudoStyle));

View File

@@ -3962,12 +3962,14 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresContext* aPresCon
nsFrameItems anonymousItems;
nsCOMPtr<nsIStyleContext> contentStyle = dont_QueryInterface(aContentStyle);
PRBool isGfx = HasGfxScrollbars(aPresContext);
if (isGfx) {
BuildGfxScrollFrame(aPresContext, aState, aContent, aDocument, aParentFrame,
aContentStyle, gfxScrollFrame, anonymousItems);
contentStyle, gfxScrollFrame, anonymousItems);
scrollFrame = anonymousItems.childList;
parentFrame = gfxScrollFrame;
@@ -3977,17 +3979,17 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresContext* aPresCon
nsCOMPtr<nsIStyleContext> scrollPseudoStyle;
aPresContext->ResolvePseudoStyleContextFor(aContent,
nsLayoutAtoms::scrolledContentPseudo,
aContentStyle, PR_FALSE,
&aContentStyle);
contentStyle, PR_FALSE,
getter_AddRefs(contentStyle));
scrollFrame->Init(*aPresContext, aContent, parentFrame, aContentStyle,
scrollFrame->Init(*aPresContext, aContent, parentFrame, contentStyle,
nsnull);
} else {
NS_NewScrollFrame(&scrollFrame);
aNewFrame = scrollFrame;
parentFrame = aParentFrame;
scrollFrame->Init(*aPresContext, aContent, parentFrame, aContentStyle,
scrollFrame->Init(*aPresContext, aContent, parentFrame, contentStyle,
nsnull);
}
@@ -3998,7 +4000,7 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresContext* aPresCon
nsCOMPtr<nsIStyleContext> scrolledPseudoStyle;
aPresContext->ResolvePseudoStyleContextFor(aContent,
aScrolledPseudo,
aContentStyle, PR_FALSE,
contentStyle, PR_FALSE,
getter_AddRefs(scrolledPseudoStyle));