mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 539122 - Stop restyling non-elements with SVG. r=roc
This commit is contained in:
parent
02c4b58c63
commit
c26bcbe1e4
@ -365,6 +365,9 @@ nsSVGEffects::EffectProperties::GetMaskFrame(PRBool *aOK)
|
||||
void
|
||||
nsSVGEffects::UpdateEffects(nsIFrame *aFrame)
|
||||
{
|
||||
NS_ASSERTION(aFrame->GetContent()->IsNodeOfType(nsINode::eELEMENT),
|
||||
"aFrame's content should be an element");
|
||||
|
||||
aFrame->DeleteProperty(nsGkAtoms::filter);
|
||||
aFrame->DeleteProperty(nsGkAtoms::mask);
|
||||
aFrame->DeleteProperty(nsGkAtoms::clipPath);
|
||||
@ -392,10 +395,12 @@ nsSVGEffects::UpdateEffects(nsIFrame *aFrame)
|
||||
CreateMarkerProperty);
|
||||
}
|
||||
|
||||
nsIFrame *aKid = aFrame->GetFirstChild(nsnull);
|
||||
while (aKid) {
|
||||
UpdateEffects(aKid);
|
||||
aKid = aKid->GetNextSibling();
|
||||
nsIFrame *kid = aFrame->GetFirstChild(nsnull);
|
||||
while (kid) {
|
||||
if (kid->GetContent()->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
UpdateEffects(kid);
|
||||
}
|
||||
kid = kid->GetNextSibling();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -911,19 +911,19 @@ nsSVGUtils::GetCanvasTM(nsIFrame *aFrame)
|
||||
void
|
||||
nsSVGUtils::NotifyChildrenOfSVGChange(nsIFrame *aFrame, PRUint32 aFlags)
|
||||
{
|
||||
nsIFrame *aKid = aFrame->GetFirstChild(nsnull);
|
||||
nsIFrame *kid = aFrame->GetFirstChild(nsnull);
|
||||
|
||||
while (aKid) {
|
||||
nsISVGChildFrame* SVGFrame = do_QueryFrame(aKid);
|
||||
while (kid) {
|
||||
nsISVGChildFrame* SVGFrame = do_QueryFrame(kid);
|
||||
if (SVGFrame) {
|
||||
SVGFrame->NotifySVGChanged(aFlags);
|
||||
} else {
|
||||
NS_ASSERTION(aKid->IsFrameOfType(nsIFrame::eSVG), "SVG frame expected");
|
||||
NS_ASSERTION(kid->IsFrameOfType(nsIFrame::eSVG), "SVG frame expected");
|
||||
// recurse into the children of container frames e.g. <clipPath>, <mask>
|
||||
// in case they have child frames with transformation matrices
|
||||
nsSVGUtils::NotifyChildrenOfSVGChange(aKid, aFlags);
|
||||
nsSVGUtils::NotifyChildrenOfSVGChange(kid, aFlags);
|
||||
}
|
||||
aKid = aKid->GetNextSibling();
|
||||
kid = kid->GetNextSibling();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user