mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
Issue #2112 - Part 9: Remove handling for multiple style backends
This commit is contained in:
parent
28cd0ceb47
commit
b96b733bfa
20 changed files with 20 additions and 125 deletions
|
|
@ -2108,21 +2108,16 @@ nsDocument::ResetStylesheetsToURI(nsIURI* aURI)
|
|||
mozAutoDocUpdate upd(this, UPDATE_STYLE, true);
|
||||
if (mStyleSetFilled) {
|
||||
// Skip removing style sheets from the style set if we know we haven't
|
||||
// filled the style set. (This allows us to avoid calling
|
||||
// GetStyleBackendType() too early.)
|
||||
// filled the style set.
|
||||
RemoveDocStyleSheetsFromStyleSets();
|
||||
RemoveStyleSheetsFromStyleSets(mOnDemandBuiltInUASheets, SheetType::Agent);
|
||||
RemoveStyleSheetsFromStyleSets(mAdditionalSheets[eAgentSheet], SheetType::Agent);
|
||||
RemoveStyleSheetsFromStyleSets(mAdditionalSheets[eUserSheet], SheetType::User);
|
||||
RemoveStyleSheetsFromStyleSets(mAdditionalSheets[eAuthorSheet], SheetType::Doc);
|
||||
|
||||
if (GetStyleBackendType() == StyleBackendType::Gecko) {
|
||||
nsStyleSheetService *sheetService = nsStyleSheetService::GetInstance();
|
||||
if (sheetService) {
|
||||
RemoveStyleSheetsFromStyleSets(*sheetService->AuthorStyleSheets(), SheetType::Doc);
|
||||
}
|
||||
} else {
|
||||
NS_ERROR("stylo: nsStyleSheetService doesn't handle ServoStyleSheets yet");
|
||||
nsStyleSheetService *sheetService = nsStyleSheetService::GetInstance();
|
||||
if (sheetService) {
|
||||
RemoveStyleSheetsFromStyleSets(*sheetService->AuthorStyleSheets(), SheetType::Doc);
|
||||
}
|
||||
|
||||
mStyleSetFilled = false;
|
||||
|
|
@ -12248,16 +12243,6 @@ nsIDocument::ReportHasScrollLinkedEffect()
|
|||
"ScrollLinkedEffectFound2");
|
||||
}
|
||||
|
||||
void
|
||||
nsIDocument::UpdateStyleBackendType()
|
||||
{
|
||||
MOZ_ASSERT(mStyleBackendType == StyleBackendType(0),
|
||||
"no need to call UpdateStyleBackendType now");
|
||||
|
||||
// Assume Gecko by default.
|
||||
mStyleBackendType = StyleBackendType::Gecko;
|
||||
}
|
||||
|
||||
Selection*
|
||||
nsIDocument::GetSelection(ErrorResult& aRv)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue