Bug 648925 - Part 2: Make several css::Rule methods non-virtual and inline. r=bzbarsky

This commit is contained in:
Craig Topper 2011-04-07 20:51:25 -07:00
Родитель c3d4c659c7
Коммит 0a33ba66bb
2 изменённых файлов: 9 добавлений и 23 удалений

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

@ -107,9 +107,16 @@ public:
virtual PRInt32 GetType() const = 0;
virtual nsIStyleSheet* GetStyleSheet() const;
nsCSSStyleSheet* GetStyleSheet() const { return mSheet; }
virtual void SetStyleSheet(nsCSSStyleSheet* aSheet);
virtual void SetParentRule(GroupRule* aRule);
void SetParentRule(GroupRule* aRule) {
// We don't reference count this up reference. The group rule
// will tell us when it's going away or when we're detached from
// it.
mParentRule = aRule;
}
/**
* Clones |this|. Never returns NULL.

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

@ -86,12 +86,6 @@ namespace css {
NS_IMPL_ADDREF(Rule)
NS_IMPL_RELEASE(Rule)
/* virtual */ nsIStyleSheet*
Rule::GetStyleSheet() const
{
return mSheet;
}
/* virtual */ void
Rule::SetStyleSheet(nsCSSStyleSheet* aSheet)
{
@ -101,26 +95,11 @@ Rule::SetStyleSheet(nsCSSStyleSheet* aSheet)
mSheet = aSheet;
}
/* virtual */ void
Rule::SetParentRule(css::GroupRule* aRule)
{
// We don't reference count this up reference. The group rule
// will tell us when it's going away or when we're detached from
// it.
mParentRule = aRule;
}
} // namespace css
} // namespace mozilla
// -------------------------------
// Style Rule List for group rules
//
namespace mozilla {
namespace css {
class NS_FINAL_CLASS GroupRuleRuleList : public nsICSSRuleList
{
public: