mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Issue #2112 - Part 5: Remove Servo from forwarding code used by magic pointer classes
This commit is contained in:
parent
b1c9206051
commit
a93a7bed47
52 changed files with 274 additions and 1116 deletions
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
/* container for a document and its presentation */
|
||||
|
||||
#include "mozilla/ServoStyleSet.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nscore.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
|
@ -2279,12 +2278,7 @@ nsDocumentViewer::CreateStyleSet(nsIDocument* aDocument)
|
|||
|
||||
StyleBackendType backendType = aDocument->GetStyleBackendType();
|
||||
|
||||
StyleSetHandle styleSet;
|
||||
if (backendType == StyleBackendType::Gecko) {
|
||||
styleSet = new nsStyleSet();
|
||||
} else {
|
||||
styleSet = new ServoStyleSet();
|
||||
}
|
||||
StyleSetHandle styleSet = new nsStyleSet();
|
||||
|
||||
styleSet->BeginUpdate();
|
||||
|
||||
|
|
@ -2440,19 +2434,14 @@ nsDocumentViewer::CreateStyleSet(nsIDocument* aDocument)
|
|||
}
|
||||
}
|
||||
|
||||
if (styleSet->IsGecko()) {
|
||||
nsStyleSheetService* sheetService = nsStyleSheetService::GetInstance();
|
||||
if (sheetService) {
|
||||
for (StyleSheet* sheet : *sheetService->AgentStyleSheets()) {
|
||||
styleSet->AppendStyleSheet(SheetType::Agent, sheet);
|
||||
}
|
||||
for (StyleSheet* sheet : Reversed(*sheetService->UserStyleSheets())) {
|
||||
styleSet->PrependStyleSheet(SheetType::User, sheet);
|
||||
}
|
||||
nsStyleSheetService* sheetService = nsStyleSheetService::GetInstance();
|
||||
if (sheetService) {
|
||||
for (StyleSheet* sheet : *sheetService->AgentStyleSheets()) {
|
||||
styleSet->AppendStyleSheet(SheetType::Agent, sheet);
|
||||
}
|
||||
for (StyleSheet* sheet : Reversed(*sheetService->UserStyleSheets())) {
|
||||
styleSet->PrependStyleSheet(SheetType::User, sheet);
|
||||
}
|
||||
} else {
|
||||
NS_WARNING("stylo: Not yet checking nsStyleSheetService for Servo-backed "
|
||||
"documents. See bug 1290224");
|
||||
}
|
||||
|
||||
// Caller will handle calling EndUpdate, per contract.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue