mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +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
|
|
@ -19,7 +19,6 @@
|
|||
#include "nsIFrame.h"
|
||||
#include "ActiveLayerTracker.h"
|
||||
#include "StyleSetHandle.h"
|
||||
#include "DeclarationBlockInlines.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
|
@ -73,7 +72,7 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMCSSAttributeDeclaration)
|
|||
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMCSSAttributeDeclaration)
|
||||
|
||||
nsresult
|
||||
nsDOMCSSAttributeDeclaration::SetCSSDeclaration(DeclarationBlock* aDecl)
|
||||
nsDOMCSSAttributeDeclaration::SetCSSDeclaration(css::Declaration* aDecl)
|
||||
{
|
||||
NS_ASSERTION(mElement, "Must have Element to set the declaration!");
|
||||
return mIsSMILOverride
|
||||
|
|
@ -89,13 +88,13 @@ nsDOMCSSAttributeDeclaration::DocToUpdate()
|
|||
return mElement->OwnerDoc();
|
||||
}
|
||||
|
||||
DeclarationBlock*
|
||||
css::Declaration*
|
||||
nsDOMCSSAttributeDeclaration::GetCSSDeclaration(Operation aOperation)
|
||||
{
|
||||
if (!mElement)
|
||||
return nullptr;
|
||||
|
||||
DeclarationBlock* declaration;
|
||||
css::Declaration* declaration;
|
||||
if (mIsSMILOverride) {
|
||||
declaration = mElement->GetSMILOverrideStyleDeclaration();
|
||||
} else {
|
||||
|
|
@ -132,9 +131,9 @@ nsDOMCSSAttributeDeclaration::GetCSSDeclaration(Operation aOperation)
|
|||
}
|
||||
|
||||
// cannot fail
|
||||
RefPtr<DeclarationBlock> decl;
|
||||
RefPtr<css::Declaration> decl;
|
||||
decl = new css::Declaration();
|
||||
decl->AsGecko()->InitializeEmpty();
|
||||
decl->InitializeEmpty();
|
||||
|
||||
// this *can* fail (inside SetAttrAndNotify, at least).
|
||||
nsresult rv;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue