зеркало из https://github.com/mozilla/pjs.git
Fix HP bustage by moving GetStyleData function templates from nsStyleStruct.h to nsIFrame.h and nsIStyleContext.h b=111883
This commit is contained in:
Родитель
7c43a9f17a
Коммит
00f9823b7d
|
@ -1100,24 +1100,9 @@ inline nsBorderEdges::nsBorderEdges()
|
|||
mOutsideEdge = PR_TRUE;
|
||||
};
|
||||
|
||||
// typesafe mechanisms for accessing style data
|
||||
class nsIFrame;
|
||||
class nsIStyleContext;
|
||||
|
||||
template <class T>
|
||||
inline void
|
||||
GetStyleData(nsIFrame* aFrame, const T** aStyleStruct)
|
||||
{
|
||||
aFrame->GetStyleData(NS_GET_STYLESTRUCTID(T),
|
||||
*NS_REINTERPRET_CAST(const nsStyleStruct**, aStyleStruct));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void
|
||||
GetStyleData(nsIStyleContext* aStyleContext, const T** aStyleStruct)
|
||||
{
|
||||
*aStyleStruct = NS_STATIC_CAST(const T*,
|
||||
aStyleContext->GetStyleData(NS_GET_STYLESTRUCTID(T)));
|
||||
}
|
||||
// typesafe mechanisms for accessing style data, global function
|
||||
// templates |GetStyleData(nsIFrame*, const T**)| and
|
||||
// |GetStyleData(nsIStyleContext*, const T**)|, where T is derived from
|
||||
// nsStyleStruct, are located in nsIStyleContext.h and nsIFrame.h
|
||||
|
||||
#endif /* nsStyleStruct_h___ */
|
||||
|
|
|
@ -1159,4 +1159,14 @@ private:
|
|||
NS_IMETHOD_(nsrefcnt) Release(void) = 0;
|
||||
};
|
||||
|
||||
// typesafe way to access style data. See comment in nsStyleStruct.h
|
||||
// and also overloaded function in nsIStyleContext.h
|
||||
template <class T>
|
||||
inline void
|
||||
GetStyleData(nsIFrame* aFrame, const T** aStyleStruct)
|
||||
{
|
||||
aFrame->GetStyleData(NS_GET_STYLESTRUCTID(T),
|
||||
*NS_REINTERPRET_CAST(const nsStyleStruct**, aStyleStruct));
|
||||
}
|
||||
|
||||
#endif /* nsIFrame_h___ */
|
||||
|
|
|
@ -139,5 +139,14 @@ extern NS_EXPORT nsresult
|
|||
nsRuleNode* aRuleNode,
|
||||
nsIPresContext* aPresContext);
|
||||
|
||||
// typesafe way to access style data. See nsStyleStruct.h and also
|
||||
// overloaded function in nsIFrame.h.
|
||||
template <class T>
|
||||
inline void
|
||||
GetStyleData(nsIStyleContext* aStyleContext, const T** aStyleStruct)
|
||||
{
|
||||
*aStyleStruct = NS_STATIC_CAST(const T*,
|
||||
aStyleContext->GetStyleData(NS_GET_STYLESTRUCTID(T)));
|
||||
}
|
||||
|
||||
#endif /* nsIStyleContext_h___ */
|
||||
|
|
|
@ -1159,4 +1159,14 @@ private:
|
|||
NS_IMETHOD_(nsrefcnt) Release(void) = 0;
|
||||
};
|
||||
|
||||
// typesafe way to access style data. See comment in nsStyleStruct.h
|
||||
// and also overloaded function in nsIStyleContext.h
|
||||
template <class T>
|
||||
inline void
|
||||
GetStyleData(nsIFrame* aFrame, const T** aStyleStruct)
|
||||
{
|
||||
aFrame->GetStyleData(NS_GET_STYLESTRUCTID(T),
|
||||
*NS_REINTERPRET_CAST(const nsStyleStruct**, aStyleStruct));
|
||||
}
|
||||
|
||||
#endif /* nsIFrame_h___ */
|
||||
|
|
|
@ -1100,24 +1100,9 @@ inline nsBorderEdges::nsBorderEdges()
|
|||
mOutsideEdge = PR_TRUE;
|
||||
};
|
||||
|
||||
// typesafe mechanisms for accessing style data
|
||||
class nsIFrame;
|
||||
class nsIStyleContext;
|
||||
|
||||
template <class T>
|
||||
inline void
|
||||
GetStyleData(nsIFrame* aFrame, const T** aStyleStruct)
|
||||
{
|
||||
aFrame->GetStyleData(NS_GET_STYLESTRUCTID(T),
|
||||
*NS_REINTERPRET_CAST(const nsStyleStruct**, aStyleStruct));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void
|
||||
GetStyleData(nsIStyleContext* aStyleContext, const T** aStyleStruct)
|
||||
{
|
||||
*aStyleStruct = NS_STATIC_CAST(const T*,
|
||||
aStyleContext->GetStyleData(NS_GET_STYLESTRUCTID(T)));
|
||||
}
|
||||
// typesafe mechanisms for accessing style data, global function
|
||||
// templates |GetStyleData(nsIFrame*, const T**)| and
|
||||
// |GetStyleData(nsIStyleContext*, const T**)|, where T is derived from
|
||||
// nsStyleStruct, are located in nsIStyleContext.h and nsIFrame.h
|
||||
|
||||
#endif /* nsStyleStruct_h___ */
|
||||
|
|
Загрузка…
Ссылка в новой задаче