Bug 380691 - <clipPath> and <mask> not working with <foreignObject>. r+sr=roc

This commit is contained in:
tor%cs.brown.edu 2007-05-16 15:14:19 +00:00
Родитель d7ab51e3b8
Коммит fb831eea84
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -81,6 +81,7 @@
#include "gfxMatrix.h"
#include "nsStubMutationObserver.h"
#include "gfxPlatform.h"
#include "nsSVGForeignObjectFrame.h"
class nsSVGPropertyBase : public nsStubMutationObserver {
public:
@ -881,6 +882,12 @@ already_AddRefed<nsIDOMSVGMatrix>
nsSVGUtils::GetCanvasTM(nsIFrame *aFrame)
{
if (!aFrame->IsLeaf()) {
// foreignObject is the one non-leaf svg frame that isn't a SVGContainer
if (aFrame->GetType() == nsGkAtoms::svgForeignObjectFrame) {
nsSVGForeignObjectFrame *foreignFrame =
NS_STATIC_CAST(nsSVGForeignObjectFrame*, aFrame);
return foreignFrame->GetCanvasTM();
}
nsSVGContainerFrame *containerFrame = NS_STATIC_CAST(nsSVGContainerFrame*,
aFrame);
return containerFrame->GetCanvasTM();