Bug 1230034 part 4 - Make FramePropertyDescriptor to be a template. r=froydnj,dbaron
This patch makes methods of FramePropertyTable and FrameProperties to be simple template wrapper functions. Then it converts all references to FramePropertyDescriptor to use "void" parameter to simulate the current unsafe behavior. SmallValueHolder is used for storing small values like int32_t, float, which can fit in the size of a pointer directly, and thus no lifetime management is needed.
This commit is contained in:
@@ -136,7 +136,7 @@ NS_DECLARE_FRAME_PROPERTY(RowLinesProperty, DeleteValue<nsTArray<int8_t>>)
|
||||
NS_DECLARE_FRAME_PROPERTY(ColumnAlignProperty, DeleteValue<nsTArray<int8_t>>)
|
||||
NS_DECLARE_FRAME_PROPERTY(ColumnLinesProperty, DeleteValue<nsTArray<int8_t>>)
|
||||
|
||||
static const FramePropertyDescriptor*
|
||||
static const FramePropertyDescriptor<>*
|
||||
AttributeToProperty(nsIAtom* aAttribute)
|
||||
{
|
||||
if (aAttribute == nsGkAtoms::rowalign_)
|
||||
@@ -157,7 +157,7 @@ AttributeToProperty(nsIAtom* aAttribute)
|
||||
*/
|
||||
static nsTArray<int8_t>*
|
||||
FindCellProperty(const nsIFrame* aCellFrame,
|
||||
const FramePropertyDescriptor* aFrameProperty)
|
||||
const FramePropertyDescriptor<>* aFrameProperty)
|
||||
{
|
||||
const nsIFrame* currentFrame = aCellFrame;
|
||||
nsTArray<int8_t>* propertyData = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user