Changed anchor frames to forward content notifications to the real frame
git-svn-id: svn://10.0.0.236/trunk@4734 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
3962528be4
commit
7002f99964
@ -132,7 +132,88 @@ nsPlaceholderFrame::Reflow(nsIPresContext* aPresContext,
|
||||
return nsFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
}
|
||||
|
||||
NS_METHOD nsPlaceholderFrame::ListTag(FILE* out) const
|
||||
NS_IMETHODIMP nsPlaceholderFrame::ContentAppended(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer)
|
||||
{
|
||||
NS_ASSERTION(mContent == aContainer, "bad content-appended target");
|
||||
|
||||
// Forward the notification to the floater
|
||||
if (nsnull != mAnchoredItem) {
|
||||
return mAnchoredItem->ContentAppended(aShell, aPresContext, aContainer);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPlaceholderFrame::ContentInserted(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInParent)
|
||||
{
|
||||
NS_ASSERTION(mContent == aContainer, "bad content-inserted target");
|
||||
|
||||
// Forward the notification to the floater
|
||||
if (nsnull != mAnchoredItem) {
|
||||
return mAnchoredItem->ContentInserted(aShell, aPresContext, aContainer,
|
||||
aChild, aIndexInParent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPlaceholderFrame::ContentReplaced(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aOldChild,
|
||||
nsIContent* aNewChild,
|
||||
PRInt32 aIndexInParent)
|
||||
{
|
||||
NS_ASSERTION(mContent == aContainer, "bad content-replaced target");
|
||||
|
||||
// Forward the notification to the floater
|
||||
if (nsnull != mAnchoredItem) {
|
||||
return mAnchoredItem->ContentReplaced(aShell, aPresContext, aContainer,
|
||||
aOldChild, aNewChild, aIndexInParent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPlaceholderFrame::ContentDeleted(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInParent)
|
||||
{
|
||||
NS_ASSERTION(mContent == aContainer, "bad content-deleted target");
|
||||
|
||||
// Forward the notification to the floater
|
||||
if (nsnull != mAnchoredItem) {
|
||||
return mAnchoredItem->ContentDeleted(aShell, aPresContext, aContainer,
|
||||
aChild, aIndexInParent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPlaceholderFrame::ContentChanged(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aChild,
|
||||
nsISupports* aSubContent)
|
||||
{
|
||||
NS_ASSERTION(mContent == aChild, "bad content-changed target");
|
||||
|
||||
// Forward the notification to the floater
|
||||
if (nsnull != mAnchoredItem) {
|
||||
return mAnchoredItem->ContentChanged(aShell, aPresContext, aChild, aSubContent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPlaceholderFrame::ListTag(FILE* out) const
|
||||
{
|
||||
fputs("*placeholder", out);
|
||||
PRInt32 contentIndex;
|
||||
|
||||
@ -38,6 +38,31 @@ public:
|
||||
nsReflowMetrics& aDesiredSize,
|
||||
const nsReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
|
||||
NS_IMETHOD ContentAppended(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer);
|
||||
NS_IMETHOD ContentInserted(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInParent);
|
||||
NS_IMETHOD ContentReplaced(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aOldChild,
|
||||
nsIContent* aNewChild,
|
||||
PRInt32 aIndexInParent);
|
||||
NS_IMETHOD ContentDeleted(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInParent);
|
||||
NS_IMETHOD ContentChanged(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aChild,
|
||||
nsISupports* aSubContent);
|
||||
|
||||
NS_IMETHOD ListTag(FILE* out = stdout) const;
|
||||
|
||||
protected:
|
||||
|
||||
@ -49,10 +49,10 @@ nsAbsoluteFrame::~nsAbsoluteFrame()
|
||||
{
|
||||
}
|
||||
|
||||
NS_METHOD nsAbsoluteFrame::Reflow(nsIPresContext* aPresContext,
|
||||
nsReflowMetrics& aDesiredSize,
|
||||
const nsReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
NS_IMETHODIMP nsAbsoluteFrame::Reflow(nsIPresContext* aPresContext,
|
||||
nsReflowMetrics& aDesiredSize,
|
||||
const nsReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
// Have we created the absolutely positioned item yet?
|
||||
if (nsnull == mFrame) {
|
||||
@ -93,6 +93,87 @@ NS_METHOD nsAbsoluteFrame::Reflow(nsIPresContext* aPresContext,
|
||||
return nsFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbsoluteFrame::ContentAppended(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer)
|
||||
{
|
||||
NS_ASSERTION(mContent == aContainer, "bad content-appended target");
|
||||
|
||||
// Forward the notification to the absolutely positioned frame
|
||||
if (nsnull != mFrame) {
|
||||
return mFrame->ContentAppended(aShell, aPresContext, aContainer);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbsoluteFrame::ContentInserted(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInParent)
|
||||
{
|
||||
NS_ASSERTION(mContent == aContainer, "bad content-inserted target");
|
||||
|
||||
// Forward the notification to the absolutely positioned frame
|
||||
if (nsnull != mFrame) {
|
||||
return mFrame->ContentInserted(aShell, aPresContext, aContainer, aChild,
|
||||
aIndexInParent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbsoluteFrame::ContentReplaced(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aOldChild,
|
||||
nsIContent* aNewChild,
|
||||
PRInt32 aIndexInParent)
|
||||
{
|
||||
NS_ASSERTION(mContent == aContainer, "bad content-replaced target");
|
||||
|
||||
// Forward the notification to the absolutely positioned frame
|
||||
if (nsnull != mFrame) {
|
||||
return mFrame->ContentReplaced(aShell, aPresContext, aContainer,
|
||||
aOldChild, aNewChild, aIndexInParent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbsoluteFrame::ContentDeleted(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInParent)
|
||||
{
|
||||
NS_ASSERTION(mContent == aContainer, "bad content-deleted target");
|
||||
|
||||
// Forward the notification to the absolutely positioned frame
|
||||
if (nsnull != mFrame) {
|
||||
return mFrame->ContentDeleted(aShell, aPresContext, aContainer, aChild,
|
||||
aIndexInParent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsAbsoluteFrame::ContentChanged(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aChild,
|
||||
nsISupports* aSubContent)
|
||||
{
|
||||
NS_ASSERTION(mContent == aChild, "bad content-changed target");
|
||||
|
||||
// Forward the notification to the absolutely positioned frame
|
||||
if (nsnull != mFrame) {
|
||||
return mFrame->ContentChanged(aShell, aPresContext, aChild, aSubContent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIFrame* nsAbsoluteFrame::GetContainingBlock() const
|
||||
{
|
||||
// Look for a containing frame that is absolutely positioned. If we don't
|
||||
@ -135,7 +216,7 @@ nsIFrame* nsAbsoluteFrame::GetContainingBlock() const
|
||||
return result;
|
||||
}
|
||||
|
||||
NS_METHOD nsAbsoluteFrame::ListTag(FILE* out) const
|
||||
NS_IMETHODIMP nsAbsoluteFrame::ListTag(FILE* out) const
|
||||
{
|
||||
fputs("*absolute", out);
|
||||
PRInt32 contentIndex;
|
||||
|
||||
@ -42,6 +42,31 @@ public:
|
||||
nsReflowMetrics& aDesiredSize,
|
||||
const nsReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
|
||||
NS_IMETHOD ContentAppended(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer);
|
||||
NS_IMETHOD ContentInserted(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInParent);
|
||||
NS_IMETHOD ContentReplaced(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aOldChild,
|
||||
nsIContent* aNewChild,
|
||||
PRInt32 aIndexInParent);
|
||||
NS_IMETHOD ContentDeleted(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInParent);
|
||||
NS_IMETHOD ContentChanged(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aChild,
|
||||
nsISupports* aSubContent);
|
||||
|
||||
NS_IMETHOD ListTag(FILE* out = stdout) const;
|
||||
|
||||
protected:
|
||||
|
||||
@ -132,7 +132,88 @@ nsPlaceholderFrame::Reflow(nsIPresContext* aPresContext,
|
||||
return nsFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
}
|
||||
|
||||
NS_METHOD nsPlaceholderFrame::ListTag(FILE* out) const
|
||||
NS_IMETHODIMP nsPlaceholderFrame::ContentAppended(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer)
|
||||
{
|
||||
NS_ASSERTION(mContent == aContainer, "bad content-appended target");
|
||||
|
||||
// Forward the notification to the floater
|
||||
if (nsnull != mAnchoredItem) {
|
||||
return mAnchoredItem->ContentAppended(aShell, aPresContext, aContainer);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPlaceholderFrame::ContentInserted(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInParent)
|
||||
{
|
||||
NS_ASSERTION(mContent == aContainer, "bad content-inserted target");
|
||||
|
||||
// Forward the notification to the floater
|
||||
if (nsnull != mAnchoredItem) {
|
||||
return mAnchoredItem->ContentInserted(aShell, aPresContext, aContainer,
|
||||
aChild, aIndexInParent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPlaceholderFrame::ContentReplaced(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aOldChild,
|
||||
nsIContent* aNewChild,
|
||||
PRInt32 aIndexInParent)
|
||||
{
|
||||
NS_ASSERTION(mContent == aContainer, "bad content-replaced target");
|
||||
|
||||
// Forward the notification to the floater
|
||||
if (nsnull != mAnchoredItem) {
|
||||
return mAnchoredItem->ContentReplaced(aShell, aPresContext, aContainer,
|
||||
aOldChild, aNewChild, aIndexInParent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPlaceholderFrame::ContentDeleted(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInParent)
|
||||
{
|
||||
NS_ASSERTION(mContent == aContainer, "bad content-deleted target");
|
||||
|
||||
// Forward the notification to the floater
|
||||
if (nsnull != mAnchoredItem) {
|
||||
return mAnchoredItem->ContentDeleted(aShell, aPresContext, aContainer,
|
||||
aChild, aIndexInParent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPlaceholderFrame::ContentChanged(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aChild,
|
||||
nsISupports* aSubContent)
|
||||
{
|
||||
NS_ASSERTION(mContent == aChild, "bad content-changed target");
|
||||
|
||||
// Forward the notification to the floater
|
||||
if (nsnull != mAnchoredItem) {
|
||||
return mAnchoredItem->ContentChanged(aShell, aPresContext, aChild, aSubContent);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPlaceholderFrame::ListTag(FILE* out) const
|
||||
{
|
||||
fputs("*placeholder", out);
|
||||
PRInt32 contentIndex;
|
||||
|
||||
@ -38,6 +38,31 @@ public:
|
||||
nsReflowMetrics& aDesiredSize,
|
||||
const nsReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
|
||||
NS_IMETHOD ContentAppended(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer);
|
||||
NS_IMETHOD ContentInserted(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInParent);
|
||||
NS_IMETHOD ContentReplaced(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aOldChild,
|
||||
nsIContent* aNewChild,
|
||||
PRInt32 aIndexInParent);
|
||||
NS_IMETHOD ContentDeleted(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aContainer,
|
||||
nsIContent* aChild,
|
||||
PRInt32 aIndexInParent);
|
||||
NS_IMETHOD ContentChanged(nsIPresShell* aShell,
|
||||
nsIPresContext* aPresContext,
|
||||
nsIContent* aChild,
|
||||
nsISupports* aSubContent);
|
||||
|
||||
NS_IMETHOD ListTag(FILE* out = stdout) const;
|
||||
|
||||
protected:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user