зеркало из https://github.com/mozilla/pjs.git
bug 54542 (Hyatt's patch) - pass in style context instead of resolving it. a=buster, r=karnaze.
This commit is contained in:
Родитель
abc25deed0
Коммит
cea1265120
|
@ -2910,15 +2910,13 @@ PRBool
|
|||
nsCSSFrameConstructor::MustGeneratePseudoParent(nsIPresContext* aPresContext,
|
||||
nsIFrame* aParentFrame,
|
||||
nsIAtom* aTag,
|
||||
nsIContent* aContent)
|
||||
nsIContent* aContent,
|
||||
nsIStyleContext* aStyleContext)
|
||||
{
|
||||
nsCOMPtr<nsIStyleContext> styleContext;
|
||||
|
||||
nsresult rv = ResolveStyleContext(aPresContext, aParentFrame, aContent, aTag, getter_AddRefs(styleContext));
|
||||
if (NS_FAILED(rv)) return PR_FALSE;
|
||||
if (!aStyleContext) return PR_FALSE;
|
||||
|
||||
const nsStyleDisplay* display = (const nsStyleDisplay*)
|
||||
styleContext->GetStyleData(eStyleStruct_Display);
|
||||
aStyleContext->GetStyleData(eStyleStruct_Display);
|
||||
|
||||
if (NS_STYLE_DISPLAY_NONE == display->mDisplay) return PR_FALSE;
|
||||
|
||||
|
@ -2986,7 +2984,7 @@ nsCSSFrameConstructor::ConstructTableForeignFrame(nsIPresShell* aPres
|
|||
}
|
||||
}
|
||||
// Do not construct pseudo frames for trees
|
||||
else if (MustGeneratePseudoParent(aPresContext, aParentFrameIn, tag.get(), aContent)) {
|
||||
else if (MustGeneratePseudoParent(aPresContext, aParentFrameIn, tag.get(), aContent, aStyleContext)) {
|
||||
// this frame may have a pseudo parent, use block frame type to trigger foreign
|
||||
GetParentFrame(aPresShell, aPresContext, aTableCreator, *aParentFrameIn,
|
||||
nsLayoutAtoms::blockFrame, aState, parentFrame, aIsPseudoParent);
|
||||
|
|
|
@ -301,7 +301,8 @@ protected:
|
|||
PRBool MustGeneratePseudoParent(nsIPresContext* aPresContext,
|
||||
nsIFrame* aParentFrame,
|
||||
nsIAtom* aTag,
|
||||
nsIContent* aContent);
|
||||
nsIContent* aContent,
|
||||
nsIStyleContext* aContext);
|
||||
|
||||
nsresult ConstructTableForeignFrame(nsIPresShell* aPresShell,
|
||||
nsIPresContext* aPresContext,
|
||||
|
|
|
@ -2910,15 +2910,13 @@ PRBool
|
|||
nsCSSFrameConstructor::MustGeneratePseudoParent(nsIPresContext* aPresContext,
|
||||
nsIFrame* aParentFrame,
|
||||
nsIAtom* aTag,
|
||||
nsIContent* aContent)
|
||||
nsIContent* aContent,
|
||||
nsIStyleContext* aStyleContext)
|
||||
{
|
||||
nsCOMPtr<nsIStyleContext> styleContext;
|
||||
|
||||
nsresult rv = ResolveStyleContext(aPresContext, aParentFrame, aContent, aTag, getter_AddRefs(styleContext));
|
||||
if (NS_FAILED(rv)) return PR_FALSE;
|
||||
if (!aStyleContext) return PR_FALSE;
|
||||
|
||||
const nsStyleDisplay* display = (const nsStyleDisplay*)
|
||||
styleContext->GetStyleData(eStyleStruct_Display);
|
||||
aStyleContext->GetStyleData(eStyleStruct_Display);
|
||||
|
||||
if (NS_STYLE_DISPLAY_NONE == display->mDisplay) return PR_FALSE;
|
||||
|
||||
|
@ -2986,7 +2984,7 @@ nsCSSFrameConstructor::ConstructTableForeignFrame(nsIPresShell* aPres
|
|||
}
|
||||
}
|
||||
// Do not construct pseudo frames for trees
|
||||
else if (MustGeneratePseudoParent(aPresContext, aParentFrameIn, tag.get(), aContent)) {
|
||||
else if (MustGeneratePseudoParent(aPresContext, aParentFrameIn, tag.get(), aContent, aStyleContext)) {
|
||||
// this frame may have a pseudo parent, use block frame type to trigger foreign
|
||||
GetParentFrame(aPresShell, aPresContext, aTableCreator, *aParentFrameIn,
|
||||
nsLayoutAtoms::blockFrame, aState, parentFrame, aIsPseudoParent);
|
||||
|
|
|
@ -301,7 +301,8 @@ protected:
|
|||
PRBool MustGeneratePseudoParent(nsIPresContext* aPresContext,
|
||||
nsIFrame* aParentFrame,
|
||||
nsIAtom* aTag,
|
||||
nsIContent* aContent);
|
||||
nsIContent* aContent,
|
||||
nsIStyleContext* aContext);
|
||||
|
||||
nsresult ConstructTableForeignFrame(nsIPresShell* aPresShell,
|
||||
nsIPresContext* aPresContext,
|
||||
|
|
Загрузка…
Ссылка в новой задаче