1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00
Files
UXP/layout/style/DeclarationBlockInlines.h
T
FranklinDM d6852b3170 Issue #2112 - Part 10: Remove remaining Stylo/Servo includes and code
Some classes have been marked for removal/merging, macros used for forwarding/casting were moved to DeprecatedUtils.h.
2024-04-02 22:44:24 +08:00

107 lines
2.3 KiB
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_DeclarationBlockInlines_h
#define mozilla_DeclarationBlockInlines_h
#include "mozilla/css/Declaration.h"
namespace mozilla {
MOZ_DEFINE_DEPRECATED_METHODS(DeclarationBlock, css::Declaration)
MozExternalRefCountType
DeclarationBlock::AddRef()
{
return AsGecko()->AddRef();
}
MozExternalRefCountType
DeclarationBlock::Release()
{
return AsGecko()->Release();
}
already_AddRefed<DeclarationBlock>
DeclarationBlock::Clone() const
{
RefPtr<DeclarationBlock> result;
result = new css::Declaration(*AsGecko());
return result.forget();
}
already_AddRefed<DeclarationBlock>
DeclarationBlock::EnsureMutable()
{
#ifdef DEBUG
AsGecko()->AssertNotExpanded();
#endif
if (!IsMutable()) {
return Clone();
}
return do_AddRef(this);
}
void
DeclarationBlock::ToString(nsAString& aString) const
{
AsGecko()->ToString(aString);
}
uint32_t
DeclarationBlock::Count() const
{
return AsGecko()->Count();
}
bool
DeclarationBlock::GetNthProperty(uint32_t aIndex, nsAString& aReturn) const
{
return AsGecko()->GetNthProperty(aIndex, aReturn);
}
void
DeclarationBlock::GetPropertyValue(const nsAString& aProperty,
nsAString& aValue) const
{
AsGecko()->GetPropertyValue(aProperty, aValue);
}
void
DeclarationBlock::GetPropertyValueByID(nsCSSPropertyID aPropID,
nsAString& aValue) const
{
AsGecko()->GetPropertyValueByID(aPropID, aValue);
}
void
DeclarationBlock::GetAuthoredPropertyValue(const nsAString& aProperty,
nsAString& aValue) const
{
AsGecko()->GetAuthoredPropertyValue(aProperty, aValue);
}
bool
DeclarationBlock::GetPropertyIsImportant(const nsAString& aProperty) const
{
return AsGecko()->GetPropertyIsImportant(aProperty);
}
void
DeclarationBlock::RemoveProperty(const nsAString& aProperty)
{
AsGecko()->RemoveProperty(aProperty);
}
void
DeclarationBlock::RemovePropertyByID(nsCSSPropertyID aProperty)
{
AsGecko()->RemovePropertyByID(aProperty);
}
} // namespace mozilla
#endif // mozilla_DeclarationBlockInlines_h