зеркало из https://github.com/mozilla/gecko-dev.git
Added NotifyDestroyingFrame() function to nsIPresShell
This commit is contained in:
Родитель
d7927650e6
Коммит
f9d48b07a9
|
@ -182,26 +182,29 @@ public:
|
|||
nsIFrame* aPlaceholderFrame) = 0;
|
||||
NS_IMETHOD ClearPlaceholderFrameMap() = 0;
|
||||
|
||||
/**
|
||||
* Reflow commands
|
||||
*/
|
||||
NS_IMETHOD AppendReflowCommand(nsIReflowCommand* aReflowCommand) = 0;
|
||||
|
||||
NS_IMETHOD CancelReflowCommand(nsIFrame* aTargetFrame) = 0;
|
||||
|
||||
NS_IMETHOD ProcessReflowCommands() = 0;
|
||||
|
||||
NS_IMETHOD ClearFrameRefs(nsIFrame* aFrame) = 0;
|
||||
|
||||
/**
|
||||
* Given a frame, cough up a rendering context suitable for use with
|
||||
* Given a frame, create a rendering context suitable for use with
|
||||
* the frame.
|
||||
*/
|
||||
NS_IMETHOD CreateRenderingContext(nsIFrame *aFrame,
|
||||
nsIRenderingContext** aContext) = 0;
|
||||
|
||||
// Notification that we were unable to render a replaced element.
|
||||
// Called when the replaced element can not be rendered, and we should
|
||||
// instead render the element's contents.
|
||||
// The content object associated with aFrame should either be a IMG
|
||||
// element, an OBJECT element, or an APPLET element
|
||||
/**
|
||||
* Notification that we were unable to render a replaced element.
|
||||
* Called when the replaced element can not be rendered, and we should
|
||||
* instead render the element's contents.
|
||||
* The content object associated with aFrame should either be a IMG
|
||||
* element, an OBJECT element, or an APPLET element
|
||||
*/
|
||||
NS_IMETHOD CantRenderReplacedElement(nsIPresContext* aPresContext,
|
||||
nsIFrame* aFrame) = 0;
|
||||
|
||||
|
@ -263,6 +266,13 @@ public:
|
|||
PRInt32 aHOffsetPercent,
|
||||
PRUint32 aHFlags) const = 0;
|
||||
|
||||
/**
|
||||
* Notification sent by a frame informing the pres shell that it is about to
|
||||
* be destroyed.
|
||||
* This allows any outstanding references to the frame to be cleaned up
|
||||
*/
|
||||
NS_IMETHOD NotifyDestroyingFrame(nsIFrame* aFrame) = 0;
|
||||
|
||||
/**
|
||||
* Notify the Clipboard that we have something to copy.
|
||||
*/
|
||||
|
|
|
@ -182,26 +182,29 @@ public:
|
|||
nsIFrame* aPlaceholderFrame) = 0;
|
||||
NS_IMETHOD ClearPlaceholderFrameMap() = 0;
|
||||
|
||||
/**
|
||||
* Reflow commands
|
||||
*/
|
||||
NS_IMETHOD AppendReflowCommand(nsIReflowCommand* aReflowCommand) = 0;
|
||||
|
||||
NS_IMETHOD CancelReflowCommand(nsIFrame* aTargetFrame) = 0;
|
||||
|
||||
NS_IMETHOD ProcessReflowCommands() = 0;
|
||||
|
||||
NS_IMETHOD ClearFrameRefs(nsIFrame* aFrame) = 0;
|
||||
|
||||
/**
|
||||
* Given a frame, cough up a rendering context suitable for use with
|
||||
* Given a frame, create a rendering context suitable for use with
|
||||
* the frame.
|
||||
*/
|
||||
NS_IMETHOD CreateRenderingContext(nsIFrame *aFrame,
|
||||
nsIRenderingContext** aContext) = 0;
|
||||
|
||||
// Notification that we were unable to render a replaced element.
|
||||
// Called when the replaced element can not be rendered, and we should
|
||||
// instead render the element's contents.
|
||||
// The content object associated with aFrame should either be a IMG
|
||||
// element, an OBJECT element, or an APPLET element
|
||||
/**
|
||||
* Notification that we were unable to render a replaced element.
|
||||
* Called when the replaced element can not be rendered, and we should
|
||||
* instead render the element's contents.
|
||||
* The content object associated with aFrame should either be a IMG
|
||||
* element, an OBJECT element, or an APPLET element
|
||||
*/
|
||||
NS_IMETHOD CantRenderReplacedElement(nsIPresContext* aPresContext,
|
||||
nsIFrame* aFrame) = 0;
|
||||
|
||||
|
@ -263,6 +266,13 @@ public:
|
|||
PRInt32 aHOffsetPercent,
|
||||
PRUint32 aHFlags) const = 0;
|
||||
|
||||
/**
|
||||
* Notification sent by a frame informing the pres shell that it is about to
|
||||
* be destroyed.
|
||||
* This allows any outstanding references to the frame to be cleaned up
|
||||
*/
|
||||
NS_IMETHOD NotifyDestroyingFrame(nsIFrame* aFrame) = 0;
|
||||
|
||||
/**
|
||||
* Notify the Clipboard that we have something to copy.
|
||||
*/
|
||||
|
|
|
@ -377,11 +377,11 @@ nsFrame::DeleteFrame(nsIPresContext& aPresContext)
|
|||
nsCOMPtr<nsIPresShell> shell;
|
||||
aPresContext.GetShell(getter_AddRefs(shell));
|
||||
|
||||
// XXX Rather than always do this it would be better if it was part of
|
||||
// XXX Rather than always doing this it would be better if it was part of
|
||||
// a frame observer mechanism and the pres shell could register as an
|
||||
// observer of the frame while the reflow command is pending...
|
||||
if (shell) {
|
||||
shell->CancelReflowCommand(this);
|
||||
shell->NotifyDestroyingFrame(this);
|
||||
}
|
||||
|
||||
if ((mState & NS_FRAME_EXTERNAL_REFERENCE) ||
|
||||
|
|
|
@ -377,11 +377,11 @@ nsFrame::DeleteFrame(nsIPresContext& aPresContext)
|
|||
nsCOMPtr<nsIPresShell> shell;
|
||||
aPresContext.GetShell(getter_AddRefs(shell));
|
||||
|
||||
// XXX Rather than always do this it would be better if it was part of
|
||||
// XXX Rather than always doing this it would be better if it was part of
|
||||
// a frame observer mechanism and the pres shell could register as an
|
||||
// observer of the frame while the reflow command is pending...
|
||||
if (shell) {
|
||||
shell->CancelReflowCommand(this);
|
||||
shell->NotifyDestroyingFrame(this);
|
||||
}
|
||||
|
||||
if ((mState & NS_FRAME_EXTERNAL_REFERENCE) ||
|
||||
|
|
Загрузка…
Ссылка в новой задаче