mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 20:37:31 +09:00
Bug 1430557. r=longsonr, a=lizzard
--HG-- extra : rebase_source : 5109c816d9ad1ce1881e3670b8d74ae0dc475223
This commit is contained in:
parent
02cf5ea228
commit
459fe394c4
1 changed files with 19 additions and 2 deletions
|
|
@ -460,6 +460,18 @@ DOMSVGPathSegList::ReplaceItem(DOMSVGPathSeg& aNewItem,
|
||||||
float segAsRaw[1 + NS_SVG_PATH_SEG_MAX_ARGS];
|
float segAsRaw[1 + NS_SVG_PATH_SEG_MAX_ARGS];
|
||||||
domItem->ToSVGPathSegEncodedData(segAsRaw);
|
domItem->ToSVGPathSegEncodedData(segAsRaw);
|
||||||
|
|
||||||
|
if (AnimListMirrorsBaseList()) {
|
||||||
|
// The anim val list is in sync with the base val list - remove mirroring
|
||||||
|
// animVal item if necessary. We do this *before* touching InternalList()
|
||||||
|
// so the removed item can correctly store its internal value.
|
||||||
|
DOMSVGPathSegList* animVal =
|
||||||
|
GetDOMWrapperIfExists(InternalAList().GetAnimValKey());
|
||||||
|
if (animVal->ItemAt(aIndex)) {
|
||||||
|
animVal->ItemAt(aIndex)->RemovingFromList();
|
||||||
|
animVal->ItemAt(aIndex) = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!InternalList().mData.ReplaceElementsAt(internalIndex, 1 + oldArgCount,
|
if (!InternalList().mData.ReplaceElementsAt(internalIndex, 1 + oldArgCount,
|
||||||
segAsRaw, 1 + newArgCount,
|
segAsRaw, 1 + newArgCount,
|
||||||
fallible)) {
|
fallible)) {
|
||||||
|
|
@ -474,8 +486,13 @@ DOMSVGPathSegList::ReplaceItem(DOMSVGPathSeg& aNewItem,
|
||||||
|
|
||||||
int32_t delta = newArgCount - oldArgCount;
|
int32_t delta = newArgCount - oldArgCount;
|
||||||
if (delta != 0) {
|
if (delta != 0) {
|
||||||
for (uint32_t i = aIndex + 1; i < LengthNoFlush(); ++i) {
|
// Sync up the internal indexes of all ItemProxys that come after aIndex:
|
||||||
mItems[i].mInternalDataIndex += delta;
|
UpdateListIndicesFromIndex(aIndex + 1, delta);
|
||||||
|
if (AnimListMirrorsBaseList()) {
|
||||||
|
// The anim val list is in sync with the base val list
|
||||||
|
DOMSVGPathSegList* animVal =
|
||||||
|
GetDOMWrapperIfExists(InternalAList().GetAnimValKey());
|
||||||
|
animVal->UpdateListIndicesFromIndex(aIndex + 1, delta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue