mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1153693 - Only call ReleaseRef on nsStyle{ClipPath,Filter} once when setting a new value. r=dbaron
This commit is contained in:
parent
12fce2feee
commit
97788259ef
19
layout/style/crashtests/1153693-1.html
Normal file
19
layout/style/crashtests/1153693-1.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
|
||||
.a { clip-path: url(z); }
|
||||
#x { clip-path: inherit; }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="a">
|
||||
<div class="a" id="x"></div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -112,5 +112,6 @@ load 1066089-1.html
|
||||
load 1074651-1.html
|
||||
pref(dom.webcomponents.enabled,true) load 1089463-1.html
|
||||
pref(layout.css.expensive-style-struct-assertions.enabled,true) load 1136010-1.html
|
||||
load 1153693-1.html
|
||||
load large_border_image_width.html
|
||||
load border-image-visited-link.html
|
||||
|
@ -1068,8 +1068,6 @@ nsStyleClipPath::operator=(const nsStyleClipPath& aOther)
|
||||
return *this;
|
||||
}
|
||||
|
||||
ReleaseRef();
|
||||
|
||||
if (aOther.mType == NS_STYLE_CLIP_PATH_URL) {
|
||||
SetURL(aOther.mURL);
|
||||
} else if (aOther.mType == NS_STYLE_CLIP_PATH_SHAPE) {
|
||||
@ -1077,6 +1075,7 @@ nsStyleClipPath::operator=(const nsStyleClipPath& aOther)
|
||||
} else if (aOther.mType == NS_STYLE_CLIP_PATH_BOX) {
|
||||
SetSizingBox(aOther.mSizingBox);
|
||||
} else {
|
||||
ReleaseRef();
|
||||
mSizingBox = NS_STYLE_CLIP_SHAPE_SIZING_NOBOX;
|
||||
mType = NS_STYLE_CLIP_PATH_NONE;
|
||||
}
|
||||
@ -1187,7 +1186,11 @@ nsStyleFilter::operator=(const nsStyleFilter& aOther)
|
||||
SetDropShadow(aOther.mDropShadow);
|
||||
} else if (aOther.mType != NS_STYLE_FILTER_NONE) {
|
||||
SetFilterParameter(aOther.mFilterParameter, aOther.mType);
|
||||
} else {
|
||||
ReleaseRef();
|
||||
mType = NS_STYLE_FILTER_NONE;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -1220,6 +1223,7 @@ nsStyleFilter::ReleaseRef()
|
||||
NS_ASSERTION(mURL, "expected pointer");
|
||||
mURL->Release();
|
||||
}
|
||||
mURL = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user