mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 15:17:29 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
e43876ec84
1 changed files with 12 additions and 11 deletions
|
|
@ -68,8 +68,7 @@ template<typename T>
|
||||||
struct FramePropertyDescriptor : public FramePropertyDescriptorUntyped
|
struct FramePropertyDescriptor : public FramePropertyDescriptorUntyped
|
||||||
{
|
{
|
||||||
typedef void Destructor(T* aPropertyValue);
|
typedef void Destructor(T* aPropertyValue);
|
||||||
typedef void DestructorWithFrame(const nsIFrame* aFrame,
|
typedef void DestructorWithFrame(const nsIFrame* aFrame, T* aPropertyValue);
|
||||||
T* aPropertyValue);
|
|
||||||
|
|
||||||
template<Destructor Dtor>
|
template<Destructor Dtor>
|
||||||
static constexpr const FramePropertyDescriptor<T> NewWithDestructor()
|
static constexpr const FramePropertyDescriptor<T> NewWithDestructor()
|
||||||
|
|
@ -340,11 +339,9 @@ private:
|
||||||
// have a destructor
|
// have a destructor
|
||||||
void DestroyValueFor(const nsIFrame* aFrame) {
|
void DestroyValueFor(const nsIFrame* aFrame) {
|
||||||
if (mProperty->mDestructor) {
|
if (mProperty->mDestructor) {
|
||||||
mProperty->mDestructor(
|
mProperty->mDestructor(ReinterpretHelper<void*>::FromInternalValue(mValue));
|
||||||
ReinterpretHelper<void*>::FromInternalValue(mValue));
|
|
||||||
} else if (mProperty->mDestructorWithFrame) {
|
} else if (mProperty->mDestructorWithFrame) {
|
||||||
mProperty->mDestructorWithFrame(
|
mProperty->mDestructorWithFrame(aFrame, ReinterpretHelper<void*>::FromInternalValue(mValue));
|
||||||
aFrame, ReinterpretHelper<void*>::FromInternalValue(mValue));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -375,8 +372,10 @@ private:
|
||||||
/**
|
/**
|
||||||
* This class encapsulates the properties of a frame.
|
* This class encapsulates the properties of a frame.
|
||||||
*/
|
*/
|
||||||
inline uint64_t FrameProperties::GetInternal(UntypedDescriptor aProperty,
|
inline uint64_t
|
||||||
bool* aFoundResult) const {
|
FrameProperties::GetInternal(UntypedDescriptor aProperty,
|
||||||
|
bool* aFoundResult) const
|
||||||
|
{
|
||||||
MOZ_ASSERT(aProperty, "Null property?");
|
MOZ_ASSERT(aProperty, "Null property?");
|
||||||
|
|
||||||
auto index = mProperties.IndexOf(aProperty, 0, PropertyComparator());
|
auto index = mProperties.IndexOf(aProperty, 0, PropertyComparator());
|
||||||
|
|
@ -394,9 +393,11 @@ inline uint64_t FrameProperties::GetInternal(UntypedDescriptor aProperty,
|
||||||
return mProperties.ElementAt(index).mValue;
|
return mProperties.ElementAt(index).mValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void FrameProperties::SetInternal(UntypedDescriptor aProperty,
|
inline void
|
||||||
|
FrameProperties::SetInternal(UntypedDescriptor aProperty,
|
||||||
uint64_t aValue,
|
uint64_t aValue,
|
||||||
const nsIFrame* aFrame) {
|
const nsIFrame* aFrame)
|
||||||
|
{
|
||||||
MOZ_ASSERT(aProperty, "Null property?");
|
MOZ_ASSERT(aProperty, "Null property?");
|
||||||
|
|
||||||
auto index = mProperties.IndexOf(aProperty, 0, PropertyComparator());
|
auto index = mProperties.IndexOf(aProperty, 0, PropertyComparator());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue