зеркало из 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++) {
|
for (int32_t index = 0; index < count; index++) {
|
||||||
StyleSheet* sheet = mDocument->GetStyleSheetAt(index);
|
StyleSheet* sheet = mDocument->GetStyleSheetAt(index);
|
||||||
NS_ASSERTION(sheet, "Null sheet in sheet list!");
|
NS_ASSERTION(sheet, "Null sheet in sheet list!");
|
||||||
// XXXheycam ServoStyleSheets don't expose their title yet.
|
sheet->GetTitle(title);
|
||||||
if (sheet->IsServo()) {
|
|
||||||
NS_ERROR("stylo: ServoStyleSets don't expose their title yet");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
sheet->AsGecko()->GetTitle(title);
|
|
||||||
if (!title.IsEmpty() && !mNames.Contains(title) && !Add(title)) {
|
if (!title.IsEmpty() && !mNames.Contains(title) && !Add(title)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3968,11 +3963,7 @@ nsDocument::AddStyleSheetToStyleSets(StyleSheet* aSheet)
|
||||||
className##Init init; \
|
className##Init init; \
|
||||||
init.mBubbles = true; \
|
init.mBubbles = true; \
|
||||||
init.mCancelable = true; \
|
init.mCancelable = true; \
|
||||||
/* XXXheycam ServoStyleSheet doesn't implement DOM interfaces yet */ \
|
init.mStylesheet = aSheet; \
|
||||||
if (aSheet->IsServo()) { \
|
|
||||||
NS_ERROR("stylo: can't dispatch events for ServoStyleSheets yet"); \
|
|
||||||
} \
|
|
||||||
init.mStylesheet = aSheet->IsGecko() ? aSheet->AsGecko() : nullptr; \
|
|
||||||
init.memberName = argName; \
|
init.memberName = argName; \
|
||||||
\
|
\
|
||||||
RefPtr<className> event = \
|
RefPtr<className> event = \
|
||||||
|
@ -6005,20 +5996,12 @@ nsIDocument::GetSelectedStyleSheetSet(nsAString& aSheetSet)
|
||||||
StyleSheet* sheet = GetStyleSheetAt(index);
|
StyleSheet* sheet = GetStyleSheetAt(index);
|
||||||
NS_ASSERTION(sheet, "Null sheet in sheet list!");
|
NS_ASSERTION(sheet, "Null sheet in sheet list!");
|
||||||
|
|
||||||
// XXXheycam Make this work with ServoStyleSheets.
|
if (sheet->Disabled()) {
|
||||||
if (sheet->IsServo()) {
|
|
||||||
NS_ERROR("stylo: can't handle alternate ServoStyleSheets yet");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool disabled;
|
|
||||||
sheet->AsGecko()->GetDisabled(&disabled);
|
|
||||||
if (disabled) {
|
|
||||||
// Disabled sheets don't affect the currently selected set
|
// Disabled sheets don't affect the currently selected set
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
sheet->AsGecko()->GetTitle(title);
|
sheet->GetTitle(title);
|
||||||
|
|
||||||
if (aSheetSet.IsEmpty()) {
|
if (aSheetSet.IsEmpty()) {
|
||||||
aSheetSet = title;
|
aSheetSet = title;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче