mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 841812 - Avoid crashing when changing attributes on an invalidly parented <textPath>. r=roc
This commit is contained in:
parent
3d6315d338
commit
a3ae42ea56
11
layout/svg/crashtests/841812-1.svg
Normal file
11
layout/svg/crashtests/841812-1.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<text>
|
||||
<circle>
|
||||
<textPath id="t" xlink:href="data:text/html,1" />
|
||||
</circle>
|
||||
</text>
|
||||
|
||||
<script>
|
||||
window.addEventListener("load", function() { document.getElementById("t").removeAttribute('xlink:href'); }, false);
|
||||
</script>
|
||||
</svg>
|
After Width: | Height: | Size: 363 B |
@ -152,3 +152,4 @@ load 789390-1.html
|
||||
load 808318-1.svg
|
||||
load 813420-1.svg
|
||||
load 841163-1.svg
|
||||
load 841812-1.svg
|
||||
|
@ -2956,8 +2956,10 @@ nsSVGTextFrame2::MutationObserver::AttributeChanged(
|
||||
aAttribute == nsGkAtoms::href) {
|
||||
// Blow away our reference, if any
|
||||
nsIFrame* childElementFrame = aElement->GetPrimaryFrame();
|
||||
childElementFrame->Properties().Delete(nsSVGEffects::HrefProperty());
|
||||
mFrame->NotifyGlyphMetricsChange();
|
||||
if (childElementFrame) {
|
||||
childElementFrame->Properties().Delete(nsSVGEffects::HrefProperty());
|
||||
mFrame->NotifyGlyphMetricsChange();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (aNameSpaceID == kNameSpaceID_None &&
|
||||
|
Loading…
Reference in New Issue
Block a user