Issue #2488 - Part 2: Remove the DeclarationBlock class and use Declaration directly

This commit is contained in:
FranklinDM 2024-03-28 19:04:36 +08:00 committed by roytam1
commit 4d7bdedade
27 changed files with 210 additions and 356 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,7 +548,7 @@ CSSEditUtils::GetCSSInlinePropertyBase(nsINode* aNode,
}
MOZ_ASSERT(aStyleType == eSpecified);
RefPtr<DeclarationBlock> decl = element->GetInlineStyleDeclaration();
RefPtr<css::Declaration> decl = element->GetInlineStyleDeclaration();
if (!decl) {
return NS_OK;
}
@ -556,7 +556,7 @@ CSSEditUtils::GetCSSInlinePropertyBase(nsINode* aNode,
nsCSSProps::LookupProperty(nsDependentAtomString(aProperty),
CSSEnabledState::eForAllContent);
MOZ_ASSERT(prop != eCSSProperty_UNKNOWN);
decl->AsGecko()->GetPropertyValueByID(prop, aValue);
decl->GetPropertyValueByID(prop, aValue);
return NS_OK;
}