Attach FrameProperties to each frame instead of using a shared hashtable

Dispense the shared hashtable and instead attach the frame property list directly to nsIFrame.
This commit is contained in:
win7-7 2019-06-26 01:51:45 +03:00 committed by Roy Tam
commit 922e819d1c
62 changed files with 738 additions and 945 deletions

View file

@ -167,8 +167,7 @@ FindCellProperty(const nsIFrame* aCellFrame,
nsTArray<int8_t>* propertyData = nullptr;
while (currentFrame) {
FrameProperties props = currentFrame->Properties();
propertyData = props.Get(aFrameProperty);
propertyData = currentFrame->GetProperty(aFrameProperty);
bool frameIsTable = (currentFrame->GetType() == nsGkAtoms::tableFrame);
if (propertyData || frameIsTable)
@ -361,8 +360,7 @@ ParseFrameAttribute(nsIFrame* aFrame,
if (valueList) {
// The code reading the property assumes that this list is nonempty.
NS_ASSERTION(valueList->Length() >= 1, "valueList should not be empty!");
FrameProperties props = aFrame->Properties();
props.Set(AttributeToProperty(aAttribute), valueList);
aFrame->SetProperty(AttributeToProperty(aAttribute), valueList);
} else {
ReportParseError(aFrame, aAttribute->GetUTF16String(), attrValue.get());
}
@ -769,8 +767,7 @@ nsMathMLmtableWrapperFrame::AttributeChanged(int32_t aNameSpaceID,
aAttribute == nsGkAtoms::columnalign_ ||
aAttribute == nsGkAtoms::columnlines_) {
// clear any cached property list for this table
presContext->PropertyTable()->
Delete(tableFrame, AttributeToProperty(aAttribute));
tableFrame->DeleteProperty(AttributeToProperty(aAttribute));
// Reparse the new attribute on the table.
ParseFrameAttribute(tableFrame, aAttribute, true);
} else {
@ -1120,7 +1117,7 @@ nsMathMLmtrFrame::AttributeChanged(int32_t aNameSpaceID,
return NS_OK;
}
presContext->PropertyTable()->Delete(this, AttributeToProperty(aAttribute));
DeleteProperty(AttributeToProperty(aAttribute));
bool allowMultiValues = (aAttribute == nsGkAtoms::columnalign_);
@ -1219,8 +1216,7 @@ nsMathMLmtdFrame::AttributeChanged(int32_t aNameSpaceID,
if (aAttribute == nsGkAtoms::rowalign_ ||
aAttribute == nsGkAtoms::columnalign_) {
nsPresContext* presContext = PresContext();
presContext->PropertyTable()->Delete(this, AttributeToProperty(aAttribute));
DeleteProperty(AttributeToProperty(aAttribute));
// Reparse the attribute.
ParseFrameAttribute(this, aAttribute, false);