本文整理汇总了C++中InternalAList函数的典型用法代码示例。如果您正苦于以下问题:C++ InternalAList函数的具体用法?C++ InternalAList怎么用?C++ InternalAList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了InternalAList函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: InternalAList
DOMSVGPointList::~DOMSVGPointList()
{
// There are now no longer any references to us held by script or list items.
// Note we must use GetAnimValKey/GetBaseValKey here, NOT InternalList()!
void *key = mIsAnimValList ?
InternalAList().GetAnimValKey() :
InternalAList().GetBaseValKey();
SVGPointListTearoffTable().RemoveTearoff(key);
}
开发者ID:Wafflespeanut,项目名称:gecko-dev,代码行数:9,代码来源:DOMSVGPointList.cpp
示例2: MaybeRemoveItemFromAnimValListAt
void
DOMSVGPathSegList::
MaybeRemoveItemFromAnimValListAt(uint32_t aIndex,
int32_t aArgCountForItem)
{
MOZ_ASSERT(!IsAnimValList(), "call from baseVal to animVal");
if (AttrIsAnimating()) {
// animVal not a clone of baseVal
return;
}
// This needs to be a strong reference; otherwise, the RemovingFromList call
// below might drop the last reference to animVal before we're done with it.
nsRefPtr<DOMSVGPathSegList> animVal =
GetDOMWrapperIfExists(InternalAList().GetAnimValKey());
if (!animVal) {
// No animVal list wrapper
return;
}
MOZ_ASSERT(animVal->mItems.Length() == mItems.Length(),
"animVal list not in sync!");
if (animVal->ItemAt(aIndex)) {
animVal->ItemAt(aIndex)->RemovingFromList();
}
animVal->mItems.RemoveElementAt(aIndex);
animVal->UpdateListIndicesFromIndex(aIndex, -(1 + aArgCountForItem));
}
开发者ID:AOSC-Dev,项目名称:Pale-Moon,代码行数:31,代码来源:DOMSVGPathSegList.cpp
示例3: MOZ_ASSERT
void
DOMSVGPointList::MaybeRemoveItemFromAnimValListAt(uint32_t aIndex)
{
MOZ_ASSERT(!IsAnimValList(), "call from baseVal to animVal");
if (!AnimListMirrorsBaseList()) {
return;
}
// This needs to be a strong reference; otherwise, the RemovingFromList call
// below might drop the last reference to animVal before we're done with it.
RefPtr<DOMSVGPointList> animVal =
GetDOMWrapperIfExists(InternalAList().GetAnimValKey());
MOZ_ASSERT(animVal, "AnimListMirrorsBaseList() promised a non-null animVal");
MOZ_ASSERT(animVal->mItems.Length() == mItems.Length(),
"animVal list not in sync!");
if (animVal->mItems[aIndex]) {
animVal->mItems[aIndex]->RemovingFromList();
}
animVal->mItems.RemoveElementAt(aIndex);
UpdateListIndicesFromIndex(animVal->mItems, aIndex);
}
开发者ID:Wafflespeanut,项目名称:gecko-dev,代码行数:25,代码来源:DOMSVGPointList.cpp
示例4: MaybeInsertNullInAnimValListAt
void
DOMSVGPathSegList::
MaybeInsertNullInAnimValListAt(uint32_t aIndex,
uint32_t aInternalIndex,
uint32_t aArgCountForItem)
{
NS_ABORT_IF_FALSE(!IsAnimValList(), "call from baseVal to animVal");
if (AttrIsAnimating()) {
// animVal not a clone of baseVal
return;
}
// The anim val list is in sync with the base val list
DOMSVGPathSegList *animVal =
GetDOMWrapperIfExists(InternalAList().GetAnimValKey());
if (!animVal) {
// No animVal list wrapper
return;
}
NS_ABORT_IF_FALSE(animVal->mItems.Length() == mItems.Length(),
"animVal list not in sync!");
animVal->mItems.InsertElementAt(aIndex, ItemProxy(nullptr, aInternalIndex));
animVal->UpdateListIndicesFromIndex(aIndex + 1, 1 + aArgCountForItem);
}
开发者ID:BitVapor,项目名称:Pale-Moon,代码行数:28,代码来源:DOMSVGPathSegList.cpp
示例5: MaybeRemoveItemFromAnimValListAt
void
DOMSVGPathSegList::
MaybeRemoveItemFromAnimValListAt(PRUint32 aIndex,
PRUint32 aArgCountForItem)
{
NS_ABORT_IF_FALSE(!IsAnimValList(), "call from baseVal to animVal");
if (AttrIsAnimating()) {
// animVal not a clone of baseVal
return;
}
DOMSVGPathSegList *animVal =
GetDOMWrapperIfExists(InternalAList().GetAnimValKey());
if (!animVal) {
// No animVal list wrapper
return;
}
NS_ABORT_IF_FALSE(animVal->mItems.Length() == mItems.Length(),
"animVal list not in sync!");
if (animVal->ItemAt(aIndex)) {
animVal->ItemAt(aIndex)->RemovingFromList();
}
animVal->mItems.RemoveElementAt(aIndex);
animVal->UpdateListIndicesFromIndex(aIndex, -(1 + aArgCountForItem));
}
开发者ID:h4ck3rm1k3,项目名称:v8monkey,代码行数:29,代码来源:DOMSVGPathSegList.cpp
示例6: InternalListWillChangeTo
NS_IMETHODIMP
DOMSVGPointList::Clear()
{
if (IsAnimValList()) {
return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR;
}
if (Length() > 0) {
// DOM list items that are to be removed must be removed before we change
// the internal list, otherwise they wouldn't be able to copy their
// internal counterparts' values!
InternalListWillChangeTo(SVGPointList()); // clears mItems
if (!AttrIsAnimating()) {
// The anim val list is in sync with the base val list
DOMSVGPointList *animList =
GetDOMWrapperIfExists(InternalAList().GetAnimValKey());
if (animList) {
animList->InternalListWillChangeTo(SVGPointList()); // clears its mItems
}
}
InternalList().Clear();
Element()->DidChangePointList(true);
if (AttrIsAnimating()) {
Element()->AnimationNeedsResample();
}
}
return NS_OK;
}
开发者ID:anuragbhatnagar,项目名称:mozilla-central,代码行数:31,代码来源:DOMSVGPointList.cpp
示例7: NS_ABORT_IF_FALSE
void
DOMSVGPointList::MaybeRemoveItemFromAnimValListAt(uint32_t aIndex)
{
NS_ABORT_IF_FALSE(!IsAnimValList(), "call from baseVal to animVal");
if (AttrIsAnimating()) {
// animVal not a clone of baseVal
return;
}
// This needs to be a strong reference; otherwise, the RemovingFromList call
// below might drop the last reference to animVal before we're done with it.
nsRefPtr<DOMSVGPointList> animVal =
GetDOMWrapperIfExists(InternalAList().GetAnimValKey());
if (!animVal) {
// No animVal list wrapper
return;
}
NS_ABORT_IF_FALSE(animVal->mItems.Length() == mItems.Length(),
"animVal list not in sync!");
if (animVal->mItems[aIndex]) {
animVal->mItems[aIndex]->RemovingFromList();
}
animVal->mItems.RemoveElementAt(aIndex);
UpdateListIndicesFromIndex(animVal->mItems, aIndex);
}
开发者ID:BitVapor,项目名称:Pale-Moon,代码行数:29,代码来源:DOMSVGPointList.cpp
示例8: MOZ_ASSERT
void
DOMSVGPointList::MaybeInsertNullInAnimValListAt(uint32_t aIndex)
{
MOZ_ASSERT(!IsAnimValList(), "call from baseVal to animVal");
if (AttrIsAnimating()) {
// animVal not a clone of baseVal
return;
}
// The anim val list is in sync with the base val list
DOMSVGPointList *animVal =
GetDOMWrapperIfExists(InternalAList().GetAnimValKey());
if (!animVal) {
// No animVal list wrapper
return;
}
MOZ_ASSERT(animVal->mItems.Length() == mItems.Length(),
"animVal list not in sync!");
MOZ_ALWAYS_TRUE(animVal->mItems.InsertElementAt(aIndex, nullptr, fallible));
UpdateListIndicesFromIndex(animVal->mItems, aIndex + 1);
}
开发者ID:Jar-win,项目名称:Waterfox,代码行数:25,代码来源:DOMSVGPointList.cpp
示例9: notifier
void
DOMSVGPointList::Clear(ErrorResult& aError)
{
if (IsAnimValList()) {
aError.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
return;
}
if (LengthNoFlush() > 0) {
AutoChangePointListNotifier notifier(this);
// DOM list items that are to be removed must be removed before we change
// the internal list, otherwise they wouldn't be able to copy their
// internal counterparts' values!
InternalListWillChangeTo(SVGPointList()); // clears mItems
if (!AttrIsAnimating()) {
// The anim val list is in sync with the base val list
DOMSVGPointList *animList =
GetDOMWrapperIfExists(InternalAList().GetAnimValKey());
if (animList) {
animList->InternalListWillChangeTo(SVGPointList()); // clears its mItems
}
}
InternalList().Clear();
}
}
开发者ID:Wafflespeanut,项目名称:gecko-dev,代码行数:28,代码来源:DOMSVGPointList.cpp
示例10: Element
void
DOMSVGPathSegList::Clear(ErrorResult& aError)
{
if (IsAnimValList()) {
aError.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
return;
}
if (LengthNoFlush() > 0) {
nsAttrValue emptyOrOldValue = Element()->WillChangePathSegList();
// DOM list items that are to be removed must be removed before we change
// the internal list, otherwise they wouldn't be able to copy their
// internal counterparts' values!
InternalListWillChangeTo(SVGPathData()); // clears mItems
if (!AttrIsAnimating()) {
// The anim val list is in sync with the base val list
DOMSVGPathSegList *animList =
GetDOMWrapperIfExists(InternalAList().GetAnimValKey());
if (animList) {
animList->InternalListWillChangeTo(SVGPathData()); // clears its mItems
}
}
InternalList().Clear();
Element()->DidChangePathSegList(emptyOrOldValue);
if (AttrIsAnimating()) {
Element()->AnimationNeedsResample();
}
}
}
开发者ID:BitVapor,项目名称:Pale-Moon,代码行数:32,代码来源:DOMSVGPathSegList.cpp
示例11: DOMSVGLengthList
NS_IMETHODIMP
DOMSVGAnimatedLengthList::GetAnimVal(nsIDOMSVGLengthList **_retval)
{
if (!mAnimVal) {
mAnimVal = new DOMSVGLengthList(this, InternalAList().GetAnimValue());
}
NS_ADDREF(*_retval = mAnimVal);
return NS_OK;
}
开发者ID:Anachid,项目名称:mozilla-central,代码行数:9,代码来源:DOMSVGAnimatedLengthList.cpp
示例12: DOMSVGTransformList
/* readonly attribute nsIDOMSVGTransformList animVal; */
NS_IMETHODIMP
DOMSVGAnimatedTransformList::GetAnimVal(nsIDOMSVGTransformList** aAnimVal)
{
if (!mAnimVal) {
mAnimVal = new DOMSVGTransformList(this, InternalAList().GetAnimValue());
}
NS_ADDREF(*aAnimVal = mAnimVal);
return NS_OK;
}
开发者ID:harthur,项目名称:mozilla-central,代码行数:10,代码来源:DOMSVGAnimatedTransformList.cpp
示例13: LengthNoFlush
already_AddRefed<nsISVGPoint>
DOMSVGPointList::InsertItemBefore(nsISVGPoint& aNewItem, uint32_t aIndex,
ErrorResult& aError)
{
if (IsAnimValList()) {
aError.Throw(NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR);
return nullptr;
}
aIndex = std::min(aIndex, LengthNoFlush());
if (aIndex >= nsISVGPoint::MaxListIndex()) {
aError.Throw(NS_ERROR_DOM_INDEX_SIZE_ERR);
return nullptr;
}
nsCOMPtr<nsISVGPoint> domItem = &aNewItem;
if (domItem->HasOwner() || domItem->IsReadonly() ||
domItem->IsTranslatePoint()) {
domItem = domItem->Copy(); // must do this before changing anything!
}
// Ensure we have enough memory so we can avoid complex error handling below:
if (!mItems.SetCapacity(mItems.Length() + 1, fallible) ||
!InternalList().SetCapacity(InternalList().Length() + 1)) {
aError.Throw(NS_ERROR_OUT_OF_MEMORY);
return nullptr;
}
if (AnimListMirrorsBaseList()) {
DOMSVGPointList *animVal =
GetDOMWrapperIfExists(InternalAList().GetAnimValKey());
MOZ_ASSERT(animVal, "animVal must be a valid pointer");
if (!animVal->mItems.SetCapacity(
animVal->mItems.Length() + 1, fallible)) {
aError.Throw(NS_ERROR_OUT_OF_MEMORY);
return nullptr;
}
}
AutoChangePointListNotifier notifier(this);
// Now that we know we're inserting, keep animVal list in sync as necessary.
MaybeInsertNullInAnimValListAt(aIndex);
InternalList().InsertItem(aIndex, domItem->ToSVGPoint());
MOZ_ALWAYS_TRUE(mItems.InsertElementAt(aIndex, domItem, fallible));
// This MUST come after the insertion into InternalList(), or else under the
// insertion into InternalList() the values read from domItem would be bad
// data from InternalList() itself!:
domItem->InsertingIntoList(this, aIndex, IsAnimValList());
UpdateListIndicesFromIndex(mItems, aIndex + 1);
return domItem.forget();
}
开发者ID:Wafflespeanut,项目名称:gecko-dev,代码行数:54,代码来源:DOMSVGPointList.cpp
示例14: InternalAList
bool
DOMSVGAnimatedLengthList::IsAnimating() const
{
return InternalAList().IsAnimating();
}
开发者ID:Anachid,项目名称:mozilla-central,代码行数:5,代码来源:DOMSVGAnimatedLengthList.cpp
示例15: InternalAList
bool
SVGAnimatedTransformList::IsAnimating() const
{
return InternalAList().IsAnimating();
}
开发者ID:marcoscaceres,项目名称:gecko-dev,代码行数:5,代码来源:SVGAnimatedTransformList.cpp
示例16: GetDOMWrapperIfExists
bool
DOMSVGPointList::AnimListMirrorsBaseList() const
{
return GetDOMWrapperIfExists(InternalAList().GetAnimValKey()) &&
!AttrIsAnimating();
}
开发者ID:Wafflespeanut,项目名称:gecko-dev,代码行数:6,代码来源:DOMSVGPointList.cpp
示例17: InternalAList
bool
DOMSVGAnimatedNumberList::IsAnimating() const
{
return InternalAList().IsAnimating();
}
开发者ID:70599,项目名称:Waterfox,代码行数:5,代码来源:DOMSVGAnimatedNumberList.cpp
示例18: SVGAnimatedNumberListTearoffTable
DOMSVGAnimatedNumberList::~DOMSVGAnimatedNumberList()
{
// Script no longer has any references to us, to our base/animVal objects, or
// to any of their list items.
SVGAnimatedNumberListTearoffTable().RemoveTearoff(&InternalAList());
}
开发者ID:70599,项目名称:Waterfox,代码行数:6,代码来源:DOMSVGAnimatedNumberList.cpp
注:本文中的InternalAList函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论