This commit is contained in:
buster%netscape.com 1999-02-25 19:55:06 +00:00
Родитель ec65d9d220
Коммит fa4f361607
4 изменённых файлов: 38 добавлений и 0 удалений

Просмотреть файл

@ -37,6 +37,7 @@ class nsIDOMSelection;
class nsString;
class nsStringArray;
class nsICaret;
class nsIStyleContext;
#define NS_IPRESSHELL_IID \
{ 0x76e79c60, 0x944e, 0x11d1, \
@ -147,6 +148,13 @@ public:
NS_IMETHOD GetPrimaryFrameFor(nsIContent* aContent,
nsIFrame** aPrimaryFrame) const = 0;
/** Returns the style context associated with the frame.
* Used by code outside of layout that can't use nsIFrame methods to get
* the style context directly.
*/
NS_IMETHOD GetStyleContextFor(nsIFrame* aFrame,
nsIStyleContext** aStyleContext) const = 0;
/**
* Returns a layout object associated with the primary frame for the content object.
*

Просмотреть файл

@ -272,6 +272,8 @@ public:
NS_IMETHOD GetPageSequenceFrame(nsIPageSequenceFrame** aResult) const;
NS_IMETHOD GetPrimaryFrameFor(nsIContent* aContent,
nsIFrame** aPrimaryFrame) const;
NS_IMETHOD GetStyleContextFor(nsIFrame* aFrame,
nsIStyleContext** aStyleContext) const;
NS_IMETHOD GetLayoutObjectFor(nsIContent* aContent,
nsISupports** aResult) const;
NS_IMETHOD GetPlaceholderFrameFor(nsIFrame* aFrame,
@ -1703,6 +1705,15 @@ PresShell::GetPrimaryFrameFor(nsIContent* aContent,
return NS_OK;
}
NS_IMETHODIMP
PresShell::GetStyleContextFor(nsIFrame* aFrame,
nsIStyleContext** aStyleContext) const
{
if (!aFrame || !aStyleContext) {
return NS_ERROR_NULL_POINTER;
}
return (aFrame->GetStyleContext(aStyleContext));
}
NS_IMETHODIMP
PresShell::GetLayoutObjectFor(nsIContent* aContent,

Просмотреть файл

@ -37,6 +37,7 @@ class nsIDOMSelection;
class nsString;
class nsStringArray;
class nsICaret;
class nsIStyleContext;
#define NS_IPRESSHELL_IID \
{ 0x76e79c60, 0x944e, 0x11d1, \
@ -147,6 +148,13 @@ public:
NS_IMETHOD GetPrimaryFrameFor(nsIContent* aContent,
nsIFrame** aPrimaryFrame) const = 0;
/** Returns the style context associated with the frame.
* Used by code outside of layout that can't use nsIFrame methods to get
* the style context directly.
*/
NS_IMETHOD GetStyleContextFor(nsIFrame* aFrame,
nsIStyleContext** aStyleContext) const = 0;
/**
* Returns a layout object associated with the primary frame for the content object.
*

Просмотреть файл

@ -272,6 +272,8 @@ public:
NS_IMETHOD GetPageSequenceFrame(nsIPageSequenceFrame** aResult) const;
NS_IMETHOD GetPrimaryFrameFor(nsIContent* aContent,
nsIFrame** aPrimaryFrame) const;
NS_IMETHOD GetStyleContextFor(nsIFrame* aFrame,
nsIStyleContext** aStyleContext) const;
NS_IMETHOD GetLayoutObjectFor(nsIContent* aContent,
nsISupports** aResult) const;
NS_IMETHOD GetPlaceholderFrameFor(nsIFrame* aFrame,
@ -1703,6 +1705,15 @@ PresShell::GetPrimaryFrameFor(nsIContent* aContent,
return NS_OK;
}
NS_IMETHODIMP
PresShell::GetStyleContextFor(nsIFrame* aFrame,
nsIStyleContext** aStyleContext) const
{
if (!aFrame || !aStyleContext) {
return NS_ERROR_NULL_POINTER;
}
return (aFrame->GetStyleContext(aStyleContext));
}
NS_IMETHODIMP
PresShell::GetLayoutObjectFor(nsIContent* aContent,