mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
Added UpdateStyleContexts for support change-out of style contexts
This commit is contained in:
parent
4957b3f0d6
commit
c9dcd9009c
@ -515,4 +515,19 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
nsHTMLContainerFrame::UpdateStyleContexts(nsIPresContext& aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
nsIFrame* aOldParent,
|
||||
nsIFrame* aNewParent)
|
||||
{
|
||||
nsIStyleContext* oldParentSC;
|
||||
aOldParent->GetStyleContext(oldParentSC);
|
||||
nsIStyleContext* newParentSC;
|
||||
aNewParent->GetStyleContext(newParentSC);
|
||||
if (oldParentSC != newParentSC) {
|
||||
aFrame->ReResolveStyleContext(&aPresContext, newParentSC);
|
||||
}
|
||||
NS_RELEASE(oldParentSC);
|
||||
NS_RELEASE(newParentSC);
|
||||
}
|
||||
|
@ -84,6 +84,11 @@ public:
|
||||
nsIStyleContext* aStyleContext,
|
||||
PRBool aForce);
|
||||
|
||||
static void UpdateStyleContexts(nsIPresContext& aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
nsIFrame* aOldParent,
|
||||
nsIFrame* aNewParent);
|
||||
|
||||
protected:
|
||||
virtual ~nsHTMLContainerFrame();
|
||||
|
||||
|
@ -515,4 +515,19 @@ nsHTMLContainerFrame::CreateViewForFrame(nsIPresContext& aPresContext,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
nsHTMLContainerFrame::UpdateStyleContexts(nsIPresContext& aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
nsIFrame* aOldParent,
|
||||
nsIFrame* aNewParent)
|
||||
{
|
||||
nsIStyleContext* oldParentSC;
|
||||
aOldParent->GetStyleContext(oldParentSC);
|
||||
nsIStyleContext* newParentSC;
|
||||
aNewParent->GetStyleContext(newParentSC);
|
||||
if (oldParentSC != newParentSC) {
|
||||
aFrame->ReResolveStyleContext(&aPresContext, newParentSC);
|
||||
}
|
||||
NS_RELEASE(oldParentSC);
|
||||
NS_RELEASE(newParentSC);
|
||||
}
|
||||
|
@ -84,6 +84,11 @@ public:
|
||||
nsIStyleContext* aStyleContext,
|
||||
PRBool aForce);
|
||||
|
||||
static void UpdateStyleContexts(nsIPresContext& aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
nsIFrame* aOldParent,
|
||||
nsIFrame* aNewParent);
|
||||
|
||||
protected:
|
||||
virtual ~nsHTMLContainerFrame();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user