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:
@@ -5823,7 +5823,7 @@ AddGenConPseudoToFrame(nsIFrame* aOwnerFrame, nsIContent* aContent)
|
||||
"property should only be set on first continuation/ib-sibling");
|
||||
|
||||
typedef nsAutoTArray<nsIContent*, 2> T;
|
||||
const FramePropertyDescriptor* prop = nsIFrame::GenConProperty();
|
||||
const FramePropertyDescriptor<>* prop = nsIFrame::GenConProperty();
|
||||
FrameProperties props = aOwnerFrame->Properties();
|
||||
T* value = static_cast<T*>(props.Get(prop));
|
||||
if (!value) {
|
||||
|
||||
Reference in New Issue
Block a user