Changed TextFrame to implement ContentChanged() notification and generate
a reflow command git-svn-id: svn://10.0.0.236/trunk@4177 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -137,6 +137,11 @@ public:
|
||||
nsIFrame** aFrame,
|
||||
PRInt32& aCursor);
|
||||
|
||||
NS_IMETHOD ContentChanged(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aChild,
|
||||
nsISupports* aSubContent);
|
||||
|
||||
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
|
||||
|
||||
PRInt32 GetPosition(nsIPresContext& aCX,
|
||||
@@ -420,6 +425,24 @@ NS_METHOD TextFrame::GetCursorAt(nsIPresContext& aPresContext,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD TextFrame::ContentChanged(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aChild,
|
||||
nsISupports* aSubContent)
|
||||
{
|
||||
// Generate a reflow command with this frame as the target frame
|
||||
nsIReflowCommand* cmd;
|
||||
nsresult result;
|
||||
|
||||
result = NS_NewHTMLReflowCommand(&cmd, this, nsIReflowCommand::ContentChanged);
|
||||
if (NS_OK == result) {
|
||||
aShell->AppendReflowCommand(cmd);
|
||||
NS_RELEASE(cmd);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// XXX it would be nice to use a method pointer here, but I don't want
|
||||
// to pay for the storage.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user