зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1613349 - Rename nsIFrame::DeleteProperty to RemoveProperty. r=dholbert
As it doesn't necessarily call delete and that may be confusing. Differential Revision: https://phabricator.services.mozilla.com/D61764 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
bf6256b1fc
Коммит
c5c0ef9787
|
@ -138,7 +138,7 @@ struct BlobItemData {
|
|||
if (mArray->IsEmpty()) {
|
||||
// If the frame is in the process of being destroyed this will fail
|
||||
// but that's ok, because the the property will be removed then anyways
|
||||
mFrame->DeleteProperty(BlobGroupDataProperty());
|
||||
mFrame->RemoveProperty(BlobGroupDataProperty());
|
||||
}
|
||||
mFrame = nullptr;
|
||||
}
|
||||
|
|
|
@ -231,13 +231,13 @@ class FrameProperties {
|
|||
}
|
||||
|
||||
/**
|
||||
* Remove and destroy a property value. This requires a linear search
|
||||
* through the properties of the frame. If the frame has no such
|
||||
* property, nothing happens.
|
||||
* Remove and destroy a property value. This requires a linear search through
|
||||
* the properties of the frame. If the frame has no such property, nothing
|
||||
* happens.
|
||||
*/
|
||||
template <typename T>
|
||||
void Delete(Descriptor<T> aProperty, const nsIFrame* aFrame) {
|
||||
DeleteInternal(aProperty, aFrame);
|
||||
void Remove(Descriptor<T> aProperty, const nsIFrame* aFrame) {
|
||||
RemoveInternal(aProperty, aFrame);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -261,7 +261,7 @@ class FrameProperties {
|
|||
/**
|
||||
* Remove and destroy all property values for the frame.
|
||||
*/
|
||||
void DeleteAll(const nsIFrame* aFrame) {
|
||||
void RemoveAll(const nsIFrame* aFrame) {
|
||||
nsTArray<PropertyValue> toDelete;
|
||||
toDelete.SwapElements(mProperties);
|
||||
for (auto& prop : toDelete) {
|
||||
|
@ -295,7 +295,7 @@ class FrameProperties {
|
|||
|
||||
inline void* TakeInternal(UntypedDescriptor aProperty, bool* aFoundResult);
|
||||
|
||||
inline void DeleteInternal(UntypedDescriptor aProperty,
|
||||
inline void RemoveInternal(UntypedDescriptor aProperty,
|
||||
const nsIFrame* aFrame);
|
||||
|
||||
template <typename T>
|
||||
|
@ -428,7 +428,7 @@ inline void* FrameProperties::TakeInternal(UntypedDescriptor aProperty,
|
|||
return result;
|
||||
}
|
||||
|
||||
inline void FrameProperties::DeleteInternal(UntypedDescriptor aProperty,
|
||||
inline void FrameProperties::RemoveInternal(UntypedDescriptor aProperty,
|
||||
const nsIFrame* aFrame) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aProperty, "Null property?");
|
||||
|
|
|
@ -2069,7 +2069,7 @@ void PresShell::NotifyDestroyingFrame(nsIFrame* aFrame) {
|
|||
mDirtyRoots.Remove(aFrame);
|
||||
|
||||
// Remove frame properties
|
||||
aFrame->DeleteAllProperties();
|
||||
aFrame->RemoveAllProperties();
|
||||
|
||||
if (aFrame == mCurrentEventFrame) {
|
||||
mCurrentEventContent = aFrame->GetContent();
|
||||
|
|
|
@ -10359,7 +10359,7 @@ void nsCSSFrameConstructor::RemoveLetterFrames(PresShell* aPresShell,
|
|||
nsContainerFrame* aBlockFrame) {
|
||||
aBlockFrame =
|
||||
static_cast<nsContainerFrame*>(aBlockFrame->FirstContinuation());
|
||||
aBlockFrame->DeleteProperty(nsContainerFrame::FirstLetterProperty());
|
||||
aBlockFrame->RemoveProperty(nsContainerFrame::FirstLetterProperty());
|
||||
nsContainerFrame* continuation = aBlockFrame;
|
||||
|
||||
bool stopLooking = false;
|
||||
|
|
|
@ -135,7 +135,7 @@ void nsTextControlFrame::DestroyFrom(nsIFrame* aDestructRoot,
|
|||
PostDestroyData& aPostDestroyData) {
|
||||
mScrollEvent.Revoke();
|
||||
|
||||
DeleteProperty(TextControlInitializer());
|
||||
RemoveProperty(TextControlInitializer());
|
||||
|
||||
// Unbind the text editor state object from the frame. The editor will live
|
||||
// on, but things like controllers will be released.
|
||||
|
|
|
@ -326,7 +326,7 @@ class nsTextControlFrame : public nsContainerFrame,
|
|||
SetSelectionEndPoints(uint32_t aSelStart, uint32_t aSelEnd,
|
||||
SelectionDirection aDirection = eNone);
|
||||
|
||||
void FinishedInitializer() { DeleteProperty(TextControlInitializer()); }
|
||||
void FinishedInitializer() { RemoveProperty(TextControlInitializer()); }
|
||||
|
||||
const nsAString& CachedValue() const { return mCachedValue; }
|
||||
|
||||
|
|
|
@ -973,7 +973,7 @@ bool BlockReflowInput::FlowAndPlaceFloat(nsIFrame* aFloat) {
|
|||
}
|
||||
} else if (invalidationData) {
|
||||
invalidationData = nullptr;
|
||||
aFloat->DeleteProperty(ShapeInvalidationDataProperty());
|
||||
aFloat->RemoveProperty(ShapeInvalidationDataProperty());
|
||||
}
|
||||
|
||||
if (!reflowStatus.IsFullyComplete()) {
|
||||
|
|
|
@ -1058,7 +1058,7 @@ void ReflowInput::ApplyRelativePositioning(nsIFrame* aFrame,
|
|||
"We assume that changing the 'position' property causes "
|
||||
"frame reconstruction. If that ever changes, this code "
|
||||
"should call "
|
||||
"aFrame->DeleteProperty(nsIFrame::NormalPositionProperty())");
|
||||
"aFrame->RemoveProperty(nsIFrame::NormalPositionProperty())");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2518,7 +2518,7 @@ static void UpdateProp(nsIFrame* aFrame,
|
|||
aFrame->AddProperty(aProperty, new nsMargin(aNewValue));
|
||||
}
|
||||
} else {
|
||||
aFrame->DeleteProperty(aProperty);
|
||||
aFrame->RemoveProperty(aProperty);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2533,7 +2533,7 @@ void SizeComputationInput::InitOffsets(WritingMode aWM, nscoord aPercentBasis,
|
|||
// Since we are in reflow, we don't need to store these properties anymore
|
||||
// unless they are dependent on width, in which case we store the new value.
|
||||
nsPresContext* presContext = mFrame->PresContext();
|
||||
mFrame->DeleteProperty(nsIFrame::UsedBorderProperty());
|
||||
mFrame->RemoveProperty(nsIFrame::UsedBorderProperty());
|
||||
|
||||
// Compute margins from the specified margin style information. These
|
||||
// become the default computed values, and may be adjusted below
|
||||
|
|
|
@ -24,7 +24,7 @@ void RubyUtils::SetReservedISize(nsIFrame* aFrame, nscoord aISize) {
|
|||
/* static */
|
||||
void RubyUtils::ClearReservedISize(nsIFrame* aFrame) {
|
||||
MOZ_ASSERT(IsExpandableRubyBox(aFrame));
|
||||
aFrame->DeleteProperty(ReservedISize());
|
||||
aFrame->RemoveProperty(ReservedISize());
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
|
|
@ -2021,7 +2021,7 @@ void nsBlockFrame::ComputeFinalSize(const ReflowInput& aReflowInput,
|
|||
if (blockEndEdgeOfChildren != finalSize.BSize(wm) - borderPadding.BEnd(wm)) {
|
||||
SetProperty(BlockEndEdgeOfChildrenProperty(), blockEndEdgeOfChildren);
|
||||
} else {
|
||||
DeleteProperty(BlockEndEdgeOfChildrenProperty());
|
||||
RemoveProperty(BlockEndEdgeOfChildrenProperty());
|
||||
}
|
||||
|
||||
aMetrics.SetSize(wm, finalSize);
|
||||
|
@ -7141,7 +7141,7 @@ void nsBlockFrame::ClearLineCursor() {
|
|||
return;
|
||||
}
|
||||
|
||||
DeleteProperty(LineCursorProperty());
|
||||
RemoveProperty(LineCursorProperty());
|
||||
RemoveStateBits(NS_BLOCK_HAS_LINE_CURSOR);
|
||||
}
|
||||
|
||||
|
|
|
@ -1181,7 +1181,7 @@ void nsBulletFrame::SetFontSizeInflation(float aInflation) {
|
|||
if (aInflation == 1.0f) {
|
||||
if (HasFontSizeInflation()) {
|
||||
RemoveStateBits(BULLET_FRAME_HAS_FONT_INFLATION);
|
||||
DeleteProperty(FontSizeInflationProperty());
|
||||
RemoveProperty(FontSizeInflationProperty());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -217,21 +217,19 @@ void nsContainerFrame::DestroyFrom(nsIFrame* aDestructRoot,
|
|||
// If we have any IB split siblings, clear their references to us.
|
||||
if (HasAnyStateBits(NS_FRAME_PART_OF_IBSPLIT)) {
|
||||
// Delete previous sibling's reference to me.
|
||||
nsIFrame* prevSib = GetProperty(nsIFrame::IBSplitPrevSibling());
|
||||
if (prevSib) {
|
||||
if (nsIFrame* prevSib = GetProperty(nsIFrame::IBSplitPrevSibling())) {
|
||||
NS_WARNING_ASSERTION(
|
||||
this == prevSib->GetProperty(nsIFrame::IBSplitSibling()),
|
||||
"IB sibling chain is inconsistent");
|
||||
prevSib->DeleteProperty(nsIFrame::IBSplitSibling());
|
||||
prevSib->RemoveProperty(nsIFrame::IBSplitSibling());
|
||||
}
|
||||
|
||||
// Delete next sibling's reference to me.
|
||||
nsIFrame* nextSib = GetProperty(nsIFrame::IBSplitSibling());
|
||||
if (nextSib) {
|
||||
if (nsIFrame* nextSib = GetProperty(nsIFrame::IBSplitSibling())) {
|
||||
NS_WARNING_ASSERTION(
|
||||
this == nextSib->GetProperty(nsIFrame::IBSplitPrevSibling()),
|
||||
"IB sibling chain is inconsistent");
|
||||
nextSib->DeleteProperty(nsIFrame::IBSplitPrevSibling());
|
||||
nextSib->RemoveProperty(nsIFrame::IBSplitPrevSibling());
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -1754,7 +1754,7 @@ NS_DECLARE_FRAME_PROPERTY_DELETABLE(CachedFlexMeasuringReflow,
|
|||
|
||||
void nsFlexContainerFrame::MarkCachedFlexMeasurementsDirty(
|
||||
nsIFrame* aItemFrame) {
|
||||
aItemFrame->DeleteProperty(CachedFlexMeasuringReflow());
|
||||
aItemFrame->RemoveProperty(CachedFlexMeasuringReflow());
|
||||
}
|
||||
|
||||
const CachedMeasuringReflowResult&
|
||||
|
@ -4270,7 +4270,7 @@ class MOZ_RAII AutoFlexItemMainSizeOverride final {
|
|||
}
|
||||
|
||||
~AutoFlexItemMainSizeOverride() {
|
||||
mItemFrame->DeleteProperty(nsIFrame::FlexItemMainSizeOverride());
|
||||
mItemFrame->RemoveProperty(nsIFrame::FlexItemMainSizeOverride());
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -335,7 +335,7 @@ void nsFloatManager::StoreRegionFor(WritingMode aWM, nsIFrame* aFloat,
|
|||
nsRect region = aRegion.GetPhysicalRect(aWM, aContainerSize);
|
||||
nsRect rect = aFloat->GetRect();
|
||||
if (region.IsEqualEdges(rect)) {
|
||||
aFloat->DeleteProperty(FloatRegionProperty());
|
||||
aFloat->RemoveProperty(FloatRegionProperty());
|
||||
} else {
|
||||
nsMargin* storedMargin = aFloat->GetProperty(FloatRegionProperty());
|
||||
if (!storedMargin) {
|
||||
|
|
|
@ -205,7 +205,7 @@ NS_DECLARE_FRAME_PROPERTY_DELETABLE(BoxMetricsProperty, nsBoxLayoutMetrics)
|
|||
|
||||
static void InitBoxMetrics(nsIFrame* aFrame, bool aClear) {
|
||||
if (aClear) {
|
||||
aFrame->DeleteProperty(BoxMetricsProperty());
|
||||
aFrame->RemoveProperty(BoxMetricsProperty());
|
||||
}
|
||||
|
||||
nsBoxLayoutMetrics* metrics = new nsBoxLayoutMetrics();
|
||||
|
@ -353,7 +353,7 @@ void nsIFrame::MarkAsNotAbsoluteContainingBlock() {
|
|||
"Should have NS_FRAME_HAS_ABSPOS_CHILDREN state bit");
|
||||
MOZ_ASSERT(HasAnyStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN));
|
||||
RemoveStateBits(NS_FRAME_HAS_ABSPOS_CHILDREN);
|
||||
DeleteProperty(AbsoluteContainingBlockProperty());
|
||||
RemoveProperty(AbsoluteContainingBlockProperty());
|
||||
}
|
||||
|
||||
bool nsIFrame::CheckAndClearPaintedState() {
|
||||
|
@ -872,9 +872,9 @@ void nsFrame::DestroyFrom(nsIFrame* aDestructRoot,
|
|||
}
|
||||
}
|
||||
|
||||
// Delete all properties attached to the frame, to ensure any property
|
||||
// Remove all properties attached to the frame, to ensure any property
|
||||
// destructors that need the frame pointer are handled properly.
|
||||
DeleteAllProperties();
|
||||
RemoveAllProperties();
|
||||
|
||||
// Must retrieve the object ID before calling destructors, so the
|
||||
// vtable is still valid.
|
||||
|
@ -978,7 +978,7 @@ bool nsIFrame::RemoveDisplayItem(nsDisplayItemBase* aItem) {
|
|||
}
|
||||
bool result = items->RemoveElement(aItem);
|
||||
if (items->IsEmpty()) {
|
||||
DeleteProperty(DisplayItems());
|
||||
RemoveProperty(DisplayItems());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -1265,7 +1265,7 @@ void nsFrame::DidSetComputedStyle(ComputedStyle* aOldComputedStyle) {
|
|||
if (disp->mPosition != oldDisp->mPosition) {
|
||||
if (!disp->IsRelativelyPositionedStyle() &&
|
||||
oldDisp->IsRelativelyPositionedStyle()) {
|
||||
DeleteProperty(NormalPositionProperty());
|
||||
RemoveProperty(NormalPositionProperty());
|
||||
}
|
||||
|
||||
handleStickyChange = disp->mPosition == NS_STYLE_POSITION_STICKY ||
|
||||
|
@ -1380,10 +1380,10 @@ void nsFrame::DidSetComputedStyle(ComputedStyle* aOldComputedStyle) {
|
|||
SetProperty(nsIFrame::OffsetPathCache(), path.forget().take());
|
||||
} else {
|
||||
// May have an old cached path, so we have to delete it.
|
||||
DeleteProperty(nsIFrame::OffsetPathCache());
|
||||
RemoveProperty(nsIFrame::OffsetPathCache());
|
||||
}
|
||||
} else if (oldPath) {
|
||||
DeleteProperty(nsIFrame::OffsetPathCache());
|
||||
RemoveProperty(nsIFrame::OffsetPathCache());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7244,7 +7244,7 @@ static void InvalidateFrameInternal(nsIFrame* aFrame, bool aHasDisplayItem,
|
|||
SchedulePaintInternal(displayRoot, aFrame);
|
||||
}
|
||||
if (aFrame->HasAnyStateBits(NS_FRAME_HAS_INVALID_RECT)) {
|
||||
aFrame->DeleteProperty(nsIFrame::InvalidationRect());
|
||||
aFrame->RemoveProperty(nsIFrame::InvalidationRect());
|
||||
aFrame->RemoveStateBits(NS_FRAME_HAS_INVALID_RECT);
|
||||
}
|
||||
}
|
||||
|
@ -9201,7 +9201,7 @@ bool nsIFrame::ClearOverflowRects() {
|
|||
return false;
|
||||
}
|
||||
if (mOverflow.mType == NS_FRAME_OVERFLOW_LARGE) {
|
||||
DeleteProperty(OverflowAreasProperty());
|
||||
RemoveProperty(OverflowAreasProperty());
|
||||
}
|
||||
mOverflow.mType = NS_FRAME_OVERFLOW_NONE;
|
||||
return true;
|
||||
|
@ -9503,14 +9503,14 @@ bool nsIFrame::FinishAndStoreOverflow(nsOverflowAreas& aOverflowAreas,
|
|||
*initial = aOverflowAreas;
|
||||
}
|
||||
} else {
|
||||
DeleteProperty(nsIFrame::InitialOverflowProperty());
|
||||
RemoveProperty(nsIFrame::InitialOverflowProperty());
|
||||
}
|
||||
#ifdef DEBUG
|
||||
SetProperty(nsIFrame::DebugInitialOverflowPropertyApplied(), true);
|
||||
#endif
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
DeleteProperty(nsIFrame::DebugInitialOverflowPropertyApplied());
|
||||
RemoveProperty(nsIFrame::DebugInitialOverflowPropertyApplied());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -9654,7 +9654,7 @@ bool nsIFrame::FinishAndStoreOverflow(nsOverflowAreas& aOverflowAreas,
|
|||
}
|
||||
}
|
||||
} else {
|
||||
DeleteProperty(nsIFrame::PreTransformOverflowAreasProperty());
|
||||
RemoveProperty(nsIFrame::PreTransformOverflowAreasProperty());
|
||||
}
|
||||
|
||||
/* Revert the size change in case some caller is depending on this. */
|
||||
|
|
|
@ -3687,7 +3687,7 @@ void nsGridContainerFrame::InitImplicitNamedAreas(
|
|||
Add(aStyle->mGridTemplateColumns, IsSubgrid(eLogicalAxisInline));
|
||||
Add(aStyle->mGridTemplateRows, IsSubgrid(eLogicalAxisBlock));
|
||||
if (areas && areas->count() == 0) {
|
||||
DeleteProperty(ImplicitNamedAreasProperty());
|
||||
RemoveProperty(ImplicitNamedAreasProperty());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4656,7 +4656,7 @@ static nscoord MeasuringReflow(nsIFrame* aChild,
|
|||
aChild->SetProperty(nsIFrame::BClampMarginBoxMinSizeProperty(),
|
||||
aBMinSizeClamp);
|
||||
} else {
|
||||
aChild->DeleteProperty(nsIFrame::BClampMarginBoxMinSizeProperty());
|
||||
aChild->RemoveProperty(nsIFrame::BClampMarginBoxMinSizeProperty());
|
||||
}
|
||||
ReflowInput childRI(pc, *rs, aChild, aAvailableSize, Some(aCBSize), riFlags);
|
||||
|
||||
|
@ -4682,7 +4682,7 @@ static nscoord MeasuringReflow(nsIFrame* aChild,
|
|||
nsContainerFrame::FinishReflowChild(aChild, pc, childSize, &childRI, wm,
|
||||
LogicalPoint(wm), nsSize(), flags);
|
||||
#ifdef DEBUG
|
||||
parent->DeleteProperty(nsContainerFrame::DebugReflowingWithInfiniteISize());
|
||||
parent->RemoveProperty(nsContainerFrame::DebugReflowingWithInfiniteISize());
|
||||
#endif
|
||||
return childSize.BSize(wm);
|
||||
}
|
||||
|
@ -6342,7 +6342,7 @@ void nsGridContainerFrame::ReflowInFlowChild(
|
|||
if (baselineAdjust != nscoord(0)) {
|
||||
aChild->SetProperty(aProp, baselineAdjust);
|
||||
} else {
|
||||
aChild->DeleteProperty(aProp);
|
||||
aChild->RemoveProperty(aProp);
|
||||
}
|
||||
};
|
||||
SetProp(eLogicalAxisBlock,
|
||||
|
@ -6394,7 +6394,7 @@ void nsGridContainerFrame::ReflowInFlowChild(
|
|||
aChild->SetProperty(BClampMarginBoxMinSizeProperty(),
|
||||
childCBSize.BSize(childWM));
|
||||
} else {
|
||||
aChild->DeleteProperty(BClampMarginBoxMinSizeProperty());
|
||||
aChild->RemoveProperty(BClampMarginBoxMinSizeProperty());
|
||||
}
|
||||
|
||||
if ((aGridItemInfo->mState[childIAxis] & ItemState::eApplyAutoMinSize)) {
|
||||
|
@ -6449,7 +6449,7 @@ void nsGridContainerFrame::ReflowInFlowChild(
|
|||
if (stretch) {
|
||||
aChild->SetProperty(FragStretchBSizeProperty(), *aStretchBSize);
|
||||
} else {
|
||||
aChild->DeleteProperty(FragStretchBSizeProperty());
|
||||
aChild->RemoveProperty(FragStretchBSizeProperty());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7177,7 +7177,7 @@ void nsGridContainerFrame::NormalizeChildLists() {
|
|||
f = next;
|
||||
}
|
||||
if (overflowContainers->IsEmpty()) {
|
||||
DeleteProperty(OverflowContainersProperty());
|
||||
RemoveProperty(OverflowContainersProperty());
|
||||
}
|
||||
MergeSortedExcessOverflowContainers(moveToEOC);
|
||||
}
|
||||
|
@ -7766,7 +7766,7 @@ void nsGridContainerFrame::Reflow(nsPresContext* aPresContext,
|
|||
gridReflowInput.mGridStyle->mGridTemplateAreas.AsAreas()->areas);
|
||||
SetProperty(ExplicitNamedAreasProperty(), areas);
|
||||
} else {
|
||||
DeleteProperty(ExplicitNamedAreasProperty());
|
||||
RemoveProperty(ExplicitNamedAreasProperty());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7808,7 +7808,7 @@ void nsGridContainerFrame::Reflow(nsPresContext* aPresContext,
|
|||
sharedGridData->mGenerateComputedGridInfo =
|
||||
HasAnyStateBits(NS_STATE_GRID_GENERATE_COMPUTED_VALUES);
|
||||
} else if (sharedGridData && !GetNextInFlow()) {
|
||||
DeleteProperty(SharedGridData::Prop());
|
||||
RemoveProperty(SharedGridData::Prop());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7822,7 +7822,7 @@ void nsGridContainerFrame::UpdateSubgridFrameState() {
|
|||
if (newBits != oldBits) {
|
||||
RemoveStateBits(kIsSubgridBits);
|
||||
if (!newBits) {
|
||||
DeleteProperty(Subgrid::Prop());
|
||||
RemoveProperty(Subgrid::Prop());
|
||||
} else {
|
||||
AddStateBits(newBits);
|
||||
}
|
||||
|
|
|
@ -3680,11 +3680,11 @@ class nsIFrame : public nsQueryFrame {
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
void DeleteProperty(FrameProperties::Descriptor<T> aProperty) {
|
||||
mProperties.Delete(aProperty, this);
|
||||
void RemoveProperty(FrameProperties::Descriptor<T> aProperty) {
|
||||
mProperties.Remove(aProperty, this);
|
||||
}
|
||||
|
||||
void DeleteAllProperties() { mProperties.DeleteAll(this); }
|
||||
void RemoveAllProperties() { mProperties.RemoveAll(this); }
|
||||
|
||||
// nsIFrames themselves are in the nsPresArena, and so are not measured here.
|
||||
// Instead, this measures heap-allocated things hanging off the nsIFrame, and
|
||||
|
|
|
@ -758,7 +758,7 @@ void nsLineLayout::ReflowFrame(nsIFrame* aFrame, nsReflowStatus& aReflowStatus,
|
|||
#endif
|
||||
|
||||
if (mCurrentSpan == mRootSpan) {
|
||||
pfd->mFrame->DeleteProperty(nsIFrame::LineBaselineOffset());
|
||||
pfd->mFrame->RemoveProperty(nsIFrame::LineBaselineOffset());
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
bool hasLineOffset;
|
||||
|
|
|
@ -169,7 +169,7 @@ void nsPlaceholderFrame::DestroyFrom(nsIFrame* aDestructRoot,
|
|||
nsIFrame* oof = mOutOfFlowFrame;
|
||||
if (oof) {
|
||||
mOutOfFlowFrame = nullptr;
|
||||
oof->DeleteProperty(nsIFrame::PlaceholderFrameProperty());
|
||||
oof->RemoveProperty(nsIFrame::PlaceholderFrameProperty());
|
||||
|
||||
// If aDestructRoot is not an ancestor of the out-of-flow frame,
|
||||
// then call RemoveFrame on it here.
|
||||
|
|
|
@ -2987,7 +2987,7 @@ gfxSkipCharsIterator nsTextFrame::EnsureTextRun(
|
|||
}
|
||||
TabWidthStore* tabWidths = GetProperty(TabWidthProperty());
|
||||
if (tabWidths && tabWidths->mValidForContentOffset != GetContentOffset()) {
|
||||
DeleteProperty(TabWidthProperty());
|
||||
RemoveProperty(TabWidthProperty());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3594,7 +3594,7 @@ void nsTextFrame::PropertyProvider::CalcTabWidths(Range aRange,
|
|||
|
||||
if (!mTabWidths) {
|
||||
// Delete any stale property that may be left on the frame
|
||||
mFrame->DeleteProperty(TabWidthProperty());
|
||||
mFrame->RemoveProperty(TabWidthProperty());
|
||||
mTabWidthsAnalyzedLimit =
|
||||
std::max(mTabWidthsAnalyzedLimit, aRange.end - startOffset);
|
||||
}
|
||||
|
@ -4320,7 +4320,7 @@ void nsTextFrame::ClearFrameOffsetCache() {
|
|||
// means that the primary frame is already dead if we're a continuing text
|
||||
// frame, in which case, all of its properties are gone, and we don't need
|
||||
// to worry about deleting this property here.
|
||||
primaryFrame->DeleteProperty(OffsetToFrameProperty());
|
||||
primaryFrame->RemoveProperty(OffsetToFrameProperty());
|
||||
}
|
||||
RemoveStateBits(TEXT_IN_OFFSET_CACHE);
|
||||
}
|
||||
|
@ -4674,7 +4674,7 @@ bool nsTextFrame::RemoveTextRun(gfxTextRun* aTextRun) {
|
|||
}
|
||||
if ((GetStateBits() & TEXT_HAS_FONT_INFLATION) &&
|
||||
GetProperty(UninflatedTextRunProperty()) == aTextRun) {
|
||||
DeleteProperty(UninflatedTextRunProperty());
|
||||
RemoveProperty(UninflatedTextRunProperty());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -4703,7 +4703,7 @@ void nsTextFrame::DisconnectTextRuns() {
|
|||
"disconnect");
|
||||
mTextRun = nullptr;
|
||||
if ((GetStateBits() & TEXT_HAS_FONT_INFLATION)) {
|
||||
DeleteProperty(UninflatedTextRunProperty());
|
||||
RemoveProperty(UninflatedTextRunProperty());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5223,7 +5223,7 @@ nsRect nsTextFrame::UpdateTextEmphasis(WritingMode aWM,
|
|||
PropertyProvider& aProvider) {
|
||||
const nsStyleText* styleText = StyleText();
|
||||
if (!styleText->HasEffectiveTextEmphasis()) {
|
||||
DeleteProperty(EmphasisMarkProperty());
|
||||
RemoveProperty(EmphasisMarkProperty());
|
||||
return nsRect();
|
||||
}
|
||||
|
||||
|
@ -8244,7 +8244,7 @@ void nsTextFrame::SetFontSizeInflation(float aInflation) {
|
|||
if (aInflation == 1.0f) {
|
||||
if (HasFontSizeInflation()) {
|
||||
RemoveStateBits(TEXT_HAS_FONT_INFLATION);
|
||||
DeleteProperty(FontSizeInflationProperty());
|
||||
RemoveProperty(FontSizeInflationProperty());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -8975,7 +8975,7 @@ void nsTextFrame::ReflowText(nsLineLayout& aLineLayout, nscoord aAvailableWidth,
|
|||
// reflow request from CharacterDataChanged (since we're reflowing now).
|
||||
RemoveStateBits(TEXT_REFLOW_FLAGS | TEXT_WHITESPACE_FLAGS);
|
||||
mReflowRequestedForCharDataChange = false;
|
||||
DeleteProperty(WebRenderTextBounds());
|
||||
RemoveProperty(WebRenderTextBounds());
|
||||
// Temporarily map all possible content while we construct our new textrun.
|
||||
// so that when doing reflow our styles prevail over any part of the
|
||||
// textrun we look at. Note that next-in-flows may be mapping the same
|
||||
|
@ -9383,7 +9383,7 @@ void nsTextFrame::ReflowText(nsLineLayout& aLineLayout, nscoord aAvailableWidth,
|
|||
gfxFloat em = fm->EmHeight();
|
||||
// Compress the characters in horizontal axis if necessary.
|
||||
if (width <= em) {
|
||||
DeleteProperty(TextCombineScaleFactorProperty());
|
||||
RemoveProperty(TextCombineScaleFactorProperty());
|
||||
} else {
|
||||
SetProperty(TextCombineScaleFactorProperty(), em / width);
|
||||
finalSize.ISize(wm) = em;
|
||||
|
@ -9641,7 +9641,7 @@ nsTextFrame::TrimOutput nsTextFrame::TrimTrailingWhiteSpace(
|
|||
|
||||
nsOverflowAreas nsTextFrame::RecomputeOverflow(nsIFrame* aBlockFrame,
|
||||
bool aIncludeShadows) {
|
||||
DeleteProperty(WebRenderTextBounds());
|
||||
RemoveProperty(WebRenderTextBounds());
|
||||
|
||||
nsRect bounds(nsPoint(0, 0), GetSize());
|
||||
nsOverflowAreas result(bounds, bounds);
|
||||
|
|
|
@ -158,7 +158,7 @@ void nsMathMLContainerFrame::GetReflowAndBoundingMetricsFor(
|
|||
void nsMathMLContainerFrame::ClearSavedChildMetrics() {
|
||||
nsIFrame* childFrame = mFrames.FirstChild();
|
||||
while (childFrame) {
|
||||
childFrame->DeleteProperty(HTMLReflowOutputProperty());
|
||||
childFrame->RemoveProperty(HTMLReflowOutputProperty());
|
||||
childFrame = childFrame->GetNextSibling();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -726,7 +726,7 @@ nsresult nsMathMLmtableWrapperFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
aAttribute == nsGkAtoms::columnalign_ ||
|
||||
aAttribute == nsGkAtoms::columnlines_) {
|
||||
// clear any cached property list for this table
|
||||
tableFrame->DeleteProperty(AttributeToProperty(aAttribute));
|
||||
tableFrame->RemoveProperty(AttributeToProperty(aAttribute));
|
||||
// Reparse the new attribute on the table.
|
||||
ParseFrameAttribute(tableFrame, aAttribute, true);
|
||||
} else {
|
||||
|
@ -1061,7 +1061,7 @@ nsresult nsMathMLmtrFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
DeleteProperty(AttributeToProperty(aAttribute));
|
||||
RemoveProperty(AttributeToProperty(aAttribute));
|
||||
|
||||
bool allowMultiValues = (aAttribute == nsGkAtoms::columnalign_);
|
||||
|
||||
|
@ -1109,7 +1109,7 @@ nsresult nsMathMLmtdFrame::AttributeChanged(int32_t aNameSpaceID,
|
|||
|
||||
if (aAttribute == nsGkAtoms::rowalign_ ||
|
||||
aAttribute == nsGkAtoms::columnalign_) {
|
||||
DeleteProperty(AttributeToProperty(aAttribute));
|
||||
RemoveProperty(AttributeToProperty(aAttribute));
|
||||
|
||||
// Reparse the attribute.
|
||||
ParseFrameAttribute(this, aAttribute, false);
|
||||
|
|
|
@ -198,7 +198,7 @@ void LayerActivityTracker::NotifyExpired(LayerActivity* aObject) {
|
|||
f->SchedulePaint(nsIFrame::PAINT_DEFAULT, false);
|
||||
}
|
||||
f->RemoveStateBits(NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY);
|
||||
f->DeleteProperty(LayerActivityProperty());
|
||||
f->RemoveProperty(LayerActivityProperty());
|
||||
} else {
|
||||
c->DeleteProperty(nsGkAtoms::LayerActivity);
|
||||
}
|
||||
|
|
|
@ -1390,8 +1390,8 @@ static void ClearFrameProps(nsTArray<nsIFrame*>& aFrames) {
|
|||
for (nsIFrame* f : aFrames) {
|
||||
if (f->HasOverrideDirtyRegion()) {
|
||||
f->SetHasOverrideDirtyRegion(false);
|
||||
f->DeleteProperty(nsDisplayListBuilder::DisplayListBuildingRect());
|
||||
f->DeleteProperty(
|
||||
f->RemoveProperty(nsDisplayListBuilder::DisplayListBuildingRect());
|
||||
f->RemoveProperty(
|
||||
nsDisplayListBuilder::DisplayListBuildingDisplayPortRect());
|
||||
}
|
||||
|
||||
|
|
|
@ -1838,7 +1838,7 @@ void nsDisplayListBuilder::ResetMarkedFramesForDisplayList(
|
|||
|
||||
firstFrameForShell = CurrentPresShellState()->mFirstFrameWithOOFData;
|
||||
for (uint32_t i = firstFrameForShell; i < mFramesWithOOFData.Length(); ++i) {
|
||||
mFramesWithOOFData[i]->DeleteProperty(OutOfFlowDisplayDataProperty());
|
||||
mFramesWithOOFData[i]->RemoveProperty(OutOfFlowDisplayDataProperty());
|
||||
}
|
||||
mFramesWithOOFData.SetLength(firstFrameForShell);
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ struct AnimatedGeometryRoot {
|
|||
|
||||
~AnimatedGeometryRoot() {
|
||||
if (mFrame && mIsRetained) {
|
||||
mFrame->DeleteProperty(AnimatedGeometryRootCache());
|
||||
mFrame->RemoveProperty(AnimatedGeometryRootCache());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -327,7 +327,7 @@ struct ActiveScrolledRoot {
|
|||
~ActiveScrolledRoot() {
|
||||
if (mScrollableFrame && mRetained) {
|
||||
nsIFrame* f = do_QueryFrame(mScrollableFrame);
|
||||
f->DeleteProperty(ActiveScrolledRootCache());
|
||||
f->RemoveProperty(ActiveScrolledRootCache());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1408,7 +1408,7 @@ void SVGObserverUtils::InitiateResourceDocLoads(nsIFrame* aFrame) {
|
|||
}
|
||||
|
||||
void SVGObserverUtils::RemoveTextPathObserver(nsIFrame* aTextPathFrame) {
|
||||
aTextPathFrame->DeleteProperty(HrefAsTextPathProperty());
|
||||
aTextPathFrame->RemoveProperty(HrefAsTextPathProperty());
|
||||
}
|
||||
|
||||
nsIFrame* SVGObserverUtils::GetAndObserveTemplate(
|
||||
|
@ -1444,7 +1444,7 @@ nsIFrame* SVGObserverUtils::GetAndObserveTemplate(
|
|||
}
|
||||
|
||||
void SVGObserverUtils::RemoveTemplateObserver(nsIFrame* aFrame) {
|
||||
aFrame->DeleteProperty(HrefToTemplateProperty());
|
||||
aFrame->RemoveProperty(HrefToTemplateProperty());
|
||||
}
|
||||
|
||||
Element* SVGObserverUtils::GetAndObserveBackgroundImage(nsIFrame* aFrame,
|
||||
|
@ -1543,15 +1543,15 @@ void SVGObserverUtils::UpdateEffects(nsIFrame* aFrame) {
|
|||
NS_ASSERTION(aFrame->GetContent()->IsElement(),
|
||||
"aFrame's content should be an element");
|
||||
|
||||
aFrame->DeleteProperty(FilterProperty());
|
||||
aFrame->DeleteProperty(MaskProperty());
|
||||
aFrame->DeleteProperty(ClipPathProperty());
|
||||
aFrame->DeleteProperty(MarkerStartProperty());
|
||||
aFrame->DeleteProperty(MarkerMidProperty());
|
||||
aFrame->DeleteProperty(MarkerEndProperty());
|
||||
aFrame->DeleteProperty(FillProperty());
|
||||
aFrame->DeleteProperty(StrokeProperty());
|
||||
aFrame->DeleteProperty(BackgroundImageProperty());
|
||||
aFrame->RemoveProperty(FilterProperty());
|
||||
aFrame->RemoveProperty(MaskProperty());
|
||||
aFrame->RemoveProperty(ClipPathProperty());
|
||||
aFrame->RemoveProperty(MarkerStartProperty());
|
||||
aFrame->RemoveProperty(MarkerMidProperty());
|
||||
aFrame->RemoveProperty(MarkerEndProperty());
|
||||
aFrame->RemoveProperty(FillProperty());
|
||||
aFrame->RemoveProperty(StrokeProperty());
|
||||
aFrame->RemoveProperty(BackgroundImageProperty());
|
||||
|
||||
// Ensure that the filter is repainted correctly
|
||||
// We can't do that in OnRenderingChange as the referenced frame may
|
||||
|
@ -1617,7 +1617,7 @@ void SVGObserverUtils::InvalidateRenderingObservers(nsIFrame* aFrame) {
|
|||
}
|
||||
|
||||
// If the rendering has changed, the bounds may well have changed too:
|
||||
aFrame->DeleteProperty(nsSVGUtils::ObjectBoundingBoxProperty());
|
||||
aFrame->RemoveProperty(nsSVGUtils::ObjectBoundingBoxProperty());
|
||||
|
||||
SVGRenderingObserverSet* observers = GetObserverSet(content->AsElement());
|
||||
if (observers) {
|
||||
|
@ -1641,10 +1641,9 @@ void SVGObserverUtils::InvalidateRenderingObservers(nsIFrame* aFrame) {
|
|||
|
||||
void SVGObserverUtils::InvalidateDirectRenderingObservers(
|
||||
Element* aElement, uint32_t aFlags /* = 0 */) {
|
||||
nsIFrame* frame = aElement->GetPrimaryFrame();
|
||||
if (frame) {
|
||||
if (nsIFrame* frame = aElement->GetPrimaryFrame()) {
|
||||
// If the rendering has changed, the bounds may well have changed too:
|
||||
frame->DeleteProperty(nsSVGUtils::ObjectBoundingBoxProperty());
|
||||
frame->RemoveProperty(nsSVGUtils::ObjectBoundingBoxProperty());
|
||||
}
|
||||
|
||||
if (aElement->HasRenderingObservers()) {
|
||||
|
|
|
@ -1869,7 +1869,7 @@ void nsTableRowGroupFrame::ClearRowCursor() {
|
|||
}
|
||||
|
||||
RemoveStateBits(NS_ROWGROUP_HAS_ROW_CURSOR);
|
||||
DeleteProperty(RowCursorProperty());
|
||||
RemoveProperty(RowCursorProperty());
|
||||
}
|
||||
|
||||
nsTableRowGroupFrame::FrameCursorData* nsTableRowGroupFrame::SetupRowCursor() {
|
||||
|
|
|
@ -39,9 +39,9 @@ nsresult nsBox::BeginXULLayout(nsBoxLayoutState& aState) {
|
|||
|
||||
// Another copy-over from ReflowInput.
|
||||
// Since we are in reflow, we don't need to store these properties anymore.
|
||||
DeleteProperty(UsedBorderProperty());
|
||||
DeleteProperty(UsedPaddingProperty());
|
||||
DeleteProperty(UsedMarginProperty());
|
||||
RemoveProperty(UsedBorderProperty());
|
||||
RemoveProperty(UsedPaddingProperty());
|
||||
RemoveProperty(UsedMarginProperty());
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче