зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1328420 Part 5: Uplift AppendStyleSheet to StyleSheet. r=heycam
MozReview-Commit-ID: CwNGWsJi65G --HG-- extra : rebase_source : e493df5984f92b4d2b3c9bbf153f24ac2dffc441
This commit is contained in:
Родитель
98d1dbc01c
Коммит
6f5346abb4
|
@ -636,25 +636,6 @@ CSSStyleSheet::FindOwningWindowInnerID() const
|
|||
return windowID;
|
||||
}
|
||||
|
||||
void
|
||||
CSSStyleSheet::AppendStyleSheet(CSSStyleSheet* aSheet)
|
||||
{
|
||||
NS_PRECONDITION(nullptr != aSheet, "null arg");
|
||||
|
||||
WillDirty();
|
||||
RefPtr<StyleSheet>* tail = &SheetInfo().mFirstChild;
|
||||
while (*tail) {
|
||||
tail = &(*tail)->mNext;
|
||||
}
|
||||
*tail = aSheet;
|
||||
|
||||
// This is not reference counted. Our parent tells us when
|
||||
// it's going away.
|
||||
aSheet->mParent = this;
|
||||
aSheet->mDocument = mDocument;
|
||||
DidDirty();
|
||||
}
|
||||
|
||||
void
|
||||
CSSStyleSheet::AppendStyleRule(css::Rule* aRule)
|
||||
{
|
||||
|
|
|
@ -114,8 +114,6 @@ public:
|
|||
void List(FILE* out = stdout, int32_t aIndent = 0) const;
|
||||
#endif
|
||||
|
||||
void AppendStyleSheet(CSSStyleSheet* aSheet);
|
||||
|
||||
// XXX do these belong here or are they generic?
|
||||
void AppendStyleRule(css::Rule* aRule);
|
||||
|
||||
|
|
|
@ -54,12 +54,6 @@ ServoStyleSheet::HasRules() const
|
|||
return mSheet && Servo_StyleSheet_HasRules(mSheet);
|
||||
}
|
||||
|
||||
void
|
||||
ServoStyleSheet::AppendStyleSheet(ServoStyleSheet* aSheet)
|
||||
{
|
||||
aSheet->mDocument = mDocument;
|
||||
}
|
||||
|
||||
nsresult
|
||||
ServoStyleSheet::ParseSheet(css::Loader* aLoader,
|
||||
const nsAString& aInput,
|
||||
|
|
|
@ -39,8 +39,6 @@ public:
|
|||
|
||||
bool HasRules() const;
|
||||
|
||||
void AppendStyleSheet(ServoStyleSheet* aSheet);
|
||||
|
||||
MOZ_MUST_USE nsresult ParseSheet(css::Loader* aLoader,
|
||||
const nsAString& aInput,
|
||||
nsIURI* aSheetURI,
|
||||
|
|
|
@ -398,6 +398,25 @@ StyleSheet::ClearAssociatedDocument()
|
|||
SetAssociatedDocument(nullptr, NotOwnedByDocument);
|
||||
}
|
||||
|
||||
void
|
||||
StyleSheet::AppendStyleSheet(StyleSheet* aSheet)
|
||||
{
|
||||
NS_PRECONDITION(nullptr != aSheet, "null arg");
|
||||
|
||||
WillDirty();
|
||||
RefPtr<StyleSheet>* tail = &SheetInfo().mFirstChild;
|
||||
while (*tail) {
|
||||
tail = &(*tail)->mNext;
|
||||
}
|
||||
*tail = aSheet;
|
||||
|
||||
// This is not reference counted. Our parent tells us when
|
||||
// it's going away.
|
||||
aSheet->mParent = this;
|
||||
aSheet->mDocument = mDocument;
|
||||
DidDirty();
|
||||
}
|
||||
|
||||
void
|
||||
StyleSheet::SetMedia(nsMediaList* aMedia)
|
||||
{
|
||||
|
|
|
@ -128,7 +128,7 @@ public:
|
|||
nsINode* GetOwnerNode() const { return mOwningNode; }
|
||||
inline StyleSheet* GetParentSheet() const { return mParent; }
|
||||
|
||||
inline void AppendStyleSheet(StyleSheet* aSheet);
|
||||
void AppendStyleSheet(StyleSheet* aSheet);
|
||||
|
||||
StyleSheet* GetFirstChild() const;
|
||||
|
||||
|
|
|
@ -97,13 +97,6 @@ StyleSheet::GetParentObject() const
|
|||
return dom::ParentObject(GetParentSheet());
|
||||
}
|
||||
|
||||
void
|
||||
StyleSheet::AppendStyleSheet(StyleSheet* aSheet)
|
||||
{
|
||||
MOZ_STYLO_FORWARD_CONCRETE(AppendStyleSheet,
|
||||
(aSheet->AsGecko()), (aSheet->AsServo()))
|
||||
}
|
||||
|
||||
nsIPrincipal*
|
||||
StyleSheet::Principal() const
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче