mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +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
|
||||
{
|
||||
typedef void Destructor(T* aPropertyValue);
|
||||
typedef void DestructorWithFrame(const nsIFrame* aFrame,
|
||||
T* aPropertyValue);
|
||||
typedef void DestructorWithFrame(const nsIFrame* aFrame, T* aPropertyValue);
|
||||
|
||||
template<Destructor Dtor>
|
||||
static constexpr const FramePropertyDescriptor<T> NewWithDestructor()
|
||||
|
|
@ -340,11 +339,9 @@ private:
|
|||
// have a destructor
|
||||
void DestroyValueFor(const nsIFrame* aFrame) {
|
||||
if (mProperty->mDestructor) {
|
||||
mProperty->mDestructor(
|
||||
ReinterpretHelper<void*>::FromInternalValue(mValue));
|
||||
mProperty->mDestructor(ReinterpretHelper<void*>::FromInternalValue(mValue));
|
||||
} else if (mProperty->mDestructorWithFrame) {
|
||||
mProperty->mDestructorWithFrame(
|
||||
aFrame, ReinterpretHelper<void*>::FromInternalValue(mValue));
|
||||
mProperty->mDestructorWithFrame(aFrame, ReinterpretHelper<void*>::FromInternalValue(mValue));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -375,8 +372,10 @@ private:
|
|||
/**
|
||||
* This class encapsulates the properties of a frame.
|
||||
*/
|
||||
inline uint64_t FrameProperties::GetInternal(UntypedDescriptor aProperty,
|
||||
bool* aFoundResult) const {
|
||||
inline uint64_t
|
||||
FrameProperties::GetInternal(UntypedDescriptor aProperty,
|
||||
bool* aFoundResult) const
|
||||
{
|
||||
MOZ_ASSERT(aProperty, "Null property?");
|
||||
|
||||
auto index = mProperties.IndexOf(aProperty, 0, PropertyComparator());
|
||||
|
|
@ -394,9 +393,11 @@ inline uint64_t FrameProperties::GetInternal(UntypedDescriptor aProperty,
|
|||
return mProperties.ElementAt(index).mValue;
|
||||
}
|
||||
|
||||
inline void FrameProperties::SetInternal(UntypedDescriptor aProperty,
|
||||
uint64_t aValue,
|
||||
const nsIFrame* aFrame) {
|
||||
inline void
|
||||
FrameProperties::SetInternal(UntypedDescriptor aProperty,
|
||||
uint64_t aValue,
|
||||
const nsIFrame* aFrame)
|
||||
{
|
||||
MOZ_ASSERT(aProperty, "Null property?");
|
||||
|
||||
auto index = mProperties.IndexOf(aProperty, 0, PropertyComparator());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue