Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-04-02 22:57:21 +08:00
commit a944026bae
276 changed files with 1072 additions and 11108 deletions

View file

@ -9,8 +9,8 @@
#include "mozilla/ChangeStyleTransaction.h"
#include "mozilla/HTMLEditor.h"
#include "mozilla/Preferences.h"
#include "mozilla/DeclarationBlockInlines.h"
#include "mozilla/css/StyleRule.h"
#include "mozilla/css/Declaration.h"
#include "mozilla/dom/Element.h"
#include "mozilla/mozalloc.h"
#include "nsAString.h"
@ -548,19 +548,15 @@ CSSEditUtils::GetCSSInlinePropertyBase(nsINode* aNode,
}
MOZ_ASSERT(aStyleType == eSpecified);
RefPtr<DeclarationBlock> decl = element->GetInlineStyleDeclaration();
RefPtr<css::Declaration> decl = element->GetInlineStyleDeclaration();
if (!decl) {
return NS_OK;
}
if (decl->IsServo()) {
MOZ_CRASH("stylo: not implemented");
return NS_ERROR_NOT_IMPLEMENTED;
}
nsCSSPropertyID prop =
nsCSSProps::LookupProperty(nsDependentAtomString(aProperty),
CSSEnabledState::eForAllContent);
MOZ_ASSERT(prop != eCSSProperty_UNKNOWN);
decl->AsGecko()->GetPropertyValueByID(prop, aValue);
decl->GetPropertyValueByID(prop, aValue);
return NS_OK;
}

View file

@ -2907,12 +2907,7 @@ HTMLEditor::EnableStyleSheet(const nsAString& aURL,
nsCOMPtr<nsIDocument> document = GetDocument();
sheet->SetAssociatedDocument(document, StyleSheet::NotOwnedByDocument);
if (sheet->IsServo()) {
// XXXheycam ServoStyleSheets don't support being enabled/disabled yet.
NS_ERROR("stylo: ServoStyleSheets can't be disabled yet");
return NS_ERROR_FAILURE;
}
return sheet->AsGecko()->SetDisabled(!aEnable);
return sheet->AsConcrete()->SetDisabled(!aEnable);
}
bool
@ -2929,12 +2924,7 @@ HTMLEditor::EnableExistingStyleSheet(const nsAString& aURL)
nsCOMPtr<nsIDocument> document = GetDocument();
sheet->SetAssociatedDocument(document, StyleSheet::NotOwnedByDocument);
if (sheet->IsServo()) {
// XXXheycam ServoStyleSheets don't support being enabled/disabled yet.
NS_ERROR("stylo: ServoStyleSheets can't be disabled yet");
return true;
}
sheet->AsGecko()->SetDisabled(false);
sheet->AsConcrete()->SetDisabled(false);
return true;
}