From 9d218e2b5bb7e4697e95d829a993ec24f76f4747 Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Thu, 11 Nov 1999 21:48:17 +0000 Subject: [PATCH] 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 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 14 ++++++++------ .../html/style/src/nsCSSFrameConstructor.cpp | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 854c75b774f..f7abb018cd5 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -3962,12 +3962,14 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresContext* aPresCon nsFrameItems anonymousItems; + nsCOMPtr 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 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 scrolledPseudoStyle; aPresContext->ResolvePseudoStyleContextFor(aContent, aScrolledPseudo, - aContentStyle, PR_FALSE, + contentStyle, PR_FALSE, getter_AddRefs(scrolledPseudoStyle)); diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 854c75b774f..f7abb018cd5 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -3962,12 +3962,14 @@ nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresContext* aPresCon nsFrameItems anonymousItems; + nsCOMPtr 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 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 scrolledPseudoStyle; aPresContext->ResolvePseudoStyleContextFor(aContent, aScrolledPseudo, - aContentStyle, PR_FALSE, + contentStyle, PR_FALSE, getter_AddRefs(scrolledPseudoStyle));