зеркало из https://github.com/mozilla/pjs.git
Bug 18542. Make sure that we don't over-write aContentStyle arg when GFX scrollbars are turned on. r=evaughan
This commit is contained in:
Родитель
afa904767d
Коммит
28ce5c2427
|
@ -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));
|
||||
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче