mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 807355 - Only create marker effects if the content is markable. r=jwatt
This commit is contained in:
parent
e58e8d04a8
commit
0feceed4cd
@ -11,6 +11,7 @@
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "nsSVGClipPathFrame.h"
|
||||
#include "nsSVGPaintServerFrame.h"
|
||||
#include "nsSVGPathGeometryElement.h"
|
||||
#include "nsSVGFilterFrame.h"
|
||||
#include "nsSVGMaskFrame.h"
|
||||
#include "nsSVGTextPathFrame.h"
|
||||
@ -386,7 +387,8 @@ nsSVGMarkerProperty *
|
||||
nsSVGEffects::GetMarkerProperty(nsIURI *aURI, nsIFrame *aFrame,
|
||||
const FramePropertyDescriptor *aProp)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(aFrame->GetType() == nsGkAtoms::svgPathGeometryFrame,
|
||||
NS_ABORT_IF_FALSE(aFrame->GetType() == nsGkAtoms::svgPathGeometryFrame &&
|
||||
static_cast<nsSVGPathGeometryElement*>(aFrame->GetContent())->IsMarkable(),
|
||||
"Bad frame");
|
||||
return static_cast<nsSVGMarkerProperty*>(
|
||||
GetEffectProperty(aURI, aFrame, aProp, CreateMarkerProperty));
|
||||
@ -529,7 +531,8 @@ nsSVGEffects::UpdateEffects(nsIFrame *aFrame)
|
||||
GetEffectProperty(aFrame->GetStyleSVGReset()->mFilter,
|
||||
aFrame, FilterProperty(), CreateFilterProperty);
|
||||
|
||||
if (aFrame->GetType() == nsGkAtoms::svgPathGeometryFrame) {
|
||||
if (aFrame->GetType() == nsGkAtoms::svgPathGeometryFrame &&
|
||||
static_cast<nsSVGPathGeometryElement*>(aFrame->GetContent())->IsMarkable()) {
|
||||
// Set marker properties here to avoid reference loops
|
||||
const nsStyleSVG *style = aFrame->GetStyleSVG();
|
||||
GetEffectProperty(style->mMarkerStart, aFrame, MarkerBeginProperty(),
|
||||
|
Loading…
Reference in New Issue
Block a user