зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1369903 Part 1: Remove over-specified stylesheet calls in nsDocument. r=emilio
MozReview-Commit-ID: 6YHC0vvvrtn --HG-- extra : rebase_source : 3bdd45f055fc3d9f35080984cd2c5ccbab77b1a6
This commit is contained in:
Родитель
06dbc28572
Коммит
2413824883
|
@ -10089,17 +10089,12 @@ nsIDocument::CreateStaticClone(nsIDocShell* aCloneContainer)
|
|||
RefPtr<StyleSheet> sheet = GetStyleSheetAt(i);
|
||||
if (sheet) {
|
||||
if (sheet->IsApplicable()) {
|
||||
// XXXheycam Need to make ServoStyleSheet cloning work.
|
||||
if (sheet->IsGecko()) {
|
||||
RefPtr<StyleSheet> clonedSheet =
|
||||
sheet->Clone(nullptr, nullptr, clonedDoc, nullptr);
|
||||
NS_WARNING_ASSERTION(clonedSheet,
|
||||
"Cloning a stylesheet didn't work!");
|
||||
if (clonedSheet) {
|
||||
clonedDoc->AddStyleSheet(clonedSheet);
|
||||
}
|
||||
} else {
|
||||
NS_ERROR("stylo: ServoStyleSheet doesn't support cloning");
|
||||
RefPtr<StyleSheet> clonedSheet =
|
||||
sheet->Clone(nullptr, nullptr, clonedDoc, nullptr);
|
||||
NS_WARNING_ASSERTION(clonedSheet,
|
||||
"Cloning a stylesheet didn't work!");
|
||||
if (clonedSheet) {
|
||||
clonedDoc->AddStyleSheet(clonedSheet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10109,17 +10104,12 @@ nsIDocument::CreateStaticClone(nsIDocShell* aCloneContainer)
|
|||
for (StyleSheet* sheet : Reversed(thisAsDoc->mOnDemandBuiltInUASheets)) {
|
||||
if (sheet) {
|
||||
if (sheet->IsApplicable()) {
|
||||
// XXXheycam Need to make ServoStyleSheet cloning work.
|
||||
if (sheet->IsGecko()) {
|
||||
RefPtr<StyleSheet> clonedSheet =
|
||||
sheet->Clone(nullptr, nullptr, clonedDoc, nullptr);
|
||||
NS_WARNING_ASSERTION(clonedSheet,
|
||||
"Cloning a stylesheet didn't work!");
|
||||
if (clonedSheet) {
|
||||
clonedDoc->AddOnDemandBuiltInUASheet(clonedSheet);
|
||||
}
|
||||
} else {
|
||||
NS_ERROR("stylo: ServoStyleSheet doesn't support cloning");
|
||||
RefPtr<StyleSheet> clonedSheet =
|
||||
sheet->Clone(nullptr, nullptr, clonedDoc, nullptr);
|
||||
NS_WARNING_ASSERTION(clonedSheet,
|
||||
"Cloning a stylesheet didn't work!");
|
||||
if (clonedSheet) {
|
||||
clonedDoc->AddOnDemandBuiltInUASheet(clonedSheet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче