зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1321157 - Remove some unnecessary stylo NS_ERROR in nsDocument. r=heycam
MozReview-Commit-ID: JJeArvlHKs6 --HG-- extra : rebase_source : 3a74cf5f7bad6d326745b58f86bd260c78625722
This commit is contained in:
Родитель
cb47ff5513
Коммит
f70f713d45
|
@ -1191,12 +1191,7 @@ nsDOMStyleSheetSetList::EnsureFresh()
|
|||
for (int32_t index = 0; index < count; index++) {
|
||||
StyleSheet* sheet = mDocument->GetStyleSheetAt(index);
|
||||
NS_ASSERTION(sheet, "Null sheet in sheet list!");
|
||||
// XXXheycam ServoStyleSheets don't expose their title yet.
|
||||
if (sheet->IsServo()) {
|
||||
NS_ERROR("stylo: ServoStyleSets don't expose their title yet");
|
||||
continue;
|
||||
}
|
||||
sheet->AsGecko()->GetTitle(title);
|
||||
sheet->GetTitle(title);
|
||||
if (!title.IsEmpty() && !mNames.Contains(title) && !Add(title)) {
|
||||
return;
|
||||
}
|
||||
|
@ -3968,11 +3963,7 @@ nsDocument::AddStyleSheetToStyleSets(StyleSheet* aSheet)
|
|||
className##Init init; \
|
||||
init.mBubbles = true; \
|
||||
init.mCancelable = true; \
|
||||
/* XXXheycam ServoStyleSheet doesn't implement DOM interfaces yet */ \
|
||||
if (aSheet->IsServo()) { \
|
||||
NS_ERROR("stylo: can't dispatch events for ServoStyleSheets yet"); \
|
||||
} \
|
||||
init.mStylesheet = aSheet->IsGecko() ? aSheet->AsGecko() : nullptr; \
|
||||
init.mStylesheet = aSheet; \
|
||||
init.memberName = argName; \
|
||||
\
|
||||
RefPtr<className> event = \
|
||||
|
@ -6005,20 +5996,12 @@ nsIDocument::GetSelectedStyleSheetSet(nsAString& aSheetSet)
|
|||
StyleSheet* sheet = GetStyleSheetAt(index);
|
||||
NS_ASSERTION(sheet, "Null sheet in sheet list!");
|
||||
|
||||
// XXXheycam Make this work with ServoStyleSheets.
|
||||
if (sheet->IsServo()) {
|
||||
NS_ERROR("stylo: can't handle alternate ServoStyleSheets yet");
|
||||
continue;
|
||||
}
|
||||
|
||||
bool disabled;
|
||||
sheet->AsGecko()->GetDisabled(&disabled);
|
||||
if (disabled) {
|
||||
if (sheet->Disabled()) {
|
||||
// Disabled sheets don't affect the currently selected set
|
||||
continue;
|
||||
}
|
||||
|
||||
sheet->AsGecko()->GetTitle(title);
|
||||
sheet->GetTitle(title);
|
||||
|
||||
if (aSheetSet.IsEmpty()) {
|
||||
aSheetSet = title;
|
||||
|
|
Загрузка…
Ссылка в новой задаче