summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGMaskElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/svg/SVGMaskElement.cpp')
-rw-r--r--WebCore/svg/SVGMaskElement.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/WebCore/svg/SVGMaskElement.cpp b/WebCore/svg/SVGMaskElement.cpp
index 127f6f4..e131d34 100644
--- a/WebCore/svg/SVGMaskElement.cpp
+++ b/WebCore/svg/SVGMaskElement.cpp
@@ -2,8 +2,7 @@
Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
2005 Alexander Kellett <lypanov@kde.org>
-
- This file is part of the KDE project
+ 2009 Dirk Schulze <krit@webkit.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -158,11 +157,14 @@ PassOwnPtr<ImageBuffer> SVGMaskElement::drawMaskerContent(const FloatRect& targe
return 0;
FloatPoint maskContextLocation = maskDestRect.location();
- if (maskUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ if (maskUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
maskDestRect.move(targetRect.x(), targetRect.y());
-
- if (maskContentUnits() != SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
- maskContextLocation.move(targetRect.x(), targetRect.y());
+ if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
+ maskContextLocation.move(targetRect.x(), targetRect.y());
+ } else {
+ if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
+ maskContextLocation.move(-targetRect.x(), -targetRect.y());
+ }
GraphicsContext* maskImageContext = maskImage->context();
ASSERT(maskImageContext);