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));