本文整理汇总了C++中FrameProperties::Delete方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameProperties::Delete方法的具体用法?C++ FrameProperties::Delete怎么用?C++ FrameProperties::Delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameProperties
的用法示例。
在下文中一共展示了FrameProperties::Delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetEffectProperty
void
nsSVGEffects::UpdateEffects(nsIFrame *aFrame)
{
NS_ASSERTION(aFrame->GetContent()->IsElement(),
"aFrame's content should be an element");
FrameProperties props = aFrame->Properties();
props.Delete(FilterProperty());
props.Delete(MaskProperty());
props.Delete(ClipPathProperty());
props.Delete(MarkerBeginProperty());
props.Delete(MarkerMiddleProperty());
props.Delete(MarkerEndProperty());
props.Delete(FillProperty());
props.Delete(StrokeProperty());
props.Delete(BackgroundImageProperty());
// Ensure that the filter is repainted correctly
// We can't do that in DoUpdate as the referenced frame may not be valid
GetEffectProperty(aFrame->GetStyleSVGReset()->mFilter,
aFrame, FilterProperty(), CreateFilterProperty);
if (aFrame->IsFrameOfType(nsIFrame::eSVG)) {
// Set marker properties here to avoid reference loops
const nsStyleSVG *style = aFrame->GetStyleSVG();
GetEffectProperty(style->mMarkerStart, aFrame, MarkerBeginProperty(),
CreateMarkerProperty);
GetEffectProperty(style->mMarkerMid, aFrame, MarkerMiddleProperty(),
CreateMarkerProperty);
GetEffectProperty(style->mMarkerEnd, aFrame, MarkerEndProperty(),
CreateMarkerProperty);
}
}
示例2: nsMargin
void
nsFloatManager::StoreRegionFor(nsIFrame* aFloat,
nsRect& aRegion)
{
nsRect rect = aFloat->GetRect();
FrameProperties props = aFloat->Properties();
if (aRegion.IsEqualEdges(rect)) {
props.Delete(FloatRegionProperty());
}
else {
nsMargin* storedMargin = static_cast<nsMargin*>
(props.Get(FloatRegionProperty()));
if (!storedMargin) {
storedMargin = new nsMargin();
props.Set(FloatRegionProperty(), storedMargin);
}
*storedMargin = aRegion - rect;
}
}