From b2703305412c984212f4826a9d3258a5e080f740 Mon Sep 17 00:00:00 2001 From: kipp Date: Wed, 3 Jun 1998 15:55:49 +0000 Subject: [PATCH] disable notifies during synthetic content insertion git-svn-id: svn://10.0.0.236/trunk@3051 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsHTMLContainerFrame.cpp | 16 +++++++++++----- .../html/base/src/nsHTMLContainerFrame.cpp | 16 +++++++++++----- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/mozilla/layout/generic/nsHTMLContainerFrame.cpp b/mozilla/layout/generic/nsHTMLContainerFrame.cpp index b260f980dc9..9c70e1a1648 100644 --- a/mozilla/layout/generic/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/generic/nsHTMLContainerFrame.cpp @@ -37,6 +37,7 @@ #include "nsIContentDelegate.h" #include "nsIHTMLContent.h" #include "nsHTMLParts.h" +#include "nsHTMLFrame.h" NS_DEF_PTR(nsIStyleContext); @@ -88,7 +89,8 @@ void nsHTMLContainerFrame::TriggerLink(nsIPresContext& aPresContext, if (NS_OK == aPresContext.GetLinkHandler(&handler)) { // Resolve url to an absolute url nsIURL* docURL = nsnull; - nsIDocument* doc = mContent->GetDocument(); + nsIDocument* doc = nsnull; + mContent->GetDocument(doc); if (nsnull != doc) { docURL = doc->GetDocumentURL(); NS_RELEASE(doc); @@ -315,6 +317,11 @@ nsHTMLContainerFrame::CreateFrameFor(nsIPresContext* aPresContext, aStyleContext, frame); NS_RELEASE(delegate); } + if (NS_OK == rv) { + // Wrap the frame in a view if necessary + rv = nsHTMLFrame::CreateViewForFrame(aPresContext, frame, aStyleContext, + PR_FALSE); + } aResult = frame; return rv; } @@ -435,10 +442,9 @@ nsHTMLContainerFrame::ProcessInitialReflow(nsIPresContext* aPresContext) return rv; } - // XXX - // Note: this will generate a content-inserted reflow operation - // which we need to discard. - mContent->InsertChildAt(bullet, 0); + // Insert the bullet. Do not allow an incremental reflow operation + // to occur. + mContent->InsertChildAt(bullet, 0, PR_FALSE); } return NS_OK; diff --git a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp index b260f980dc9..9c70e1a1648 100644 --- a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp @@ -37,6 +37,7 @@ #include "nsIContentDelegate.h" #include "nsIHTMLContent.h" #include "nsHTMLParts.h" +#include "nsHTMLFrame.h" NS_DEF_PTR(nsIStyleContext); @@ -88,7 +89,8 @@ void nsHTMLContainerFrame::TriggerLink(nsIPresContext& aPresContext, if (NS_OK == aPresContext.GetLinkHandler(&handler)) { // Resolve url to an absolute url nsIURL* docURL = nsnull; - nsIDocument* doc = mContent->GetDocument(); + nsIDocument* doc = nsnull; + mContent->GetDocument(doc); if (nsnull != doc) { docURL = doc->GetDocumentURL(); NS_RELEASE(doc); @@ -315,6 +317,11 @@ nsHTMLContainerFrame::CreateFrameFor(nsIPresContext* aPresContext, aStyleContext, frame); NS_RELEASE(delegate); } + if (NS_OK == rv) { + // Wrap the frame in a view if necessary + rv = nsHTMLFrame::CreateViewForFrame(aPresContext, frame, aStyleContext, + PR_FALSE); + } aResult = frame; return rv; } @@ -435,10 +442,9 @@ nsHTMLContainerFrame::ProcessInitialReflow(nsIPresContext* aPresContext) return rv; } - // XXX - // Note: this will generate a content-inserted reflow operation - // which we need to discard. - mContent->InsertChildAt(bullet, 0); + // Insert the bullet. Do not allow an incremental reflow operation + // to occur. + mContent->InsertChildAt(bullet, 0, PR_FALSE); } return NS_OK;