From 592bc7771fd8bbbde6ac2e91c6c631218e6a2b06 Mon Sep 17 00:00:00 2001 From: troy Date: Sat, 20 Jun 1998 00:04:22 +0000 Subject: [PATCH] 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 --- .../layout/html/base/src/nsTextContent.cpp | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/mozilla/layout/html/base/src/nsTextContent.cpp b/mozilla/layout/html/base/src/nsTextContent.cpp index 8fc2c6372cc..ea078f206ec 100644 --- a/mozilla/layout/html/base/src/nsTextContent.cpp +++ b/mozilla/layout/html/base/src/nsTextContent.cpp @@ -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.