From eda7c241f224095d0c3cd67270b2f54b1e5ae0e6 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Fri, 2 Jul 1999 04:46:19 +0000 Subject: [PATCH] Added function FindPrimaryFrameFor() git-svn-id: svn://10.0.0.236/trunk@37981 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsStyleSet.cpp | 18 ++++++++++++++++++ mozilla/layout/base/nsCSSFrameConstructor.h | 7 +++++++ .../base/public/nsIStyleFrameConstruction.h | 7 +++++++ mozilla/layout/base/public/nsIStyleSet.h | 7 +++++++ mozilla/layout/base/src/nsStyleSet.cpp | 18 ++++++++++++++++++ .../html/style/src/nsCSSFrameConstructor.h | 7 +++++++ mozilla/layout/style/nsStyleSet.cpp | 18 ++++++++++++++++++ 7 files changed, 82 insertions(+) diff --git a/mozilla/content/base/src/nsStyleSet.cpp b/mozilla/content/base/src/nsStyleSet.cpp index 1bf49a58df9..1bbe780c5e5 100644 --- a/mozilla/content/base/src/nsStyleSet.cpp +++ b/mozilla/content/base/src/nsStyleSet.cpp @@ -145,6 +145,13 @@ public: nsIFrame* aParentFrame, nsIFrame** aContinuingFrame); + // Request to find the primary frame associated with a given content object. + // This is typically called by the pres shell when there is no mapping in + // the pres shell hash table + NS_IMETHOD FindPrimaryFrameFor(nsIPresContext* aPresContext, + nsIContent* aContent, + nsIFrame** aFrame); + virtual void List(FILE* out = stdout, PRInt32 aIndent = 0); private: @@ -887,6 +894,17 @@ StyleSetImpl::CreateContinuingFrame(nsIPresContext* aPresContext, aContinuingFrame); } +// Request to find the primary frame associated with a given content object. +// This is typically called by the pres shell when there is no mapping in +// the pres shell hash table +NS_IMETHODIMP +StyleSetImpl::FindPrimaryFrameFor(nsIPresContext* aPresContext, + nsIContent* aContent, + nsIFrame** aFrame) +{ + return mFrameConstructor->FindPrimaryFrameFor(aPresContext, aContent, aFrame); +} + void StyleSetImpl::List(FILE* out, PRInt32 aIndent, nsISupportsArray* aSheets) { PRUint32 cnt = 0; diff --git a/mozilla/layout/base/nsCSSFrameConstructor.h b/mozilla/layout/base/nsCSSFrameConstructor.h index 06599768b9b..a8eec037b9e 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.h +++ b/mozilla/layout/base/nsCSSFrameConstructor.h @@ -112,6 +112,13 @@ public: nsIFrame* aParentFrame, nsIFrame** aContinuingFrame); + // Request to find the primary frame associated with a given content object. + // This is typically called by the pres shell when there is no mapping in + // the pres shell hash table + NS_IMETHOD FindPrimaryFrameFor(nsIPresContext* aPresContext, + nsIContent* aContent, + nsIFrame** aFrame); + NS_IMETHODIMP CreateTreeWidgetContent(nsIPresContext* aPresContext, nsIFrame* aParentFrame, nsIFrame* aPrevFrame, diff --git a/mozilla/layout/base/public/nsIStyleFrameConstruction.h b/mozilla/layout/base/public/nsIStyleFrameConstruction.h index d43be00004a..7923a706004 100644 --- a/mozilla/layout/base/public/nsIStyleFrameConstruction.h +++ b/mozilla/layout/base/public/nsIStyleFrameConstruction.h @@ -102,6 +102,13 @@ public: nsIFrame* aFrame, nsIFrame* aParentFrame, nsIFrame** aContinuingFrame) = 0; + + // Request to find the primary frame associated with a given content object. + // This is typically called by the pres shell when there is no mapping in + // the pres shell hash table + NS_IMETHOD FindPrimaryFrameFor(nsIPresContext* aPresContext, + nsIContent* aContent, + nsIFrame** aFrame) = 0; }; #endif /* nsIStyleFrameConstruction_h___ */ diff --git a/mozilla/layout/base/public/nsIStyleSet.h b/mozilla/layout/base/public/nsIStyleSet.h index 940fac90c73..a36a475c4c6 100644 --- a/mozilla/layout/base/public/nsIStyleSet.h +++ b/mozilla/layout/base/public/nsIStyleSet.h @@ -157,6 +157,13 @@ public: nsIFrame* aParentFrame, nsIFrame** aContinuingFrame) = 0; + // Request to find the primary frame associated with a given content object. + // This is typically called by the pres shell when there is no mapping in + // the pres shell hash table + NS_IMETHOD FindPrimaryFrameFor(nsIPresContext* aPresContext, + nsIContent* aContent, + nsIFrame** aFrame) = 0; + virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) = 0; virtual void ListContexts(nsIStyleContext* aRootContext, FILE* out = stdout, PRInt32 aIndent = 0) = 0; }; diff --git a/mozilla/layout/base/src/nsStyleSet.cpp b/mozilla/layout/base/src/nsStyleSet.cpp index 1bf49a58df9..1bbe780c5e5 100644 --- a/mozilla/layout/base/src/nsStyleSet.cpp +++ b/mozilla/layout/base/src/nsStyleSet.cpp @@ -145,6 +145,13 @@ public: nsIFrame* aParentFrame, nsIFrame** aContinuingFrame); + // Request to find the primary frame associated with a given content object. + // This is typically called by the pres shell when there is no mapping in + // the pres shell hash table + NS_IMETHOD FindPrimaryFrameFor(nsIPresContext* aPresContext, + nsIContent* aContent, + nsIFrame** aFrame); + virtual void List(FILE* out = stdout, PRInt32 aIndent = 0); private: @@ -887,6 +894,17 @@ StyleSetImpl::CreateContinuingFrame(nsIPresContext* aPresContext, aContinuingFrame); } +// Request to find the primary frame associated with a given content object. +// This is typically called by the pres shell when there is no mapping in +// the pres shell hash table +NS_IMETHODIMP +StyleSetImpl::FindPrimaryFrameFor(nsIPresContext* aPresContext, + nsIContent* aContent, + nsIFrame** aFrame) +{ + return mFrameConstructor->FindPrimaryFrameFor(aPresContext, aContent, aFrame); +} + void StyleSetImpl::List(FILE* out, PRInt32 aIndent, nsISupportsArray* aSheets) { PRUint32 cnt = 0; diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.h b/mozilla/layout/html/style/src/nsCSSFrameConstructor.h index 06599768b9b..a8eec037b9e 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.h +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.h @@ -112,6 +112,13 @@ public: nsIFrame* aParentFrame, nsIFrame** aContinuingFrame); + // Request to find the primary frame associated with a given content object. + // This is typically called by the pres shell when there is no mapping in + // the pres shell hash table + NS_IMETHOD FindPrimaryFrameFor(nsIPresContext* aPresContext, + nsIContent* aContent, + nsIFrame** aFrame); + NS_IMETHODIMP CreateTreeWidgetContent(nsIPresContext* aPresContext, nsIFrame* aParentFrame, nsIFrame* aPrevFrame, diff --git a/mozilla/layout/style/nsStyleSet.cpp b/mozilla/layout/style/nsStyleSet.cpp index 1bf49a58df9..1bbe780c5e5 100644 --- a/mozilla/layout/style/nsStyleSet.cpp +++ b/mozilla/layout/style/nsStyleSet.cpp @@ -145,6 +145,13 @@ public: nsIFrame* aParentFrame, nsIFrame** aContinuingFrame); + // Request to find the primary frame associated with a given content object. + // This is typically called by the pres shell when there is no mapping in + // the pres shell hash table + NS_IMETHOD FindPrimaryFrameFor(nsIPresContext* aPresContext, + nsIContent* aContent, + nsIFrame** aFrame); + virtual void List(FILE* out = stdout, PRInt32 aIndent = 0); private: @@ -887,6 +894,17 @@ StyleSetImpl::CreateContinuingFrame(nsIPresContext* aPresContext, aContinuingFrame); } +// Request to find the primary frame associated with a given content object. +// This is typically called by the pres shell when there is no mapping in +// the pres shell hash table +NS_IMETHODIMP +StyleSetImpl::FindPrimaryFrameFor(nsIPresContext* aPresContext, + nsIContent* aContent, + nsIFrame** aFrame) +{ + return mFrameConstructor->FindPrimaryFrameFor(aPresContext, aContent, aFrame); +} + void StyleSetImpl::List(FILE* out, PRInt32 aIndent, nsISupportsArray* aSheets) { PRUint32 cnt = 0;