mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +09:00
Issue #2488 - Part 2: Remove the DeclarationBlock class and use Declaration directly
This commit is contained in:
parent
63076e4211
commit
4d7bdedade
27 changed files with 210 additions and 356 deletions
|
|
@ -16,7 +16,7 @@
|
|||
#include "nsIAtom.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/DeclarationBlockInlines.h"
|
||||
#include "mozilla/css/Declaration.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "prprf.h"
|
||||
|
|
@ -149,7 +149,7 @@ nsAttrValue::nsAttrValue(nsIAtom* aValue)
|
|||
SetTo(aValue);
|
||||
}
|
||||
|
||||
nsAttrValue::nsAttrValue(already_AddRefed<DeclarationBlock> aValue,
|
||||
nsAttrValue::nsAttrValue(already_AddRefed<css::Declaration> aValue,
|
||||
const nsAString* aSerialized)
|
||||
: mBits(0)
|
||||
{
|
||||
|
|
@ -419,7 +419,7 @@ nsAttrValue::SetTo(double aValue, const nsAString* aSerialized)
|
|||
}
|
||||
|
||||
void
|
||||
nsAttrValue::SetTo(already_AddRefed<DeclarationBlock> aValue,
|
||||
nsAttrValue::SetTo(already_AddRefed<css::Declaration> aValue,
|
||||
const nsAString* aSerialized)
|
||||
{
|
||||
MiscContainer* cont = EnsureEmptyMiscContainer();
|
||||
|
|
@ -642,7 +642,7 @@ nsAttrValue::ToString(nsAString& aResult) const
|
|||
{
|
||||
aResult.Truncate();
|
||||
MiscContainer *container = GetMiscContainer();
|
||||
if (DeclarationBlock* decl = container->mValue.mCSSDeclaration) {
|
||||
if (css::Declaration* decl = container->mValue.mCSSDeclaration) {
|
||||
decl->ToString(aResult);
|
||||
}
|
||||
const_cast<nsAttrValue*>(this)->SetMiscAtomOrString(&aResult);
|
||||
|
|
@ -1747,7 +1747,7 @@ nsAttrValue::ParseStyleAttribute(const nsAString& aString,
|
|||
}
|
||||
}
|
||||
|
||||
RefPtr<DeclarationBlock> decl;
|
||||
RefPtr<css::Declaration> decl;
|
||||
css::Loader* cssLoader = ownerDoc->CSSLoader();
|
||||
nsCSSParser cssParser(cssLoader);
|
||||
decl = cssParser.ParseStyleAttribute(aString, docURI, baseURI,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue