зеркало из https://github.com/mozilla/gecko-dev.git
added subclass hook for style post-processing
This commit is contained in:
Родитель
3290c4a875
Коммит
36ad79f92e
|
@ -195,6 +195,9 @@ NS_METHOD nsFrame::GetStyleContext(nsIPresContext* aPresContext,
|
|||
{
|
||||
if ((nsnull == mStyleContext) && (nsnull != aPresContext)) {
|
||||
mStyleContext = aPresContext->ResolveStyleContextFor(mContent, mGeometricParent); // XXX should be content parent???
|
||||
if (nsnull != mStyleContext) {
|
||||
DidSetStyleContext();
|
||||
}
|
||||
}
|
||||
NS_IF_ADDREF(mStyleContext);
|
||||
aStyleContext = mStyleContext;
|
||||
|
@ -209,12 +212,19 @@ NS_METHOD nsFrame::SetStyleContext(nsIStyleContext* aContext)
|
|||
if (nsnull != aContext) {
|
||||
mStyleContext = aContext;
|
||||
NS_ADDREF(aContext);
|
||||
DidSetStyleContext();
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Subclass hook for style post processing
|
||||
NS_METHOD nsFrame::DidSetStyleContext(void)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD nsFrame::GetStyleData(const nsIID& aSID, nsStyleStruct*& aStyleStruct)
|
||||
{
|
||||
NS_ASSERTION(mStyleContext!=nsnull,"null style context");
|
||||
|
|
|
@ -170,6 +170,8 @@ public:
|
|||
NS_IMETHOD VerifyTree() const;
|
||||
|
||||
protected:
|
||||
// Style post processing hook
|
||||
NS_METHOD DidSetStyleContext(void);
|
||||
|
||||
// Selection Methods
|
||||
NS_METHOD HandlePress(nsIPresContext& aPresContext,
|
||||
|
|
Загрузка…
Ссылка в новой задаче