Renamed style-changed reflow method; fixed implementation to generate a reflow command

This commit is contained in:
kipp%netscape.com 1998-09-25 16:11:36 +00:00
parent 8715a3abab
commit cfd12dbb91
4 changed files with 28 additions and 28 deletions

View File

@ -393,8 +393,7 @@ nsHTMLContainerFrame::AttributeChanged(nsIPresShell* aShell,
{
if (nsHTMLAtoms::style == aAttribute) {
ApplyStyleChangeToTree(*aPresContext, this);
ApplyReflowChangeToTree(*aPresContext, this);
ApplyRenderingChangeToTree(*aPresContext, this);
StyleChangeReflow(*aPresContext, this);
}
return NS_OK;
@ -508,16 +507,17 @@ nsHTMLContainerFrame::ApplyRenderingChangeToTree(nsIPresContext& aPresContext,
}
void
nsHTMLContainerFrame::ApplyReflowChangeToTree(nsIPresContext& aPresContext,
nsIFrame* aFrame)
nsHTMLContainerFrame::StyleChangeReflow(nsIPresContext& aPresContext,
nsIFrame* aFrame)
{
nsIContent* content;
nsIDocument* document;
aFrame->GetContent(content);
if (nsnull != content) {
content->GetDocument(document);
if (nsnull != document) {
document->ContentChanged(content, nsnull);
}
nsIPresShell* shell;
shell = aPresContext.GetShell();
nsIReflowCommand* reflowCmd;
nsresult rv = NS_NewHTMLReflowCommand(&reflowCmd, aFrame,
nsIReflowCommand::StyleChanged);
if (NS_SUCCEEDED(rv)) {
shell->AppendReflowCommand(reflowCmd);
NS_RELEASE(reflowCmd);
}
}

View File

@ -70,8 +70,8 @@ public:
nsIFrame* aFrame);
static void ApplyRenderingChangeToTree(nsIPresContext& aPresContext,
nsIFrame* aFrame);
static void ApplyReflowChangeToTree(nsIPresContext& aPresContext,
nsIFrame* aFrame);
static void StyleChangeReflow(nsIPresContext& aPresContext,
nsIFrame* aFrame);
protected:
virtual ~nsHTMLContainerFrame();

View File

@ -393,8 +393,7 @@ nsHTMLContainerFrame::AttributeChanged(nsIPresShell* aShell,
{
if (nsHTMLAtoms::style == aAttribute) {
ApplyStyleChangeToTree(*aPresContext, this);
ApplyReflowChangeToTree(*aPresContext, this);
ApplyRenderingChangeToTree(*aPresContext, this);
StyleChangeReflow(*aPresContext, this);
}
return NS_OK;
@ -508,16 +507,17 @@ nsHTMLContainerFrame::ApplyRenderingChangeToTree(nsIPresContext& aPresContext,
}
void
nsHTMLContainerFrame::ApplyReflowChangeToTree(nsIPresContext& aPresContext,
nsIFrame* aFrame)
nsHTMLContainerFrame::StyleChangeReflow(nsIPresContext& aPresContext,
nsIFrame* aFrame)
{
nsIContent* content;
nsIDocument* document;
aFrame->GetContent(content);
if (nsnull != content) {
content->GetDocument(document);
if (nsnull != document) {
document->ContentChanged(content, nsnull);
}
nsIPresShell* shell;
shell = aPresContext.GetShell();
nsIReflowCommand* reflowCmd;
nsresult rv = NS_NewHTMLReflowCommand(&reflowCmd, aFrame,
nsIReflowCommand::StyleChanged);
if (NS_SUCCEEDED(rv)) {
shell->AppendReflowCommand(reflowCmd);
NS_RELEASE(reflowCmd);
}
}

View File

@ -70,8 +70,8 @@ public:
nsIFrame* aFrame);
static void ApplyRenderingChangeToTree(nsIPresContext& aPresContext,
nsIFrame* aFrame);
static void ApplyReflowChangeToTree(nsIPresContext& aPresContext,
nsIFrame* aFrame);
static void StyleChangeReflow(nsIPresContext& aPresContext,
nsIFrame* aFrame);
protected:
virtual ~nsHTMLContainerFrame();