mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 723446. Be a little more careful changing declarations on keyframe rules. r=dbaron
This commit is contained in:
parent
be2a314e45
commit
dbea24d349
@ -1964,7 +1964,11 @@ nsCSSKeyframeRule::GetStyle(nsIDOMCSSStyleDeclaration** aStyle)
|
||||
void
|
||||
nsCSSKeyframeRule::ChangeDeclaration(css::Declaration* aDeclaration)
|
||||
{
|
||||
mDeclaration = aDeclaration;
|
||||
// Be careful to not assign to an nsAutoPtr if we would be assigning
|
||||
// the thing it already holds.
|
||||
if (aDeclaration != mDeclaration) {
|
||||
mDeclaration = aDeclaration;
|
||||
}
|
||||
|
||||
if (mSheet) {
|
||||
mSheet->SetModifiedByChildRule();
|
||||
|
@ -66,6 +66,7 @@ class nsAutoPtr
|
||||
void
|
||||
assign( T* newPtr )
|
||||
{
|
||||
NS_ABORT_IF_FALSE(mRawPtr != newPtr || !newPtr, "This makes no sense!");
|
||||
T* oldPtr = mRawPtr;
|
||||
mRawPtr = newPtr;
|
||||
delete oldPtr;
|
||||
|
Loading…
Reference in New Issue
Block a user