[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

krit at webkit.org krit at webkit.org
Fri Feb 26 22:14:44 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 4acbdb3319b788d53e42313e2e267cef70bc3648
Author: krit at webkit.org <krit at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Feb 8 20:30:42 2010 +0000

    2010-02-08  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            Add back an AffineTransform class for use by SVG
            https://bugs.webkit.org/show_bug.cgi?id=33750
    
            This adds back AffineTransform. This saves additional 4% memory consumption
            on the 50k rects stress test: https://bugs.webkit.org/attachment.cgi?id=46721
            It also makes it possible to optimize the calculations internally of
            AffineTransform to the needs of 2D transformations (the second benefit for SVG,
            which uses transformations relative often at the moment.
            Everything that is 2D related (like images, patterns, gradients, fonts), uses
            AffineTransform now.
    
            * WebCore.xcodeproj/project.pbxproj:
            * bindings/js/JSSVGMatrixCustom.cpp:
            (WebCore::JSSVGMatrix::multiply):
            (WebCore::JSSVGMatrix::inverse):
            (WebCore::JSSVGMatrix::rotateFromVector):
            * bindings/js/JSSVGPODTypeWrapper.h:
            * bindings/scripts/CodeGeneratorJS.pm:
            * bindings/scripts/CodeGeneratorObjC.pm:
            * bindings/scripts/CodeGeneratorV8.pm:
            * bindings/v8/V8Index.h:
            * bindings/v8/custom/V8SVGMatrixCustom.cpp:
            (WebCore::V8SVGMatrix::multiplyCallback):
            (WebCore::V8SVGMatrix::inverseCallback):
            (WebCore::V8SVGMatrix::rotateFromVectorCallback):
            * html/HTMLCanvasElement.cpp: Changed to AffineTransform now
            (WebCore::HTMLCanvasElement::baseTransform):
            * html/HTMLCanvasElement.h:
            * platform/graphics/FloatPoint.cpp:
            (WebCore::FloatPoint::matrixTransform):
            * platform/graphics/FloatPoint.h:
            * platform/graphics/GeneratedImage.cpp:
            (WebCore::GeneratedImage::drawPattern):
            * platform/graphics/GeneratedImage.h:
            * platform/graphics/Gradient.cpp:
            (WebCore::Gradient::setGradientSpaceTransform):
            (WebCore::Gradient::setPlatformGradientSpaceTransform):
            * platform/graphics/Gradient.h:
            (WebCore::Gradient::gradientSpaceTransform):
            * platform/graphics/GraphicsContext.h:
            * platform/graphics/Image.cpp:
            (WebCore::Image::drawTiled):
            * platform/graphics/Image.h:
            * platform/graphics/ImageBuffer.h:
            (WebCore::ImageBuffer::baseTransform):
            * platform/graphics/Path.h:
            * platform/graphics/Pattern.cpp:
            (WebCore::Pattern::setPatternSpaceTransform):
            * platform/graphics/Pattern.h:
            (WebCore::Pattern::create):
            (WebCore::Pattern::tileImage):
            * platform/graphics/cairo/FontCairo.cpp:
            (WebCore::Font::drawGlyphs):
            * platform/graphics/cairo/GraphicsContextCairo.cpp:
            (WebCore::setPlatformFill):
            (WebCore::setPlatformStroke):
            (WebCore::GraphicsContext::getCTM):
            * platform/graphics/cairo/ImageCairo.cpp:
            (WebCore::Image::drawPattern):
            * platform/graphics/cairo/PathCairo.cpp:
            * platform/graphics/cairo/PatternCairo.cpp:
            (WebCore::Pattern::createPlatformPattern):
            * platform/graphics/cg/GraphicsContextCG.cpp:
            (WebCore::GraphicsContext::getCTM):
            * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
            (WebCore::GraphicsContextPlatformPrivate::concatCTM):
            * platform/graphics/cg/ImageCG.cpp:
            (WebCore::Image::drawPattern):
            * platform/graphics/cg/PathCG.cpp:
            * platform/graphics/cg/PatternCG.cpp:
            (WebCore::Pattern::createPlatformPattern):
            * platform/graphics/haiku/GraphicsContextHaiku.cpp:
            (WebCore::GraphicsContext::getCTM):
            * platform/graphics/haiku/ImageHaiku.cpp:
            (WebCore::Image::drawPattern):
            * platform/graphics/haiku/PathHaiku.cpp:
            * platform/graphics/qt/FontQt.cpp:
            (WebCore::Font::drawComplexText):
            * platform/graphics/qt/GraphicsContextQt.cpp:
            (WebCore::GraphicsContext::getCTM):
            (WebCore::GraphicsContext::fillPath):
            (WebCore::GraphicsContext::strokePath):
            (WebCore::GraphicsContext::fillRect):
            * platform/graphics/qt/ImageQt.cpp:
            (WebCore::Image::drawPattern):
            * platform/graphics/qt/PathQt.cpp:
            * platform/graphics/qt/PatternQt.cpp:
            (WebCore::Pattern::createPlatformPattern):
            * platform/graphics/skia/GradientSkia.cpp:
            (WebCore::Gradient::setPlatformGradientSpaceTransform):
            * platform/graphics/skia/GraphicsContextSkia.cpp:
            (WebCore::GraphicsContext::getCTM):
            * platform/graphics/skia/ImageSkia.cpp:
            (WebCore::Image::drawPattern):
            * platform/graphics/skia/PathSkia.cpp:
            * platform/graphics/skia/PatternSkia.cpp:
            (WebCore::Pattern::platformPattern):
            * platform/graphics/skia/SkiaFontWin.cpp:
            (WebCore::windowsCanHandleTextDrawing):
            * platform/graphics/transforms/AffineTransform.cpp:
            (WebCore::AffineTransform::makeIdentity): needed by some parts of WebCore
            (WebCore::AffineTransform::scale): Didn't scale the complete matrix
            (WebCore::AffineTransform::translate): Didn't respect other transformations
            (WebCore::AffineTransform::shear): direct calculation, no extra multiply of matrices
            (WebCore::AffineTransform::map):
            (WebCore::AffineTransform::mapPoint):
            (WebCore::AffineTransform::mapRect):
            * platform/graphics/transforms/AffineTransform.h:
            (WebCore::AffineTransform::isIdentityOrTranslation):
            * platform/graphics/transforms/TransformationMatrix.cpp:
            (WebCore::TransformationMatrix::toAffineTransform):
            * platform/graphics/transforms/TransformationMatrix.h:
            * platform/graphics/win/FontCGWin.cpp:
            (WebCore::drawGDIGlyphs):
            * platform/graphics/win/GraphicsContextCGWin.cpp:
            * platform/graphics/win/GraphicsContextCairoWin.cpp:
            * platform/graphics/win/GraphicsContextWin.cpp:
            (WebCore::GraphicsContextPlatformPrivate::concatCTM):
            * platform/graphics/wince/FontWince.cpp:
            * platform/graphics/wince/GraphicsContextWince.cpp:
            (WebCore::GraphicsContextPlatformPrivate::concatCTM):
            (WebCore::GraphicsContext::fillPath):
            (WebCore::GraphicsContext::strokePath):
            (WebCore::GraphicsContext::getCTM):
            (WebCore::GraphicsContext::drawBitmapPattern):
            * platform/graphics/wince/ImageBufferWince.cpp:
            (WebCore::):
            (WebCore::BufferedImage::drawPattern):
            * platform/graphics/wince/PathWince.cpp:
            (WebCore::Path::transform):
            * platform/graphics/wince/PlatformPathWince.cpp:
            (WebCore::drawPolygons):
            (WebCore::PathPolygon::transform):
            (WebCore::PlatformPathElement::transform):
            (WebCore::PlatformPath::strokePath):
            (WebCore::PlatformPath::fillPath):
            (WebCore::PlatformPath::transform):
            * platform/graphics/wince/PlatformPathWince.h:
            (WebCore::):
            * platform/graphics/wx/GraphicsContextWx.cpp:
            (WebCore::GraphicsContext::getCTM):
            * platform/graphics/wx/ImageWx.cpp:
            (WebCore::BitmapImage::drawPattern):
            (WebCore::Image::drawPattern):
            * platform/graphics/wx/PathWx.cpp:
            * platform/gtk/RenderThemeGtk.cpp:
            (WebCore::paintMozillaGtkWidget):
            * plugins/win/PluginViewWin.cpp:
            (WebCore::PluginView::paintWindowedPluginIntoContext):
            * rendering/RenderBox.cpp:
            (WebCore::RenderBox::localTransform):
            * rendering/RenderBox.h:
            * rendering/RenderBoxModelObject.cpp:
            (WebCore::RenderBoxModelScaleData::RenderBoxModelScaleData):
            (WebCore::RenderBoxModelScaleData::transform):
            (WebCore::RenderBoxModelScaleData::setTransform):
            (WebCore::RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality):
            (WebCore::RenderBoxModelObject::paintBoxShadow):
            * rendering/RenderForeignObject.cpp:
            (WebCore::RenderForeignObject::translationForAttributes):
            (WebCore::RenderForeignObject::localToParentTransform):
            * rendering/RenderForeignObject.h:
            (WebCore::RenderForeignObject::localTransform):
            * rendering/RenderLayer.cpp:
            (WebCore::RenderLayer::paintLayer):
            * rendering/RenderObject.cpp:
            (WebCore::RenderObject::localTransform):
            (WebCore::RenderObject::localToParentTransform):
            (WebCore::RenderObject::absoluteTransform):
            * rendering/RenderObject.h:
            * rendering/RenderPath.cpp:
            (WebCore::RenderPath::localToParentTransform):
            (WebCore::RenderPath::localTransform):
            * rendering/RenderPath.h:
            * rendering/RenderSVGHiddenContainer.h:
            (WebCore::RenderSVGHiddenContainer::absoluteTransform):
            * rendering/RenderSVGImage.h:
            (WebCore::RenderSVGImage::localToParentTransform):
            (WebCore::RenderSVGImage::localTransform):
            * rendering/RenderSVGRoot.cpp:
            (WebCore::RenderSVGRoot::localToBorderBoxTransform):
            (WebCore::RenderSVGRoot::localToRepaintContainerTransform):
            (WebCore::RenderSVGRoot::localToParentTransform):
            (WebCore::RenderSVGRoot::absoluteTransform):
            (WebCore::RenderSVGRoot::localTransform):
            * rendering/RenderSVGRoot.h:
            * rendering/RenderSVGText.h:
            (WebCore::RenderSVGText::localToParentTransform):
            (WebCore::RenderSVGText::localTransform):
            * rendering/RenderSVGTransformableContainer.cpp:
            (WebCore::RenderSVGTransformableContainer::localToParentTransform):
            (WebCore::RenderSVGTransformableContainer::localTransform):
            (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
            * rendering/RenderSVGTransformableContainer.h:
            * rendering/RenderSVGViewportContainer.cpp:
            (WebCore::RenderSVGViewportContainer::markerBoundaries):
            (WebCore::RenderSVGViewportContainer::markerContentTransformation):
            (WebCore::RenderSVGViewportContainer::viewportTransform):
            (WebCore::RenderSVGViewportContainer::localToParentTransform):
            (WebCore::RenderSVGViewportContainer::absoluteTransform):
            * rendering/RenderSVGViewportContainer.h:
            * rendering/SVGCharacterLayoutInfo.cpp:
            (WebCore::SVGChar::characterTransform):
            * rendering/SVGCharacterLayoutInfo.h:
            (WebCore::SVGTextChunkWalker::operator()):
            * rendering/SVGInlineTextBox.cpp:
            (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
            (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
            (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
            (WebCore::SVGInlineTextBox::paintCharacters):
            (WebCore::SVGInlineTextBox::paintDecoration):
            * rendering/SVGMarkerLayoutInfo.h:
            (WebCore::MarkerLayout::MarkerLayout):
            * rendering/SVGRenderSupport.cpp:
            (WebCore::applyTransformToPaintInfo):
            * rendering/SVGRenderSupport.h:
            * rendering/SVGRenderTreeAsText.cpp:
            (WebCore::operator<<):
            * rendering/SVGRenderTreeAsText.h:
            * rendering/SVGRootInlineBox.cpp:
            (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
            (WebCore::applyTextLengthCorrectionToTextChunk):
            (WebCore::SVGRootInlineBox::buildLayoutInformation):
            * rendering/TransformState.cpp:
            (WebCore::TransformState::applyTransform):
            * rendering/TransformState.h:
            * svg/GradientAttributes.h:
            (WebCore::GradientAttributes::gradientTransform):
            (WebCore::GradientAttributes::setGradientTransform):
            * svg/PatternAttributes.h:
            (WebCore::PatternAttributes::patternTransform):
            (WebCore::PatternAttributes::setPatternTransform):
            * svg/SVGAnimateMotionElement.cpp:
            (WebCore::SVGAnimateMotionElement::resetToBaseValue):
            (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
            (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
            * svg/SVGAnimateMotionElement.h:
            * svg/SVGAnimateTransformElement.cpp:
            * svg/SVGAnimateTransformElement.h:
            * svg/SVGElement.h:
            (WebCore::SVGElement::supplementalTransform):
            * svg/SVGFitToViewBox.cpp:
            (WebCore::SVGFitToViewBox::viewBoxToViewTransform):
            * svg/SVGFitToViewBox.h:
            * svg/SVGLocatable.cpp:
            (WebCore::SVGLocatable::getCTM):
            (WebCore::SVGLocatable::getScreenCTM):
            (WebCore::SVGLocatable::getTransformToElement):
            * svg/SVGLocatable.h:
            * svg/SVGMarkerElement.cpp:
            (WebCore::SVGMarkerElement::viewBoxToViewTransform):
            * svg/SVGMarkerElement.h:
            * svg/SVGMaskElement.cpp:
            (WebCore::SVGMaskElement::drawMaskerContent):
            * svg/SVGMatrix.idl:
            * svg/SVGPatternElement.cpp:
            (WebCore::SVGPatternElement::buildPattern):
            * svg/SVGPreserveAspectRatio.cpp:
            (WebCore::SVGPreserveAspectRatio::getCTM):
            * svg/SVGPreserveAspectRatio.h:
            * svg/SVGSVGElement.cpp:
            (WebCore::SVGSVGElement::viewport):
            (WebCore::SVGSVGElement::createSVGMatrix):
            (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
            (WebCore::SVGSVGElement::getCTM):
            (WebCore::SVGSVGElement::getScreenCTM):
            (WebCore::SVGSVGElement::viewBoxToViewTransform):
            * svg/SVGSVGElement.h:
            * svg/SVGStyledLocatableElement.cpp:
            (WebCore::SVGStyledLocatableElement::getCTM):
            (WebCore::SVGStyledLocatableElement::getScreenCTM):
            * svg/SVGStyledLocatableElement.h:
            * svg/SVGStyledTransformableElement.cpp:
            (WebCore::SVGStyledTransformableElement::getCTM):
            (WebCore::SVGStyledTransformableElement::getScreenCTM):
            (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
            (WebCore::SVGStyledTransformableElement::supplementalTransform):
            * svg/SVGStyledTransformableElement.h:
            (WebCore::SVGStyledTransformableElement::isStyledTransformable):
            (WebCore::SVGStyledTransformableElement::toPathData):
            * svg/SVGTextContentElement.cpp:
            (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
            * svg/SVGTextElement.cpp:
            (WebCore::SVGTextElement::getScreenCTM):
            (WebCore::SVGTextElement::getCTM):
            (WebCore::SVGTextElement::animatedLocalTransform):
            (WebCore::SVGTextElement::supplementalTransform):
            * svg/SVGTextElement.h:
            * svg/SVGTextPathElement.cpp:
            * svg/SVGTransform.cpp:
            (SVGTransform::SVGTransform):
            (SVGTransform::matrix):
            (SVGTransform::setMatrix):
            * svg/SVGTransform.h:
            * svg/SVGTransformDistance.cpp:
            (WebCore::SVGTransformDistance::SVGTransformDistance):
            (WebCore::SVGTransformDistance::scaledDistance):
            (WebCore::SVGTransformDistance::isZero):
            * svg/SVGTransformDistance.h:
            * svg/SVGTransformList.cpp:
            (SVGTransformList::createSVGTransformFromMatrix):
            (SVGTransformList::concatenate):
            (SVGTransformList::valueAsString):
            * svg/SVGTransformList.h:
            * svg/SVGTransformable.cpp:
            (WebCore::SVGTransformable::getCTM):
            (WebCore::SVGTransformable::getScreenCTM):
            (WebCore::SVGTransformable::parseTransformValue):
            * svg/SVGTransformable.h:
            (WebCore::SVGTransformable::):
            * svg/graphics/SVGPaintServerGradient.cpp:
            (WebCore::SVGPaintServerGradient::gradientTransform):
            (WebCore::SVGPaintServerGradient::setGradientTransform):
            (WebCore::clipToTextMask):
            (WebCore::SVGPaintServerGradient::setup):
            * svg/graphics/SVGPaintServerGradient.h:
            * svg/graphics/SVGPaintServerPattern.cpp:
            (WebCore::SVGPaintServerPattern::patternTransform):
            (WebCore::SVGPaintServerPattern::setPatternTransform):
            (WebCore::SVGPaintServerPattern::setup):
            * svg/graphics/SVGPaintServerPattern.h:
            * svg/graphics/SVGResourceClipper.cpp:
            (WebCore::SVGResourceClipper::applyClip):
            * svg/graphics/SVGResourceMarker.cpp:
            (WebCore::SVGResourceMarker::markerTransformation):
            (WebCore::SVGResourceMarker::draw):
            * svg/graphics/SVGResourceMarker.h:
            * svg/graphics/filters/SVGFEImage.cpp:
            * svg/graphics/filters/SVGFETile.cpp:
            (WebCore::FETile::apply):
    
    2010-02-08  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            Add back an AffineTransform class for use by SVG
            https://bugs.webkit.org/show_bug.cgi?id=33750
    
            Some negative zero problems fixed, but new one were added on other places. A seperate
            patch should fix it all at once.
            use-on-disallowed-foreign-object-3 and 4 had wrong results. The old SVG code
            with TransformationMatrix used translateRight, that was wrong at this place and is
            fixed now.
    
            * platform/mac/svg/W3C-SVG-1.1/animate-elem-80-t-expected.txt:
            * platform/mac/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt:
            * platform/mac/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt:
            * platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
            * platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
            * platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
            * platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt:
            * platform/mac/svg/custom/use-on-disallowed-foreign-object-4-expected.txt:
            * svg/dom/SVGMatrix-interface-expected.txt:
            * svg/dom/SVGMatrix-interface.xhtml:
    
    2010-02-08  Dirk Schulze  <krit at webkit.org>
    
            Reviewed by Nikolas Zimmermann.
    
            Add back an AffineTransform class for use by SVG
            https://bugs.webkit.org/show_bug.cgi?id=33750
    
            Use AffineTransform instead of TransformationMatrix here.
    
            * tests/TransparencyWinTest.cpp:
            (WebCore::TEST):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54503 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ccf6c7b..67febd1 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,27 @@
+2010-02-08  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Add back an AffineTransform class for use by SVG
+        https://bugs.webkit.org/show_bug.cgi?id=33750
+
+        Some negative zero problems fixed, but new one were added on other places. A seperate
+        patch should fix it all at once.
+        use-on-disallowed-foreign-object-3 and 4 had wrong results. The old SVG code
+        with TransformationMatrix used translateRight, that was wrong at this place and is
+        fixed now.
+
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-80-t-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
+        * platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt:
+        * platform/mac/svg/custom/use-on-disallowed-foreign-object-4-expected.txt:
+        * svg/dom/SVGMatrix-interface-expected.txt:
+        * svg/dom/SVGMatrix-interface.xhtml:
+
 2010-02-08  Nikolas Zimmermann  <nzimmermann at rim.com>
 
         Not reviewed. Fix last problematic SVG testcase, update coords-trans-01-b.svg win results, marking the end of the baseline regeneration for all platforms.
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-80-t-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-80-t-expected.txt
index 6bceb5e..afc4f2d 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-80-t-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-80-t-expected.txt
@@ -67,7 +67,7 @@ layer at (0,0) size 480x360
               RenderPath {line} at (15,219) size 90x2 [stroke={[type=SOLID] [color=#C0C0C0]}] [data="M-45.00,0.00 L45.00,0.00"]
               RenderPath {line} at (59,175) size 2x90 [stroke={[type=SOLID] [color=#C0C0C0]}] [data="M0.00,-45.00 L0.00,45.00"]
         RenderPath {line} at (0,0) size 0x0 [stroke={[type=SOLID] [color=#C0C0C0] [stroke width=15.00] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [data=""]
-        RenderPath {line} at (0,0) size 0x0 [transform={m=((0.00,1.00)(-1.00,0.00)) t=(80.00,-0.00)}] [stroke={[type=SOLID] [color=#C0C0C0] [stroke width=15.00] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [data=""]
+        RenderPath {line} at (0,0) size 0x0 [transform={m=((0.00,1.00)(-1.00,0.00)) t=(80.00,0.00)}] [stroke={[type=SOLID] [color=#C0C0C0] [stroke width=15.00] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [data=""]
         RenderPath {line} at (0,0) size 0x0 [transform={m=((-1.00,0.00)(-0.00,-1.00)) t=(80.00,80.00)}] [stroke={[type=SOLID] [color=#C0C0C0] [stroke width=15.00] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [data=""]
         RenderPath {line} at (0,0) size 0x0 [transform={m=((-0.00,-1.00)(1.00,-0.00)) t=(0.00,80.00)}] [stroke={[type=SOLID] [color=#C0C0C0] [stroke width=15.00] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [data=""]
         RenderPath {line} at (55,215) size 50x10 [stroke={[type=SOLID] [color=#C85050] [stroke width=10.00] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [data="M40.00,40.00 L80.00,40.00"]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt
index 3b1523e..01d9c06 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt
@@ -11,7 +11,7 @@ layer at (0,0) size 480x360
         RenderSVGText {text} at (30,130) size 105x22 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,-17) size 105x22
             chunk 1 text run 1 at (30.00,130.00) startOffset 0 endOffset 13 width 105.00: "Placed Glyphs"
-        RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((1.00,0.00)(0.00,-1.00)) t=(165.00,140.00)}]
+        RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((1.00,0.00)(-0.00,-1.00)) t=(165.00,140.00)}]
           RenderPath {line} at (165,139) size 210x2 [stroke={[type=SOLID] [color=#888888]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L210.00,0.00"]
           RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((0.03,0.00)(0.00,0.03)) t=(0.00,0.00)}]
             RenderPath {line} at (164,81) size 2x162 [stroke={[type=SOLID] [color=#888888] [stroke width=50.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,-3500.00 L0.00,2000.00"]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt
index 48fb70d..d444bfc 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt
@@ -11,7 +11,7 @@ layer at (0,0) size 480x360
       RenderSVGText {text} at (7,130) size 130x22 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,-17) size 130x22
           chunk 1 text run 1 at (7.00,130.00) startOffset 0 endOffset 15 width 130.00: "SVG over Glyphs"
-      RenderSVGContainer {g} at (168,85) size 205x72 [transform={m=((1.00,0.00)(0.00,-1.00)) t=(165.00,140.00)}]
+      RenderSVGContainer {g} at (168,85) size 205x72 [transform={m=((1.00,0.00)(-0.00,-1.00)) t=(165.00,140.00)}]
         RenderSVGContainer {g} at (168,85) size 205x72 [transform={m=((0.03,0.00)(0.00,0.03)) t=(0.00,0.00)}]
           RenderPath {path} at (168,96) size 37x45 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M1250.00,-30.00 C1188.67,-30.00,1135.33,48.67,1090.00,206.00 C1072.67,266.00,1051.00,371.00,1025.00,521.00 C957.00,511.67,868.00,495.00,758.00,471.00 L492.00,416.00 C458.67,328.67,401.67,201.00,321.00,33.00 C299.67,-4.33,270.67,-23.00,234.00,-23.00 C207.33,-23.00,183.67,-13.33,163.00,6.00 C142.33,25.33,131.67,49.33,131.00,78.00 C131.00,110.00,181.33,231.67,282.00,443.00 C270.67,460.33,265.00,480.33,265.00,503.00 C265.00,557.00,297.67,591.67,363.00,607.00 C439.00,749.67,535.00,913.67,651.00,1099.00 C809.00,1351.67,907.33,1478.00,946.00,1478.00 C998.67,1478.00,1034.67,1441.33,1054.00,1368.00 L1117.00,1032.00 L1266.00,337.00 L1323.00,179.00 C1342.33,125.00,1352.00,89.00,1352.00,71.00 C1352.00,42.33,1341.67,18.33,1321.00,-1.00 C1300.33,-20.33,1276.67,-30.00,1250.00,-30.00 Z M897.00,1113.00 L611.00,652.00 C691.67,672.67,814.00,697.67,978.00,727.00 L897.00,1113.00 Z"]
           RenderPath {path} at (208,109) size 31x48 [transform={m=((1.00,0.00)(0.00,1.00)) t=(1498.00,0.00)}] [fill={[type=SOLID] [color=#FFFFFF]}] [data="M1011.00,892.00 L665.00,144.00 C579.67,-38.00,514.33,-190.33,469.00,-313.00 L403.00,-507.00 C385.67,-555.00,355.67,-579.00,313.00,-579.00 C285.00,-579.00,261.00,-570.00,241.00,-552.00 C221.00,-534.00,210.67,-511.00,210.00,-483.00 C210.00,-416.33,282.00,-223.33,426.00,96.00 L68.00,785.00 L23.00,858.00 C5.00,888.67,-4.00,914.33,-4.00,935.00 C-4.00,962.33,6.33,986.33,27.00,1007.00 C47.67,1027.67,71.33,1038.00,98.00,1038.00 C128.67,1038.00,152.33,1026.33,169.00,1003.00 C282.33,845.67,404.00,621.67,534.00,331.00 L682.00,676.00 C735.33,795.33,786.67,898.00,836.00,984.00 C857.33,1021.33,885.33,1040.00,920.00,1040.00 C947.33,1040.00,971.33,1030.33,992.00,1011.00 C1012.67,991.67,1023.33,968.67,1024.00,942.00 C1024.00,927.33,1019.67,910.67,1011.00,892.00 Z"]
@@ -29,7 +29,7 @@ layer at (0,0) size 480x360
         RenderSVGText {text} at (0,0) size 210x83 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,-66) size 210x83
             chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 5 width 209.71: "Ay\x{D6}@\x{E7}"
-      RenderSVGContainer {g} at (168,155) size 205x72 [transform={m=((1.00,0.00)(0.00,-1.00)) t=(165.00,210.00)}]
+      RenderSVGContainer {g} at (168,155) size 205x72 [transform={m=((1.00,0.00)(-0.00,-1.00)) t=(165.00,210.00)}]
         RenderSVGContainer {g} at (168,155) size 205x72 [transform={m=((0.03,0.00)(0.00,0.03)) t=(0.00,0.00)}]
           RenderPath {path} at (168,166) size 37x45 [fill={[type=SOLID] [color=#000000]}] [data="M1250.00,-30.00 C1188.67,-30.00,1135.33,48.67,1090.00,206.00 C1072.67,266.00,1051.00,371.00,1025.00,521.00 C957.00,511.67,868.00,495.00,758.00,471.00 L492.00,416.00 C458.67,328.67,401.67,201.00,321.00,33.00 C299.67,-4.33,270.67,-23.00,234.00,-23.00 C207.33,-23.00,183.67,-13.33,163.00,6.00 C142.33,25.33,131.67,49.33,131.00,78.00 C131.00,110.00,181.33,231.67,282.00,443.00 C270.67,460.33,265.00,480.33,265.00,503.00 C265.00,557.00,297.67,591.67,363.00,607.00 C439.00,749.67,535.00,913.67,651.00,1099.00 C809.00,1351.67,907.33,1478.00,946.00,1478.00 C998.67,1478.00,1034.67,1441.33,1054.00,1368.00 L1117.00,1032.00 L1266.00,337.00 L1323.00,179.00 C1342.33,125.00,1352.00,89.00,1352.00,71.00 C1352.00,42.33,1341.67,18.33,1321.00,-1.00 C1300.33,-20.33,1276.67,-30.00,1250.00,-30.00 Z M897.00,1113.00 L611.00,652.00 C691.67,672.67,814.00,697.67,978.00,727.00 L897.00,1113.00 Z"]
           RenderPath {path} at (208,179) size 31x48 [transform={m=((1.00,0.00)(0.00,1.00)) t=(1498.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M1011.00,892.00 L665.00,144.00 C579.67,-38.00,514.33,-190.33,469.00,-313.00 L403.00,-507.00 C385.67,-555.00,355.67,-579.00,313.00,-579.00 C285.00,-579.00,261.00,-570.00,241.00,-552.00 C221.00,-534.00,210.67,-511.00,210.00,-483.00 C210.00,-416.33,282.00,-223.33,426.00,96.00 L68.00,785.00 L23.00,858.00 C5.00,888.67,-4.00,914.33,-4.00,935.00 C-4.00,962.33,6.33,986.33,27.00,1007.00 C47.67,1027.67,71.33,1038.00,98.00,1038.00 C128.67,1038.00,152.33,1026.33,169.00,1003.00 C282.33,845.67,404.00,621.67,534.00,331.00 L682.00,676.00 C735.33,795.33,786.67,898.00,836.00,984.00 C857.33,1021.33,885.33,1040.00,920.00,1040.00 C947.33,1040.00,971.33,1030.33,992.00,1011.00 C1012.67,991.67,1023.33,968.67,1024.00,942.00 C1024.00,927.33,1019.67,910.67,1011.00,892.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt
index a315fa1..8539e17 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt
@@ -11,7 +11,7 @@ layer at (0,0) size 480x360
         RenderSVGText {text} at (31,130) size 105x22 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,-17) size 105x22
             chunk 1 text run 1 at (31.00,130.00) startOffset 0 endOffset 13 width 105.00: "Placed Glyphs"
-        RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((1.00,0.00)(0.00,-1.00)) t=(165.00,140.00)}]
+        RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((1.00,0.00)(-0.00,-1.00)) t=(165.00,140.00)}]
           RenderPath {line} at (165,139) size 210x2 [stroke={[type=SOLID] [color=#888888]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L210.00,0.00"]
           RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((0.03,0.00)(0.00,0.03)) t=(0.00,0.00)}]
             RenderPath {line} at (164,81) size 2x162 [stroke={[type=SOLID] [color=#888888] [stroke width=50.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,-3500.00 L0.00,2000.00"]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt
index fb76daf..dbaea42 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt
@@ -11,7 +11,7 @@ layer at (0,0) size 480x360
         RenderSVGText {text} at (31,130) size 105x22 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,-17) size 105x22
             chunk 1 text run 1 at (31.00,130.00) startOffset 0 endOffset 13 width 105.00: "Placed Glyphs"
-        RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((1.00,0.00)(0.00,-1.00)) t=(165.00,140.00)}]
+        RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((1.00,0.00)(-0.00,-1.00)) t=(165.00,140.00)}]
           RenderPath {line} at (165,139) size 210x2 [stroke={[type=SOLID] [color=#888888]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L210.00,0.00"]
           RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((0.03,0.00)(0.00,0.03)) t=(0.00,0.00)}]
             RenderPath {line} at (164,81) size 2x162 [stroke={[type=SOLID] [color=#888888] [stroke width=50.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,-3500.00 L0.00,2000.00"]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt
index 38ddaa2..3613f81 100644
--- a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt
+++ b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt
@@ -12,7 +12,7 @@ layer at (0,0) size 480x360
         RenderSVGText {text} at (30,130) size 105x22 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,-17) size 105x22
             chunk 1 text run 1 at (30.00,130.00) startOffset 0 endOffset 13 width 105.00: "Placed Glyphs"
-        RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((1.00,0.00)(0.00,-1.00)) t=(165.00,140.00)}]
+        RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((1.00,0.00)(-0.00,-1.00)) t=(165.00,140.00)}]
           RenderPath {line} at (165,139) size 210x2 [stroke={[type=SOLID] [color=#888888]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00 L210.00,0.00"]
           RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((0.03,0.00)(0.00,0.03)) t=(0.00,0.00)}]
             RenderPath {line} at (164,81) size 2x162 [stroke={[type=SOLID] [color=#888888] [stroke width=50.00]}] [fill={[type=SOLID] [color=#000000]}] [data="M0.00,-3500.00 L0.00,2000.00"]
diff --git a/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt b/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt
index b8454c6..17fd944 100644
--- a/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-3-expected.txt
@@ -10,4 +10,4 @@ layer at (0,0) size 800x600
       RenderSVGContainer {g} at (0,0) size 0x0
     RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-50.00)}]
       RenderSVGContainer {g} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(10.00,10.00)}]
-        RenderSVGContainer {g} at (462,119) size 1x1 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(260.00,-40.00)}]
+        RenderSVGContainer {g} at (451,115) size 2x2 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-35.86)}]
diff --git a/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-4-expected.txt b/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-4-expected.txt
index 5341187..ef166a0 100644
--- a/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-4-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/use-on-disallowed-foreign-object-4-expected.txt
@@ -14,6 +14,6 @@ layer at (0,0) size 800x600
           RenderSVGContainer {g} at (0,0) size 0x0
     RenderSVGContainer {use} at (0,0) size 0x0 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-50.00)}]
       RenderSVGContainer {g} at (0,0) size 0x0 [transform={m=((1.00,0.00)(0.00,1.00)) t=(10.00,10.00)}]
-        RenderSVGContainer {g} at (462,119) size 1x1 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(260.00,-40.00)}]
-          RenderSVGContainer {g} at (462,119) size 1x1
-            RenderSVGContainer {g} at (462,119) size 1x1
+        RenderSVGContainer {g} at (451,115) size 2x2 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(250.00,-35.86)}]
+          RenderSVGContainer {g} at (451,115) size 2x2
+            RenderSVGContainer {g} at (451,115) size 2x2
diff --git a/LayoutTests/svg/dom/SVGMatrix-interface-expected.txt b/LayoutTests/svg/dom/SVGMatrix-interface-expected.txt
index a4e75bd..c546a18 100644
--- a/LayoutTests/svg/dom/SVGMatrix-interface-expected.txt
+++ b/LayoutTests/svg/dom/SVGMatrix-interface-expected.txt
@@ -80,7 +80,7 @@ PASS parseFloat(m.f) is 0
 
 Test flipX()
 PASS m4.a is -5
-PASS m4.b is 0
+PASS Math.abs(m4.b) is 0
 PASS m4.c is 0
 PASS m4.d is 5
 PASS m4.e is 100
@@ -97,7 +97,7 @@ PASS parseFloat(m3.f) is 50
 Test flipY()
 PASS m4.a is 5
 PASS m4.b is 0
-PASS m4.c is 0
+PASS Math.abs(m4.c) is 0
 PASS m4.d is -5
 PASS m4.e is 100
 PASS m4.f is 50
diff --git a/LayoutTests/svg/dom/SVGMatrix-interface.xhtml b/LayoutTests/svg/dom/SVGMatrix-interface.xhtml
index fbeea79..a2a4f58 100644
--- a/LayoutTests/svg/dom/SVGMatrix-interface.xhtml
+++ b/LayoutTests/svg/dom/SVGMatrix-interface.xhtml
@@ -115,7 +115,7 @@ debug("");
 debug("Test flipX()");
 m4 = m3.flipX();
 shouldBe('m4.a', '-5');
-shouldBe('m4.b', '0');
+shouldBe('Math.abs(m4.b)', '0');
 shouldBe('m4.c', '0');
 shouldBe('m4.d', '5');
 shouldBe('m4.e', '100');
@@ -135,7 +135,7 @@ debug("Test flipY()");
 m4 = m3.flipY();
 shouldBe('m4.a', '5');
 shouldBe('m4.b', '0');
-shouldBe('m4.c', '0');
+shouldBe('Math.abs(m4.c)', '0');
 shouldBe('m4.d', '-5');
 shouldBe('m4.e', '100');
 shouldBe('m4.f', '50');
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index de955e7..a5f31c9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,338 @@
+2010-02-08  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Add back an AffineTransform class for use by SVG
+        https://bugs.webkit.org/show_bug.cgi?id=33750
+
+        This adds back AffineTransform. This saves additional 4% memory consumption
+        on the 50k rects stress test: https://bugs.webkit.org/attachment.cgi?id=46721
+        It also makes it possible to optimize the calculations internally of
+        AffineTransform to the needs of 2D transformations (the second benefit for SVG,
+        which uses transformations relative often at the moment.
+        Everything that is 2D related (like images, patterns, gradients, fonts), uses
+        AffineTransform now.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSSVGMatrixCustom.cpp:
+        (WebCore::JSSVGMatrix::multiply):
+        (WebCore::JSSVGMatrix::inverse):
+        (WebCore::JSSVGMatrix::rotateFromVector):
+        * bindings/js/JSSVGPODTypeWrapper.h:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        * bindings/scripts/CodeGeneratorObjC.pm:
+        * bindings/scripts/CodeGeneratorV8.pm:
+        * bindings/v8/V8Index.h:
+        * bindings/v8/custom/V8SVGMatrixCustom.cpp:
+        (WebCore::V8SVGMatrix::multiplyCallback):
+        (WebCore::V8SVGMatrix::inverseCallback):
+        (WebCore::V8SVGMatrix::rotateFromVectorCallback):
+        * html/HTMLCanvasElement.cpp: Changed to AffineTransform now
+        (WebCore::HTMLCanvasElement::baseTransform):
+        * html/HTMLCanvasElement.h:
+        * platform/graphics/FloatPoint.cpp:
+        (WebCore::FloatPoint::matrixTransform):
+        * platform/graphics/FloatPoint.h:
+        * platform/graphics/GeneratedImage.cpp:
+        (WebCore::GeneratedImage::drawPattern):
+        * platform/graphics/GeneratedImage.h:
+        * platform/graphics/Gradient.cpp:
+        (WebCore::Gradient::setGradientSpaceTransform):
+        (WebCore::Gradient::setPlatformGradientSpaceTransform):
+        * platform/graphics/Gradient.h:
+        (WebCore::Gradient::gradientSpaceTransform):
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/Image.cpp:
+        (WebCore::Image::drawTiled):
+        * platform/graphics/Image.h:
+        * platform/graphics/ImageBuffer.h:
+        (WebCore::ImageBuffer::baseTransform):
+        * platform/graphics/Path.h:
+        * platform/graphics/Pattern.cpp:
+        (WebCore::Pattern::setPatternSpaceTransform):
+        * platform/graphics/Pattern.h:
+        (WebCore::Pattern::create):
+        (WebCore::Pattern::tileImage):
+        * platform/graphics/cairo/FontCairo.cpp:
+        (WebCore::Font::drawGlyphs):
+        * platform/graphics/cairo/GraphicsContextCairo.cpp:
+        (WebCore::setPlatformFill):
+        (WebCore::setPlatformStroke):
+        (WebCore::GraphicsContext::getCTM):
+        * platform/graphics/cairo/ImageCairo.cpp:
+        (WebCore::Image::drawPattern):
+        * platform/graphics/cairo/PathCairo.cpp:
+        * platform/graphics/cairo/PatternCairo.cpp:
+        (WebCore::Pattern::createPlatformPattern):
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::getCTM):
+        * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
+        (WebCore::GraphicsContextPlatformPrivate::concatCTM):
+        * platform/graphics/cg/ImageCG.cpp:
+        (WebCore::Image::drawPattern):
+        * platform/graphics/cg/PathCG.cpp:
+        * platform/graphics/cg/PatternCG.cpp:
+        (WebCore::Pattern::createPlatformPattern):
+        * platform/graphics/haiku/GraphicsContextHaiku.cpp:
+        (WebCore::GraphicsContext::getCTM):
+        * platform/graphics/haiku/ImageHaiku.cpp:
+        (WebCore::Image::drawPattern):
+        * platform/graphics/haiku/PathHaiku.cpp:
+        * platform/graphics/qt/FontQt.cpp:
+        (WebCore::Font::drawComplexText):
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::getCTM):
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::strokePath):
+        (WebCore::GraphicsContext::fillRect):
+        * platform/graphics/qt/ImageQt.cpp:
+        (WebCore::Image::drawPattern):
+        * platform/graphics/qt/PathQt.cpp:
+        * platform/graphics/qt/PatternQt.cpp:
+        (WebCore::Pattern::createPlatformPattern):
+        * platform/graphics/skia/GradientSkia.cpp:
+        (WebCore::Gradient::setPlatformGradientSpaceTransform):
+        * platform/graphics/skia/GraphicsContextSkia.cpp:
+        (WebCore::GraphicsContext::getCTM):
+        * platform/graphics/skia/ImageSkia.cpp:
+        (WebCore::Image::drawPattern):
+        * platform/graphics/skia/PathSkia.cpp:
+        * platform/graphics/skia/PatternSkia.cpp:
+        (WebCore::Pattern::platformPattern):
+        * platform/graphics/skia/SkiaFontWin.cpp:
+        (WebCore::windowsCanHandleTextDrawing):
+        * platform/graphics/transforms/AffineTransform.cpp:
+        (WebCore::AffineTransform::makeIdentity): needed by some parts of WebCore
+        (WebCore::AffineTransform::scale): Didn't scale the complete matrix
+        (WebCore::AffineTransform::translate): Didn't respect other transformations
+        (WebCore::AffineTransform::shear): direct calculation, no extra multiply of matrices
+        (WebCore::AffineTransform::map):
+        (WebCore::AffineTransform::mapPoint):
+        (WebCore::AffineTransform::mapRect):
+        * platform/graphics/transforms/AffineTransform.h:
+        (WebCore::AffineTransform::isIdentityOrTranslation):
+        * platform/graphics/transforms/TransformationMatrix.cpp:
+        (WebCore::TransformationMatrix::toAffineTransform):
+        * platform/graphics/transforms/TransformationMatrix.h:
+        * platform/graphics/win/FontCGWin.cpp:
+        (WebCore::drawGDIGlyphs):
+        * platform/graphics/win/GraphicsContextCGWin.cpp:
+        * platform/graphics/win/GraphicsContextCairoWin.cpp:
+        * platform/graphics/win/GraphicsContextWin.cpp:
+        (WebCore::GraphicsContextPlatformPrivate::concatCTM):
+        * platform/graphics/wince/FontWince.cpp:
+        * platform/graphics/wince/GraphicsContextWince.cpp:
+        (WebCore::GraphicsContextPlatformPrivate::concatCTM):
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::strokePath):
+        (WebCore::GraphicsContext::getCTM):
+        (WebCore::GraphicsContext::drawBitmapPattern):
+        * platform/graphics/wince/ImageBufferWince.cpp:
+        (WebCore::):
+        (WebCore::BufferedImage::drawPattern):
+        * platform/graphics/wince/PathWince.cpp:
+        (WebCore::Path::transform):
+        * platform/graphics/wince/PlatformPathWince.cpp:
+        (WebCore::drawPolygons):
+        (WebCore::PathPolygon::transform):
+        (WebCore::PlatformPathElement::transform):
+        (WebCore::PlatformPath::strokePath):
+        (WebCore::PlatformPath::fillPath):
+        (WebCore::PlatformPath::transform):
+        * platform/graphics/wince/PlatformPathWince.h:
+        (WebCore::):
+        * platform/graphics/wx/GraphicsContextWx.cpp:
+        (WebCore::GraphicsContext::getCTM):
+        * platform/graphics/wx/ImageWx.cpp:
+        (WebCore::BitmapImage::drawPattern):
+        (WebCore::Image::drawPattern):
+        * platform/graphics/wx/PathWx.cpp:
+        * platform/gtk/RenderThemeGtk.cpp:
+        (WebCore::paintMozillaGtkWidget):
+        * plugins/win/PluginViewWin.cpp:
+        (WebCore::PluginView::paintWindowedPluginIntoContext):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::localTransform):
+        * rendering/RenderBox.h:
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelScaleData::RenderBoxModelScaleData):
+        (WebCore::RenderBoxModelScaleData::transform):
+        (WebCore::RenderBoxModelScaleData::setTransform):
+        (WebCore::RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality):
+        (WebCore::RenderBoxModelObject::paintBoxShadow):
+        * rendering/RenderForeignObject.cpp:
+        (WebCore::RenderForeignObject::translationForAttributes):
+        (WebCore::RenderForeignObject::localToParentTransform):
+        * rendering/RenderForeignObject.h:
+        (WebCore::RenderForeignObject::localTransform):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::paintLayer):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::localTransform):
+        (WebCore::RenderObject::localToParentTransform):
+        (WebCore::RenderObject::absoluteTransform):
+        * rendering/RenderObject.h:
+        * rendering/RenderPath.cpp:
+        (WebCore::RenderPath::localToParentTransform):
+        (WebCore::RenderPath::localTransform):
+        * rendering/RenderPath.h:
+        * rendering/RenderSVGHiddenContainer.h:
+        (WebCore::RenderSVGHiddenContainer::absoluteTransform):
+        * rendering/RenderSVGImage.h:
+        (WebCore::RenderSVGImage::localToParentTransform):
+        (WebCore::RenderSVGImage::localTransform):
+        * rendering/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::localToBorderBoxTransform):
+        (WebCore::RenderSVGRoot::localToRepaintContainerTransform):
+        (WebCore::RenderSVGRoot::localToParentTransform):
+        (WebCore::RenderSVGRoot::absoluteTransform):
+        (WebCore::RenderSVGRoot::localTransform):
+        * rendering/RenderSVGRoot.h:
+        * rendering/RenderSVGText.h:
+        (WebCore::RenderSVGText::localToParentTransform):
+        (WebCore::RenderSVGText::localTransform):
+        * rendering/RenderSVGTransformableContainer.cpp:
+        (WebCore::RenderSVGTransformableContainer::localToParentTransform):
+        (WebCore::RenderSVGTransformableContainer::localTransform):
+        (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
+        * rendering/RenderSVGTransformableContainer.h:
+        * rendering/RenderSVGViewportContainer.cpp:
+        (WebCore::RenderSVGViewportContainer::markerBoundaries):
+        (WebCore::RenderSVGViewportContainer::markerContentTransformation):
+        (WebCore::RenderSVGViewportContainer::viewportTransform):
+        (WebCore::RenderSVGViewportContainer::localToParentTransform):
+        (WebCore::RenderSVGViewportContainer::absoluteTransform):
+        * rendering/RenderSVGViewportContainer.h:
+        * rendering/SVGCharacterLayoutInfo.cpp:
+        (WebCore::SVGChar::characterTransform):
+        * rendering/SVGCharacterLayoutInfo.h:
+        (WebCore::SVGTextChunkWalker::operator()):
+        * rendering/SVGInlineTextBox.cpp:
+        (WebCore::SVGInlineTextBox::calculateGlyphBoundaries):
+        (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
+        (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
+        (WebCore::SVGInlineTextBox::paintCharacters):
+        (WebCore::SVGInlineTextBox::paintDecoration):
+        * rendering/SVGMarkerLayoutInfo.h:
+        (WebCore::MarkerLayout::MarkerLayout):
+        * rendering/SVGRenderSupport.cpp:
+        (WebCore::applyTransformToPaintInfo):
+        * rendering/SVGRenderSupport.h:
+        * rendering/SVGRenderTreeAsText.cpp:
+        (WebCore::operator<<):
+        * rendering/SVGRenderTreeAsText.h:
+        * rendering/SVGRootInlineBox.cpp:
+        (WebCore::SVGRootInlineBoxPaintWalker::chunkPortionCallback):
+        (WebCore::applyTextLengthCorrectionToTextChunk):
+        (WebCore::SVGRootInlineBox::buildLayoutInformation):
+        * rendering/TransformState.cpp:
+        (WebCore::TransformState::applyTransform):
+        * rendering/TransformState.h:
+        * svg/GradientAttributes.h:
+        (WebCore::GradientAttributes::gradientTransform):
+        (WebCore::GradientAttributes::setGradientTransform):
+        * svg/PatternAttributes.h:
+        (WebCore::PatternAttributes::patternTransform):
+        (WebCore::PatternAttributes::setPatternTransform):
+        * svg/SVGAnimateMotionElement.cpp:
+        (WebCore::SVGAnimateMotionElement::resetToBaseValue):
+        (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
+        (WebCore::SVGAnimateMotionElement::applyResultsToTarget):
+        * svg/SVGAnimateMotionElement.h:
+        * svg/SVGAnimateTransformElement.cpp:
+        * svg/SVGAnimateTransformElement.h:
+        * svg/SVGElement.h:
+        (WebCore::SVGElement::supplementalTransform):
+        * svg/SVGFitToViewBox.cpp:
+        (WebCore::SVGFitToViewBox::viewBoxToViewTransform):
+        * svg/SVGFitToViewBox.h:
+        * svg/SVGLocatable.cpp:
+        (WebCore::SVGLocatable::getCTM):
+        (WebCore::SVGLocatable::getScreenCTM):
+        (WebCore::SVGLocatable::getTransformToElement):
+        * svg/SVGLocatable.h:
+        * svg/SVGMarkerElement.cpp:
+        (WebCore::SVGMarkerElement::viewBoxToViewTransform):
+        * svg/SVGMarkerElement.h:
+        * svg/SVGMaskElement.cpp:
+        (WebCore::SVGMaskElement::drawMaskerContent):
+        * svg/SVGMatrix.idl:
+        * svg/SVGPatternElement.cpp:
+        (WebCore::SVGPatternElement::buildPattern):
+        * svg/SVGPreserveAspectRatio.cpp:
+        (WebCore::SVGPreserveAspectRatio::getCTM):
+        * svg/SVGPreserveAspectRatio.h:
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::viewport):
+        (WebCore::SVGSVGElement::createSVGMatrix):
+        (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
+        (WebCore::SVGSVGElement::getCTM):
+        (WebCore::SVGSVGElement::getScreenCTM):
+        (WebCore::SVGSVGElement::viewBoxToViewTransform):
+        * svg/SVGSVGElement.h:
+        * svg/SVGStyledLocatableElement.cpp:
+        (WebCore::SVGStyledLocatableElement::getCTM):
+        (WebCore::SVGStyledLocatableElement::getScreenCTM):
+        * svg/SVGStyledLocatableElement.h:
+        * svg/SVGStyledTransformableElement.cpp:
+        (WebCore::SVGStyledTransformableElement::getCTM):
+        (WebCore::SVGStyledTransformableElement::getScreenCTM):
+        (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
+        (WebCore::SVGStyledTransformableElement::supplementalTransform):
+        * svg/SVGStyledTransformableElement.h:
+        (WebCore::SVGStyledTransformableElement::isStyledTransformable):
+        (WebCore::SVGStyledTransformableElement::toPathData):
+        * svg/SVGTextContentElement.cpp:
+        (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
+        * svg/SVGTextElement.cpp:
+        (WebCore::SVGTextElement::getScreenCTM):
+        (WebCore::SVGTextElement::getCTM):
+        (WebCore::SVGTextElement::animatedLocalTransform):
+        (WebCore::SVGTextElement::supplementalTransform):
+        * svg/SVGTextElement.h:
+        * svg/SVGTextPathElement.cpp:
+        * svg/SVGTransform.cpp:
+        (SVGTransform::SVGTransform):
+        (SVGTransform::matrix):
+        (SVGTransform::setMatrix):
+        * svg/SVGTransform.h:
+        * svg/SVGTransformDistance.cpp:
+        (WebCore::SVGTransformDistance::SVGTransformDistance):
+        (WebCore::SVGTransformDistance::scaledDistance):
+        (WebCore::SVGTransformDistance::isZero):
+        * svg/SVGTransformDistance.h:
+        * svg/SVGTransformList.cpp:
+        (SVGTransformList::createSVGTransformFromMatrix):
+        (SVGTransformList::concatenate):
+        (SVGTransformList::valueAsString):
+        * svg/SVGTransformList.h:
+        * svg/SVGTransformable.cpp:
+        (WebCore::SVGTransformable::getCTM):
+        (WebCore::SVGTransformable::getScreenCTM):
+        (WebCore::SVGTransformable::parseTransformValue):
+        * svg/SVGTransformable.h:
+        (WebCore::SVGTransformable::):
+        * svg/graphics/SVGPaintServerGradient.cpp:
+        (WebCore::SVGPaintServerGradient::gradientTransform):
+        (WebCore::SVGPaintServerGradient::setGradientTransform):
+        (WebCore::clipToTextMask):
+        (WebCore::SVGPaintServerGradient::setup):
+        * svg/graphics/SVGPaintServerGradient.h:
+        * svg/graphics/SVGPaintServerPattern.cpp:
+        (WebCore::SVGPaintServerPattern::patternTransform):
+        (WebCore::SVGPaintServerPattern::setPatternTransform):
+        (WebCore::SVGPaintServerPattern::setup):
+        * svg/graphics/SVGPaintServerPattern.h:
+        * svg/graphics/SVGResourceClipper.cpp:
+        (WebCore::SVGResourceClipper::applyClip):
+        * svg/graphics/SVGResourceMarker.cpp:
+        (WebCore::SVGResourceMarker::markerTransformation):
+        (WebCore::SVGResourceMarker::draw):
+        * svg/graphics/SVGResourceMarker.h:
+        * svg/graphics/filters/SVGFEImage.cpp:
+        * svg/graphics/filters/SVGFETile.cpp:
+        (WebCore::FETile::apply):
+
 2010-02-08  Stephen White  <senorblanco at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 208f2b1..b1fb758 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -1314,7 +1314,7 @@
 		84A81F410FC7E02700955300 /* SourceGraphic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84A81F3F0FC7E02700955300 /* SourceGraphic.cpp */; };
 		84A81F420FC7E02700955300 /* SourceGraphic.h in Headers */ = {isa = PBXBuildFile; fileRef = 84A81F400FC7E02700955300 /* SourceGraphic.h */; };
 		84D0C4041115F1D40018AA34 /* AffineTransform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84D0C4031115F1D40018AA34 /* AffineTransform.cpp */; };
-		84D0C4061115F1EA0018AA34 /* AffineTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D0C4051115F1EA0018AA34 /* AffineTransform.h */; };
+		84D0C4061115F1EA0018AA34 /* AffineTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D0C4051115F1EA0018AA34 /* AffineTransform.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		85004D940ACEEAEF00C438F6 /* DOMSVGDefsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85004D880ACEEAEF00C438F6 /* DOMSVGDefsElement.h */; };
 		85004D950ACEEAEF00C438F6 /* DOMSVGDefsElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85004D890ACEEAEF00C438F6 /* DOMSVGDefsElement.mm */; };
 		85004D960ACEEAEF00C438F6 /* DOMSVGDescElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 85004D8A0ACEEAEF00C438F6 /* DOMSVGDescElement.h */; };
diff --git a/WebCore/bindings/js/JSSVGMatrixCustom.cpp b/WebCore/bindings/js/JSSVGMatrixCustom.cpp
index d2d3d6f..59e3f03 100644
--- a/WebCore/bindings/js/JSSVGMatrixCustom.cpp
+++ b/WebCore/bindings/js/JSSVGMatrixCustom.cpp
@@ -23,7 +23,7 @@
 #if ENABLE(SVG)
 #include "JSSVGMatrix.h"
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "SVGException.h"
 #include <runtime/Error.h>
 
@@ -41,19 +41,19 @@ JSValue JSSVGMatrix::multiply(ExecState* exec, const ArgList& args)
 
     JSSVGMatrix* matrixObj = static_cast<JSSVGMatrix*>(asObject(args.at(0)));
 
-    TransformationMatrix m1(*impl());
-    TransformationMatrix m2(*(matrixObj->impl()));
+    AffineTransform m1(*impl());
+    AffineTransform m2(*(matrixObj->impl()));
 
     SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
-    return toJS(exec, globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(m1.multLeft(m2)).get(), context);
+    return toJS(exec, globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(m1.multLeft(m2)).get(), context);
 }
 
 JSValue JSSVGMatrix::inverse(ExecState* exec, const ArgList&)
 {
-    TransformationMatrix imp(*impl());
+    AffineTransform imp(*impl());
 
     SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
-    JSValue result = toJS(exec, globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.inverse()).get(), context);
+    JSValue result = toJS(exec, globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp.inverse()).get(), context);
 
     if (!imp.isInvertible())
         setDOMException(exec, SVGException::SVG_MATRIX_NOT_INVERTABLE);
@@ -63,13 +63,13 @@ JSValue JSSVGMatrix::inverse(ExecState* exec, const ArgList&)
 
 JSValue JSSVGMatrix::rotateFromVector(ExecState* exec, const ArgList& args)
 {
-    TransformationMatrix imp(*impl());
+    AffineTransform imp(*impl());
  
     float x = args.at(0).toFloat(exec);
     float y = args.at(1).toFloat(exec);
 
     SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
-    JSValue result = toJS(exec, globalObject(), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.rotateFromVector(x, y)).get(), context);
+    JSValue result = toJS(exec, globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp.rotateFromVector(x, y)).get(), context);
 
     if (x == 0.0 || y == 0.0)
         setDOMException(exec, SVGException::SVG_INVALID_VALUE_ERR);
diff --git a/WebCore/bindings/js/JSSVGPODTypeWrapper.h b/WebCore/bindings/js/JSSVGPODTypeWrapper.h
index 7c04f22..2efc60e 100644
--- a/WebCore/bindings/js/JSSVGPODTypeWrapper.h
+++ b/WebCore/bindings/js/JSSVGPODTypeWrapper.h
@@ -46,13 +46,13 @@ public:
 };
 
 // This file contains JS wrapper objects for SVG datatypes, that are passed around by value
-// in WebCore/svg (aka. 'POD types'). For instance SVGMatrix is mapped to TransformationMatrix, and
+// in WebCore/svg (aka. 'POD types'). For instance SVGMatrix is mapped to AffineTransform, and
 // passed around as const reference. SVG DOM demands these objects to be "live", changes to any
 // of the writable attributes of SVGMatrix need to be reflected in the object which exposed the
 // SVGMatrix object (i.e. 'someElement.transform.matrix.a = 50.0', in that case 'SVGTransform').
-// The SVGTransform class stores its "TransformationMatrix m_matrix" object on the stack. If it would
+// The SVGTransform class stores its "AffineTransform m_matrix" object on the stack. If it would
 // be stored as pointer we could just build an auto-generated JSSVG* wrapper object around it
-// and all changes to that object would automatically affect the TransformationMatrix* object stored
+// and all changes to that object would automatically affect the AffineTransform* object stored
 // in the SVGTransform object. For the sake of efficiency and memory we don't pass around any
 // primitive values as pointers, so a custom JS wrapper object is needed for all SVG types, that
 // are internally represented by POD types (SVGRect <-> FloatRect, SVGPoint <-> FloatPoint, ...).
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index cb60b3c..94fc2b8 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -1836,7 +1836,7 @@ my %nativeType = (
     "NodeFilter" => "RefPtr<NodeFilter>",
     "SVGAngle" => "SVGAngle",
     "SVGLength" => "SVGLength",
-    "SVGMatrix" => "TransformationMatrix",
+    "SVGMatrix" => "AffineTransform",
     "SVGNumber" => "float",
     "SVGPaintType" => "SVGPaint::SVGPaintType",
     "SVGPreserveAspectRatio" => "SVGPreserveAspectRatio",
diff --git a/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
index 698b4f5..dcb22a7 100644
--- a/WebCore/bindings/scripts/CodeGeneratorObjC.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
@@ -578,7 +578,7 @@ sub AddIncludesForType
     }
 
     if ($type eq "SVGMatrix") {
-        $implIncludes{"TransformationMatrix.h"} = 1;
+        $implIncludes{"AffineTransform.h"} = 1;
         $implIncludes{"DOMSVGMatrixInternal.h"} = 1;
         $implIncludes{"SVGException.h"} = 1;
         return;
@@ -1426,8 +1426,8 @@ sub GenerateImplementation
             }
 
             # FIXME! We need [Custom] support for ObjC, to move these hacks into DOMSVGLength/MatrixCustom.mm
-            my $svgMatrixRotateFromVector = ($podType and $podType eq "TransformationMatrix" and $functionName eq "rotateFromVector");
-            my $svgMatrixInverse = ($podType and $podType eq "TransformationMatrix" and $functionName eq "inverse");
+            my $svgMatrixRotateFromVector = ($podType and $podType eq "AffineTransform" and $functionName eq "rotateFromVector");
+            my $svgMatrixInverse = ($podType and $podType eq "AffineTransform" and $functionName eq "inverse");
             my $svgLengthConvertToSpecifiedUnits = ($podType and $podType eq "SVGLength" and $functionName eq "convertToSpecifiedUnits");
 
             push(@parameterNames, "ec") if $raisesExceptions and !($svgMatrixRotateFromVector || $svgMatrixInverse);
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index ee8a9ee..c9868c3 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -2105,7 +2105,7 @@ sub GetNativeTypeForConversions
     my $type = shift;
     return "FloatRect" if $type eq "SVGRect";
     return "FloatPoint" if $type eq "SVGPoint";
-    return "TransformationMatrix" if $type eq "SVGMatrix";
+    return "AffineTransform" if $type eq "SVGMatrix";
     return "float" if $type eq "SVGNumber";
     return $type;
 }
@@ -2359,7 +2359,7 @@ sub GetNativeType
     return "Range::CompareHow" if $type eq "CompareHow";
     return "FloatRect" if $type eq "SVGRect";
     return "FloatPoint" if $type eq "SVGPoint";
-    return "TransformationMatrix" if $type eq "SVGMatrix";
+    return "AffineTransform" if $type eq "SVGMatrix";
     return "SVGTransform" if $type eq "SVGTransform";
     return "SVGLength" if $type eq "SVGLength";
     return "SVGAngle" if $type eq "SVGAngle";
diff --git a/WebCore/bindings/v8/V8Index.h b/WebCore/bindings/v8/V8Index.h
index 72d06b9..950b341 100644
--- a/WebCore/bindings/v8/V8Index.h
+++ b/WebCore/bindings/v8/V8Index.h
@@ -606,7 +606,7 @@ static const int v8DefaultWrapperInternalFieldCount = 2;
     V(SVGLENGTH, SVGLength)                                             \
     V(SVGPRESERVEASPECTRATIO, SVGPreserveAspectRatio)                   \
     V(SVGTRANSFORM, SVGTransform)                                       \
-    V(SVGMATRIX, TransformationMatrix)                                  \
+    V(SVGMATRIX, AffineTransform)                                       \
     V(SVGNUMBER, float)                                                 \
     V(SVGPOINT, FloatPoint)                                             \
     V(SVGRECT, FloatRect)
diff --git a/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp b/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp
index 0a75c9f..f310238 100644
--- a/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp
@@ -31,7 +31,7 @@
 #include <config.h>
 
 #if ENABLE(SVG)
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 
 #include "SVGException.h"
 #include "V8Binding.h"
@@ -50,19 +50,19 @@ v8::Handle<v8::Value> V8SVGMatrix::multiplyCallback(const v8::Arguments& args)
     if (!V8SVGMatrix::HasInstance(args[0]))
         return throwError("secondMatrix argument was not a SVGMatrix");
 
-    TransformationMatrix m1 = *V8SVGPODTypeWrapper<TransformationMatrix>::toNative(args.Holder());
-    TransformationMatrix m2 = *V8SVGPODTypeWrapper<TransformationMatrix>::toNative(v8::Handle<v8::Object>::Cast(args[0]));
+    AffineTransform m1 = *V8SVGPODTypeWrapper<AffineTransform>::toNative(args.Holder());
+    AffineTransform m2 = *V8SVGPODTypeWrapper<AffineTransform>::toNative(v8::Handle<v8::Object>::Cast(args[0]));
 
-    RefPtr<V8SVGStaticPODTypeWrapper<TransformationMatrix> > wrapper = V8SVGStaticPODTypeWrapper<TransformationMatrix>::create(m1.multLeft(m2));
+    RefPtr<V8SVGStaticPODTypeWrapper<AffineTransform> > wrapper = V8SVGStaticPODTypeWrapper<AffineTransform>::create(m1.multLeft(m2));
     return toV8(wrapper.get());
 }
 
 v8::Handle<v8::Value> V8SVGMatrix::inverseCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.SVGMatrix.inverse()");
-    TransformationMatrix matrix = *V8SVGPODTypeWrapper<TransformationMatrix>::toNative(args.Holder());
+    AffineTransform matrix = *V8SVGPODTypeWrapper<AffineTransform>::toNative(args.Holder());
     ExceptionCode ec = 0;
-    TransformationMatrix result = matrix.inverse();
+    AffineTransform result = matrix.inverse();
 
     if (!matrix.isInvertible())
         ec = SVGException::SVG_MATRIX_NOT_INVERTABLE;
@@ -72,18 +72,18 @@ v8::Handle<v8::Value> V8SVGMatrix::inverseCallback(const v8::Arguments& args)
         return v8::Handle<v8::Value>();
     }
 
-    RefPtr<V8SVGStaticPODTypeWrapper<TransformationMatrix> > wrapper = V8SVGStaticPODTypeWrapper<TransformationMatrix>::create(result);
+    RefPtr<V8SVGStaticPODTypeWrapper<AffineTransform> > wrapper = V8SVGStaticPODTypeWrapper<AffineTransform>::create(result);
     return toV8(wrapper.get());
 }
 
 v8::Handle<v8::Value> V8SVGMatrix::rotateFromVectorCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.SVGMatrix.rotateFromVector()");
-    TransformationMatrix matrix = *V8SVGPODTypeWrapper<TransformationMatrix>::toNative(args.Holder());
+    AffineTransform matrix = *V8SVGPODTypeWrapper<AffineTransform>::toNative(args.Holder());
     ExceptionCode ec = 0;
     float x = toFloat(args[0]);
     float y = toFloat(args[1]);
-    TransformationMatrix result = matrix;
+    AffineTransform result = matrix;
     result.rotateFromVector(x, y);
     if (x == 0.0 || y == 0.0)
         ec = SVGException::SVG_INVALID_VALUE_ERR;
@@ -93,7 +93,7 @@ v8::Handle<v8::Value> V8SVGMatrix::rotateFromVectorCallback(const v8::Arguments&
         return v8::Handle<v8::Value>();
     }
 
-    RefPtr<V8SVGStaticPODTypeWrapper<TransformationMatrix> > wrapper = V8SVGStaticPODTypeWrapper<TransformationMatrix>::create(result);
+    RefPtr<V8SVGStaticPODTypeWrapper<AffineTransform> > wrapper = V8SVGStaticPODTypeWrapper<AffineTransform>::create(result);
     return toV8(wrapper.get());
 }
 
diff --git a/WebCore/html/HTMLCanvasElement.cpp b/WebCore/html/HTMLCanvasElement.cpp
index f55d680..adffe4a 100644
--- a/WebCore/html/HTMLCanvasElement.cpp
+++ b/WebCore/html/HTMLCanvasElement.cpp
@@ -337,12 +337,12 @@ ImageBuffer* HTMLCanvasElement::buffer() const
     return m_imageBuffer.get();
 }
     
-TransformationMatrix HTMLCanvasElement::baseTransform() const
+AffineTransform HTMLCanvasElement::baseTransform() const
 {
     ASSERT(m_createdImageBuffer);
     FloatSize unscaledSize(width(), height());
     IntSize size = convertLogicalToDevice(unscaledSize);
-    TransformationMatrix transform;
+    AffineTransform transform;
     if (size.width() && size.height())
         transform.scaleNonUniform(size.width() / unscaledSize.width(), size.height() / unscaledSize.height());
     transform.multiply(m_imageBuffer->baseTransform());
diff --git a/WebCore/html/HTMLCanvasElement.h b/WebCore/html/HTMLCanvasElement.h
index db80396..d70a7e6 100644
--- a/WebCore/html/HTMLCanvasElement.h
+++ b/WebCore/html/HTMLCanvasElement.h
@@ -27,7 +27,7 @@
 #ifndef HTMLCanvasElement_h
 #define HTMLCanvasElement_h
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "FloatRect.h"
 #include "HTMLElement.h"
 #if ENABLE(3D_CANVAS)    
@@ -100,7 +100,7 @@ public:
 
     void setObserver(CanvasObserver* observer) { m_observer = observer; }
 
-    TransformationMatrix baseTransform() const;
+    AffineTransform baseTransform() const;
 
     CanvasRenderingContext* renderingContext() const { return m_context.get(); }
 
diff --git a/WebCore/platform/graphics/FloatPoint.cpp b/WebCore/platform/graphics/FloatPoint.cpp
index 7765ba9..cf3d548 100644
--- a/WebCore/platform/graphics/FloatPoint.cpp
+++ b/WebCore/platform/graphics/FloatPoint.cpp
@@ -37,6 +37,13 @@ FloatPoint::FloatPoint(const IntPoint& p) : m_x(p.x()), m_y(p.y())
 {
 }
 
+FloatPoint FloatPoint::matrixTransform(const AffineTransform& transform) const
+{
+    double newX, newY;
+    transform.map(static_cast<double>(m_x), static_cast<double>(m_y), newX, newY);
+    return narrowPrecision(newX, newY);
+}
+
 FloatPoint FloatPoint::matrixTransform(const TransformationMatrix& transform) const
 {
     double newX, newY;
diff --git a/WebCore/platform/graphics/FloatPoint.h b/WebCore/platform/graphics/FloatPoint.h
index 6b037ff..bf568d4 100644
--- a/WebCore/platform/graphics/FloatPoint.h
+++ b/WebCore/platform/graphics/FloatPoint.h
@@ -61,6 +61,7 @@ struct SkPoint;
 
 namespace WebCore {
 
+class AffineTransform;
 class TransformationMatrix;
 class IntPoint;
 
@@ -106,6 +107,7 @@ public:
 #endif
 
     FloatPoint matrixTransform(const TransformationMatrix&) const;
+    FloatPoint matrixTransform(const AffineTransform&) const;
 
 private:
     float m_x, m_y;
diff --git a/WebCore/platform/graphics/GeneratedImage.cpp b/WebCore/platform/graphics/GeneratedImage.cpp
index 8395aff..cd0748e 100644
--- a/WebCore/platform/graphics/GeneratedImage.cpp
+++ b/WebCore/platform/graphics/GeneratedImage.cpp
@@ -47,7 +47,7 @@ void GeneratedImage::draw(GraphicsContext* context, const FloatRect& dstRect, co
     context->restore();
 }
 
-void GeneratedImage::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const TransformationMatrix& patternTransform,
+void GeneratedImage::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform,
                                  const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const FloatRect& destRect)
 {
     // Allow the generator to provide visually-equivalent tiling parameters for better performance.
diff --git a/WebCore/platform/graphics/GeneratedImage.h b/WebCore/platform/graphics/GeneratedImage.h
index a4583e3..67a3150 100644
--- a/WebCore/platform/graphics/GeneratedImage.h
+++ b/WebCore/platform/graphics/GeneratedImage.h
@@ -58,7 +58,7 @@ public:
 
 protected:
     virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
-    virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const TransformationMatrix& patternTransform,
+    virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform,
                              const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect);
     
     GeneratedImage(PassRefPtr<Generator> generator, const IntSize& size)
diff --git a/WebCore/platform/graphics/Gradient.cpp b/WebCore/platform/graphics/Gradient.cpp
index c3bad56..2d1e61d 100644
--- a/WebCore/platform/graphics/Gradient.cpp
+++ b/WebCore/platform/graphics/Gradient.cpp
@@ -189,14 +189,14 @@ void Gradient::setSpreadMethod(GradientSpreadMethod spreadMethod)
     m_spreadMethod = spreadMethod;
 }
 
-void Gradient::setGradientSpaceTransform(const TransformationMatrix& gradientSpaceTransformation)
+void Gradient::setGradientSpaceTransform(const AffineTransform& gradientSpaceTransformation)
 { 
     m_gradientSpaceTransformation = gradientSpaceTransformation;
     setPlatformGradientSpaceTransform(gradientSpaceTransformation);
 }
 
 #if !PLATFORM(SKIA)
-void Gradient::setPlatformGradientSpaceTransform(const TransformationMatrix&)
+void Gradient::setPlatformGradientSpaceTransform(const AffineTransform&)
 {
 }
 #endif
diff --git a/WebCore/platform/graphics/Gradient.h b/WebCore/platform/graphics/Gradient.h
index 2e1bf4f..42dd850 100644
--- a/WebCore/platform/graphics/Gradient.h
+++ b/WebCore/platform/graphics/Gradient.h
@@ -28,10 +28,10 @@
 #ifndef Gradient_h
 #define Gradient_h
 
+#include "AffineTransform.h"
 #include "FloatPoint.h"
 #include "Generator.h"
 #include "GraphicsTypes.h"
-#include "TransformationMatrix.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/Vector.h>
 
@@ -107,14 +107,14 @@ namespace WebCore {
         
         void setSpreadMethod(GradientSpreadMethod);
         GradientSpreadMethod spreadMethod() { return m_spreadMethod; }
-        void setGradientSpaceTransform(const TransformationMatrix& gradientSpaceTransformation);
+        void setGradientSpaceTransform(const AffineTransform& gradientSpaceTransformation);
         // Qt and CG transform the gradient at draw time
-        TransformationMatrix gradientSpaceTransform() { return m_gradientSpaceTransformation; }
+        AffineTransform gradientSpaceTransform() { return m_gradientSpaceTransformation; }
 
         virtual void fill(GraphicsContext*, const FloatRect&);
         virtual void adjustParametersForTiledDrawing(IntSize& size, FloatRect& srcRect);
 
-        void setPlatformGradientSpaceTransform(const TransformationMatrix& gradientSpaceTransformation);
+        void setPlatformGradientSpaceTransform(const AffineTransform& gradientSpaceTransformation);
 
 #if PLATFORM(CG)
         void paint(GraphicsContext*);
@@ -138,7 +138,7 @@ namespace WebCore {
         mutable bool m_stopsSorted;
         mutable int m_lastStop;
         GradientSpreadMethod m_spreadMethod;
-        TransformationMatrix m_gradientSpaceTransformation;
+        AffineTransform m_gradientSpaceTransformation;
 
         PlatformGradient m_gradient;
     };
diff --git a/WebCore/platform/graphics/GraphicsContext.h b/WebCore/platform/graphics/GraphicsContext.h
index 03c706e..a960be5 100644
--- a/WebCore/platform/graphics/GraphicsContext.h
+++ b/WebCore/platform/graphics/GraphicsContext.h
@@ -122,7 +122,6 @@ namespace WebCore {
     class Path;
     class Pattern;
     class TextRun;
-    class TransformationMatrix;
 
     // These bits can be ORed together for a total of 8 possible text drawing modes.
     const int cTextInvisible = 0;
@@ -304,10 +303,8 @@ namespace WebCore {
 
         void setURLForRect(const KURL&, const IntRect&);
 
-        void concatCTM(const TransformationMatrix&);
         void concatCTM(const AffineTransform&);
-        TransformationMatrix getCTM() const;
-        AffineTransform getAffineCTM() const;
+        AffineTransform getCTM() const;
 
 #if OS(WINCE) && !PLATFORM(QT)
         void setBitmap(PassRefPtr<SharedBitmap>);
@@ -320,7 +317,7 @@ namespace WebCore {
         void drawFocusRect(const IntRect& rect);
         void paintTextField(const IntRect& rect, unsigned state);
         void drawBitmap(SharedBitmap*, const IntRect& dstRect, const IntRect& srcRect, CompositeOperator compositeOp);
-        void drawBitmapPattern(SharedBitmap*, const FloatRect& tileRectIn, const TransformationMatrix& patternTransform, const FloatPoint& phase, CompositeOperator op, const FloatRect& destRect, const IntSize& origSourceSize);
+        void drawBitmapPattern(SharedBitmap*, const FloatRect& tileRectIn, const AffineTransform& patternTransform, const FloatPoint& phase, CompositeOperator op, const FloatRect& destRect, const IntSize& origSourceSize);
         void drawIcon(HICON icon, const IntRect& dstRect, UINT flags);
         HDC getWindowsContext(const IntRect&, bool supportAlphaBlend = false, bool mayCreateBitmap = true); // The passed in rect is used to create a bitmap for compositing inside transparency layers.
         void releaseWindowsContext(HDC, const IntRect&, bool supportAlphaBlend = false, bool mayCreateBitmap = true);    // The passed in HDC should be the one handed back by getWindowsContext.
diff --git a/WebCore/platform/graphics/Image.cpp b/WebCore/platform/graphics/Image.cpp
index 611216a..8263faa 100644
--- a/WebCore/platform/graphics/Image.cpp
+++ b/WebCore/platform/graphics/Image.cpp
@@ -27,7 +27,7 @@
 #include "config.h"
 #include "Image.h"
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "BitmapImage.h"
 #include "GraphicsContext.h"
 #include "IntRect.h"
@@ -136,7 +136,7 @@ void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const Fl
         return;
     }
 
-    TransformationMatrix patternTransform = TransformationMatrix().scaleNonUniform(scale.width(), scale.height());
+    AffineTransform patternTransform = AffineTransform().scaleNonUniform(scale.width(), scale.height());
     FloatRect tileRect(FloatPoint(), intrinsicTileSize);    
     drawPattern(ctxt, tileRect, patternTransform, oneTileRect.location(), styleColorSpace, op, destRect);
     
@@ -158,7 +158,7 @@ void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const Flo
         vRule = RepeatTile;
 
     FloatSize scale = calculatePatternScale(dstRect, srcRect, hRule, vRule);
-    TransformationMatrix patternTransform = TransformationMatrix().scaleNonUniform(scale.width(), scale.height());
+    AffineTransform patternTransform = AffineTransform().scaleNonUniform(scale.width(), scale.height());
 
     // We want to construct the phase such that the pattern is centered (when stretch is not
     // set for a particular rule).
diff --git a/WebCore/platform/graphics/Image.h b/WebCore/platform/graphics/Image.h
index 1af3bf1..b8b6434 100644
--- a/WebCore/platform/graphics/Image.h
+++ b/WebCore/platform/graphics/Image.h
@@ -74,7 +74,7 @@ class FloatSize;
 class GraphicsContext;
 class SharedBuffer;
 class String;
-class TransformationMatrix;
+class AffineTransform;
 
 // This class gets notified when an image creates or destroys decoded frames and when it advances animation frames.
 class ImageObserver;
@@ -170,7 +170,7 @@ protected:
     virtual bool mayFillWithSolidColor() { return false; }
     virtual Color solidColor() const { return Color(); }
     
-    virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const TransformationMatrix& patternTransform,
+    virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform,
                              const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect);
 
 private:
diff --git a/WebCore/platform/graphics/ImageBuffer.h b/WebCore/platform/graphics/ImageBuffer.h
index 9432058..7821288 100644
--- a/WebCore/platform/graphics/ImageBuffer.h
+++ b/WebCore/platform/graphics/ImageBuffer.h
@@ -27,7 +27,7 @@
 #ifndef ImageBuffer_h
 #define ImageBuffer_h
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "Image.h"
 #include "IntSize.h"
 #include "ImageBufferData.h"
@@ -84,11 +84,11 @@ namespace WebCore {
 
         String toDataURL(const String& mimeType) const;
 #if !PLATFORM(CG)
-        TransformationMatrix baseTransform() const { return TransformationMatrix(); }
+        AffineTransform baseTransform() const { return AffineTransform(); }
         void transformColorSpace(ImageColorSpace srcColorSpace, ImageColorSpace dstColorSpace);
         void platformTransformColorSpace(const Vector<int>&);
 #else
-        TransformationMatrix baseTransform() const { return TransformationMatrix(1, 0, 0, -1, 0, m_size.height()); }
+        AffineTransform baseTransform() const { return AffineTransform(1, 0, 0, -1, 0, m_size.height()); }
 #endif
     private:
         ImageBufferData m_data;
diff --git a/WebCore/platform/graphics/Path.h b/WebCore/platform/graphics/Path.h
index aad6f3e..533ef8f 100644
--- a/WebCore/platform/graphics/Path.h
+++ b/WebCore/platform/graphics/Path.h
@@ -74,7 +74,6 @@ namespace WebCore {
     class GraphicsContext;
     class String;
     class StrokeStyleApplier;
-    class TransformationMatrix;
 
     enum WindRule {
         RULE_NONZERO = 0,
@@ -147,7 +146,6 @@ namespace WebCore {
 
         void apply(void* info, PathApplierFunction) const;
         void transform(const AffineTransform&);
-        void transform(const TransformationMatrix&);
 
     private:
         PlatformPathPtr m_path;
diff --git a/WebCore/platform/graphics/Pattern.cpp b/WebCore/platform/graphics/Pattern.cpp
index 3409d16..bb07307 100644
--- a/WebCore/platform/graphics/Pattern.cpp
+++ b/WebCore/platform/graphics/Pattern.cpp
@@ -47,7 +47,7 @@ Pattern::~Pattern()
     platformDestroy();
 }
 
-void Pattern::setPatternSpaceTransform(const TransformationMatrix& patternSpaceTransformation)
+void Pattern::setPatternSpaceTransform(const AffineTransform& patternSpaceTransformation)
 {
     m_patternSpaceTransformation = patternSpaceTransformation;
     setPlatformPatternSpaceTransform();
diff --git a/WebCore/platform/graphics/Pattern.h b/WebCore/platform/graphics/Pattern.h
index b0188b9..b0cf283 100644
--- a/WebCore/platform/graphics/Pattern.h
+++ b/WebCore/platform/graphics/Pattern.h
@@ -28,10 +28,11 @@
 #ifndef Pattern_h
 #define Pattern_h
 
+#include "AffineTransform.h"
+
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
-#include "TransformationMatrix.h"
 
 #if PLATFORM(CG)
 typedef struct CGPattern* CGPatternRef;
@@ -61,39 +62,40 @@ typedef void* PlatformPatternPtr;
 #endif
 
 namespace WebCore {
-    class TransformationMatrix;
-    class Image;
 
-    class Pattern : public RefCounted<Pattern> {
-    public:
-        static PassRefPtr<Pattern> create(Image* tileImage, bool repeatX, bool repeatY)
-        {
-            return adoptRef(new Pattern(tileImage, repeatX, repeatY));
-        }
-        virtual ~Pattern();
+class AffineTransform;
+class Image;
+
+class Pattern : public RefCounted<Pattern> {
+public:
+    static PassRefPtr<Pattern> create(Image* tileImage, bool repeatX, bool repeatY)
+    {
+        return adoptRef(new Pattern(tileImage, repeatX, repeatY));
+    }
+    virtual ~Pattern();
 
-        Image* tileImage() const { return m_tileImage.get(); }
+    Image* tileImage() const { return m_tileImage.get(); }
 
-        void platformDestroy();
+    void platformDestroy();
 
-        // Pattern space is an abstract space that maps to the default user space by the transformation 'userSpaceTransformation' 
+    // Pattern space is an abstract space that maps to the default user space by the transformation 'userSpaceTransformation' 
 #if PLATFORM(SKIA)
-        PlatformPatternPtr platformPattern(const TransformationMatrix& userSpaceTransformation);
+    PlatformPatternPtr platformPattern(const AffineTransform& userSpaceTransformation);
 #else
-        PlatformPatternPtr createPlatformPattern(const TransformationMatrix& userSpaceTransformation) const;
+    PlatformPatternPtr createPlatformPattern(const AffineTransform& userSpaceTransformation) const;
 #endif
-        void setPatternSpaceTransform(const TransformationMatrix& patternSpaceTransformation);
-        void setPlatformPatternSpaceTransform();
+    void setPatternSpaceTransform(const AffineTransform& patternSpaceTransformation);
+    void setPlatformPatternSpaceTransform();
 
-    private:
-        Pattern(Image*, bool repeatX, bool repeatY);
+private:
+    Pattern(Image*, bool repeatX, bool repeatY);
 
-        RefPtr<Image> m_tileImage;
-        bool m_repeatX;
-        bool m_repeatY;
-        TransformationMatrix m_patternSpaceTransformation;
-        PlatformPatternPtr m_pattern;
-    };
+    RefPtr<Image> m_tileImage;
+    bool m_repeatX;
+    bool m_repeatY;
+    AffineTransform m_patternSpaceTransformation;
+    PlatformPatternPtr m_pattern;
+};
 
 } //namespace
 
diff --git a/WebCore/platform/graphics/cairo/FontCairo.cpp b/WebCore/platform/graphics/cairo/FontCairo.cpp
index 3bfa8f3..169c74c 100644
--- a/WebCore/platform/graphics/cairo/FontCairo.cpp
+++ b/WebCore/platform/graphics/cairo/FontCairo.cpp
@@ -29,13 +29,13 @@
 #include "config.h"
 #include "Font.h"
 
+#include "AffineTransform.h"
 #include "GlyphBuffer.h"
 #include "Gradient.h"
 #include "GraphicsContext.h"
 #include "ImageBuffer.h"
 #include "Pattern.h"
 #include "SimpleFontData.h"
-#include "TransformationMatrix.h"
 
 #define SYNTHETIC_OBLIQUE_ANGLE 14
 
@@ -136,7 +136,7 @@ void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, cons
                 cairo_pop_group_to_source(cr);
             }
         } else if (context->fillPattern()) {
-            TransformationMatrix affine;
+            AffineTransform affine;
             cairo_set_source(cr, context->fillPattern()->createPlatformPattern(affine));
             if (context->getAlpha() < 1.0f) {
                 cairo_push_group(cr);
@@ -166,7 +166,7 @@ void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, cons
                 cairo_pop_group_to_source(cr);
             }
         } else if (context->strokePattern()) {
-            TransformationMatrix affine;
+            AffineTransform affine;
             cairo_set_source(cr, context->strokePattern()->createPlatformPattern(affine));
             if (context->getAlpha() < 1.0f) {
                 cairo_push_group(cr);
diff --git a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
index ccbbf3b..0aa6b83 100644
--- a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
+++ b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
@@ -45,7 +45,6 @@
 #include "Pattern.h"
 #include "SimpleFontData.h"
 #include "SourceGraphic.h"
-#include "TransformationMatrix.h"
 
 #include <cairo.h>
 #include <math.h>
@@ -78,7 +77,7 @@ static inline void setPlatformFill(GraphicsContext* context, cairo_t* cr, Graphi
 {
     cairo_save(cr);
     if (gcp->state.fillPattern) {
-        TransformationMatrix affine;
+        AffineTransform affine;
         cairo_set_source(cr, gcp->state.fillPattern->createPlatformPattern(affine));
     } else if (gcp->state.fillGradient)
         cairo_set_source(cr, gcp->state.fillGradient->platformGradient());
@@ -93,7 +92,7 @@ static inline void setPlatformStroke(GraphicsContext* context, cairo_t* cr, Grap
 {
     cairo_save(cr);
     if (gcp->state.strokePattern) {
-        TransformationMatrix affine;
+        AffineTransform affine;
         cairo_set_source(cr, gcp->state.strokePattern->createPlatformPattern(affine));
     } else if (gcp->state.strokeGradient)
         cairo_set_source(cr, gcp->state.strokeGradient->platformGradient());
@@ -209,15 +208,7 @@ GraphicsContext::~GraphicsContext()
     delete m_data;
 }
 
-TransformationMatrix GraphicsContext::getCTM() const
-{
-    cairo_t* cr = platformContext();
-    cairo_matrix_t m;
-    cairo_get_matrix(cr, &m);
-    return TransformationMatrix(m.xx, m.yx, m.xy, m.yy, m.x0, m.y0);
-}
-
-AffineTransform GraphicsContext::getAffineCTM() const
+AffineTransform GraphicsContext::getCTM() const
 {
     cairo_t* cr = platformContext();
     cairo_matrix_t m;
@@ -800,17 +791,6 @@ void GraphicsContext::setURLForRect(const KURL& link, const IntRect& destRect)
     notImplemented();
 }
 
-void GraphicsContext::concatCTM(const TransformationMatrix& transform)
-{
-    if (paintingDisabled())
-        return;
-
-    cairo_t* cr = m_data->cr;
-    const cairo_matrix_t matrix = cairo_matrix_t(transform);
-    cairo_transform(cr, &matrix);
-    m_data->concatCTM(transform);
-}
-
 void GraphicsContext::concatCTM(const AffineTransform& transform)
 {
     if (paintingDisabled())
diff --git a/WebCore/platform/graphics/cairo/ImageCairo.cpp b/WebCore/platform/graphics/cairo/ImageCairo.cpp
index 92e36fc..e74c495 100644
--- a/WebCore/platform/graphics/cairo/ImageCairo.cpp
+++ b/WebCore/platform/graphics/cairo/ImageCairo.cpp
@@ -30,12 +30,12 @@
 
 #if PLATFORM(CAIRO)
 
+#include "AffineTransform.h"
 #include "Color.h"
 #include "FloatRect.h"
 #include "GraphicsContext.h"
 #include "ImageBuffer.h"
 #include "ImageObserver.h"
-#include "TransformationMatrix.h"
 #include <cairo.h>
 #include <math.h>
 #include <wtf/OwnPtr.h>
@@ -170,7 +170,7 @@ void BitmapImage::draw(GraphicsContext* context, const FloatRect& dst, const Flo
         imageObserver()->didDraw(this);
 }
 
-void Image::drawPattern(GraphicsContext* context, const FloatRect& tileRect, const TransformationMatrix& patternTransform,
+void Image::drawPattern(GraphicsContext* context, const FloatRect& tileRect, const AffineTransform& patternTransform,
                         const FloatPoint& phase, ColorSpace, CompositeOperator op, const FloatRect& destRect)
 {
     cairo_surface_t* image = nativeImageForCurrentFrame();
diff --git a/WebCore/platform/graphics/cairo/PathCairo.cpp b/WebCore/platform/graphics/cairo/PathCairo.cpp
index a265937..bc68b37 100644
--- a/WebCore/platform/graphics/cairo/PathCairo.cpp
+++ b/WebCore/platform/graphics/cairo/PathCairo.cpp
@@ -26,7 +26,6 @@
 #include "Path.h"
 
 #include "AffineTransform.h"
-#include "TransformationMatrix.h"
 #include "CairoPath.h"
 #include "FloatRect.h"
 #include "GraphicsContext.h"
@@ -335,14 +334,6 @@ void Path::transform(const AffineTransform& trans)
     cairo_transform(m_cr, &c_matrix);
 }
 
-void Path::transform(const TransformationMatrix& trans)
-{
-    cairo_t* m_cr = platformPath()->m_cr;
-    cairo_matrix_t c_matrix = cairo_matrix_t(trans);
-    cairo_matrix_invert(&c_matrix);
-    cairo_transform(m_cr, &c_matrix);
-}
-
 String Path::debugString() const
 {
     if (isEmpty())
diff --git a/WebCore/platform/graphics/cairo/PatternCairo.cpp b/WebCore/platform/graphics/cairo/PatternCairo.cpp
index 58c5d00..b067acc 100644
--- a/WebCore/platform/graphics/cairo/PatternCairo.cpp
+++ b/WebCore/platform/graphics/cairo/PatternCairo.cpp
@@ -26,14 +26,14 @@
 #include "config.h"
 #include "Pattern.h"
 
+#include "AffineTransform.h"
 #include "GraphicsContext.h"
-#include "TransformationMatrix.h"
 
 #include <cairo.h>
 
 namespace WebCore {
 
-cairo_pattern_t* Pattern::createPlatformPattern(const TransformationMatrix&) const
+cairo_pattern_t* Pattern::createPlatformPattern(const AffineTransform&) const
 {
     cairo_surface_t* surface = tileImage()->nativeImageForCurrentFrame();
     if (!surface)
diff --git a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
index 64de707..2e3f829 100644
--- a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
+++ b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
@@ -36,7 +36,6 @@
 #include "KURL.h"
 #include "Path.h"
 #include "Pattern.h"
-#include "TransformationMatrix.h"
 
 #include <CoreGraphics/CGBitmapContext.h>
 #include <CoreGraphics/CGPDFContext.h>
@@ -985,27 +984,12 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     m_data->m_userToDeviceTransformKnownToBeIdentity = false;
 }
 
-void GraphicsContext::concatCTM(const TransformationMatrix& transform)
-{
-    if (paintingDisabled())
-        return;
-    CGContextConcatCTM(platformContext(), transform);
-    m_data->concatCTM(transform);
-    m_data->m_userToDeviceTransformKnownToBeIdentity = false;
-}
-
-AffineTransform GraphicsContext::getAffineCTM() const
+AffineTransform GraphicsContext::getCTM() const
 {
     CGAffineTransform t = CGContextGetCTM(platformContext());
     return AffineTransform(t.a, t.b, t.c, t.d, t.tx, t.ty);
 }
 
-TransformationMatrix GraphicsContext::getCTM() const
-{
-    CGAffineTransform t = CGContextGetCTM(platformContext());
-    return TransformationMatrix(t.a, t.b, t.c, t.d, t.tx, t.ty);
-}
-
 FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect)
 {
     // It is not enough just to round to pixels in device space. The rotation part of the
diff --git a/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h b/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h
index dd8cca3..b1efba1 100644
--- a/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h
+++ b/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h
@@ -61,7 +61,6 @@ public:
     void rotate(float) {}
     void translate(float, float) {}
     void concatCTM(const AffineTransform&) {}
-    void concatCTM(const TransformationMatrix&) {}
     void beginTransparencyLayer() {}
     void endTransparencyLayer() {}
 #endif
@@ -77,7 +76,6 @@ public:
     void rotate(float);
     void translate(float, float);
     void concatCTM(const AffineTransform&);
-    void concatCTM(const TransformationMatrix&);
     void beginTransparencyLayer() { m_transparencyCount++; }
     void endTransparencyLayer() { m_transparencyCount--; }
 
diff --git a/WebCore/platform/graphics/cg/ImageCG.cpp b/WebCore/platform/graphics/cg/ImageCG.cpp
index 2e372e2..70a80a0 100644
--- a/WebCore/platform/graphics/cg/ImageCG.cpp
+++ b/WebCore/platform/graphics/cg/ImageCG.cpp
@@ -28,7 +28,7 @@
 
 #if PLATFORM(CG)
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "FloatConversion.h"
 #include "FloatRect.h"
 #include "GraphicsContext.h"
@@ -244,7 +244,7 @@ static void drawPatternCallback(void* info, CGContextRef context)
     CGContextDrawImage(context, GraphicsContext(context).roundToDevicePixels(FloatRect(0, 0, CGImageGetWidth(image), CGImageGetHeight(image))), image);
 }
 
-void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const TransformationMatrix& patternTransform,
+void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const AffineTransform& patternTransform,
                         const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)
 {
     if (!nativeImageForCurrentFrame())
diff --git a/WebCore/platform/graphics/cg/PathCG.cpp b/WebCore/platform/graphics/cg/PathCG.cpp
index 01680df..81454b3 100644
--- a/WebCore/platform/graphics/cg/PathCG.cpp
+++ b/WebCore/platform/graphics/cg/PathCG.cpp
@@ -30,7 +30,6 @@
 #if PLATFORM(CG)
 
 #include "AffineTransform.h"
-#include "TransformationMatrix.h"
 #include <ApplicationServices/ApplicationServices.h>
 #include "FloatRect.h"
 #include "GraphicsContext.h"
@@ -356,15 +355,6 @@ void Path::transform(const AffineTransform& transform)
     m_path = path;
 }
 
-void Path::transform(const TransformationMatrix& transform)
-{
-    CGMutablePathRef path = CGPathCreateMutable();
-    CGAffineTransform transformCG = transform;
-    CGPathAddPath(path, &transformCG, m_path);
-    CGPathRelease(m_path);
-    m_path = path;
-}
-
 }
 
 #endif // PLATFORM(CG)
diff --git a/WebCore/platform/graphics/cg/PatternCG.cpp b/WebCore/platform/graphics/cg/PatternCG.cpp
index 26f402b..94f37b2 100644
--- a/WebCore/platform/graphics/cg/PatternCG.cpp
+++ b/WebCore/platform/graphics/cg/PatternCG.cpp
@@ -27,7 +27,7 @@
 #include "config.h"
 #include "Pattern.h"
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "GraphicsContext.h"
 
 #include <ApplicationServices/ApplicationServices.h>
@@ -50,11 +50,11 @@ static void patternReleaseCallback(void* info)
     static_cast<Image*>(info)->deref();
 }
 
-CGPatternRef Pattern::createPlatformPattern(const TransformationMatrix& userSpaceTransformation) const
+CGPatternRef Pattern::createPlatformPattern(const AffineTransform& userSpaceTransformation) const
 {
     IntRect tileRect = tileImage()->rect();
 
-    TransformationMatrix patternTransform = m_patternSpaceTransformation;
+    AffineTransform patternTransform = m_patternSpaceTransformation;
     patternTransform.multiply(userSpaceTransformation);
     patternTransform.scaleNonUniform(1, -1);
     patternTransform.translate(0, -tileRect.height());
diff --git a/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp b/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
index 3970ebc..7ab3a40 100644
--- a/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
+++ b/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
@@ -36,7 +36,6 @@
 #include "NotImplemented.h"
 #include "Path.h"
 #include "Pen.h"
-#include "TransformationMatrix.h"
 #include <GraphicsDefs.h>
 #include <Region.h>
 #include <View.h>
@@ -392,18 +391,12 @@ void GraphicsContext::clipToImageBuffer(const FloatRect&, const ImageBuffer*)
     notImplemented();
 }
 
-AffineTransform GraphicsContext::getAffineCTM() const
+AffineTransform GraphicsContext::getCTM() const
 {
     notImplemented();
     return AffineTransform();
 }
 
-TransformationMatrix GraphicsContext::getCTM() const
-{
-    notImplemented();
-    return TransformationMatrix();
-}
-
 void GraphicsContext::translate(float x, float y)
 {
     if (paintingDisabled())
@@ -466,14 +459,6 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     notImplemented();
 }
 
-void GraphicsContext::concatCTM(const TransformationMatrix& transform)
-{
-    if (paintingDisabled())
-        return;
-
-    notImplemented();
-}
-
 void GraphicsContext::setPlatformShouldAntialias(bool enable)
 {
     if (paintingDisabled())
diff --git a/WebCore/platform/graphics/haiku/ImageHaiku.cpp b/WebCore/platform/graphics/haiku/ImageHaiku.cpp
index df08822..0fbd0a3 100644
--- a/WebCore/platform/graphics/haiku/ImageHaiku.cpp
+++ b/WebCore/platform/graphics/haiku/ImageHaiku.cpp
@@ -109,7 +109,7 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dst, const FloatR
     ctxt->restore();
 }
 
-void Image::drawPattern(GraphicsContext* context, const FloatRect& tileRect, const TransformationMatrix& patternTransform, const FloatPoint& srcPoint, ColorSpace, CompositeOperator op, const FloatRect& dstRect)
+void Image::drawPattern(GraphicsContext* context, const FloatRect& tileRect, const AffineTransform& patternTransform, const FloatPoint& srcPoint, ColorSpace, CompositeOperator op, const FloatRect& dstRect)
 {
     // FIXME: finish this to support also phased position (srcPoint)
     startAnimation();
diff --git a/WebCore/platform/graphics/haiku/PathHaiku.cpp b/WebCore/platform/graphics/haiku/PathHaiku.cpp
index 70dad29..d8b6932 100644
--- a/WebCore/platform/graphics/haiku/PathHaiku.cpp
+++ b/WebCore/platform/graphics/haiku/PathHaiku.cpp
@@ -152,11 +152,6 @@ void Path::transform(const AffineTransform& transform)
     notImplemented();
 }
 
-void Path::transform(const TransformationMatrix& transform)
-{
-    notImplemented();
-}
-
 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier)
 {
     notImplemented();
diff --git a/WebCore/platform/graphics/qt/FontQt.cpp b/WebCore/platform/graphics/qt/FontQt.cpp
index 0196ab2..9ff7c1a 100644
--- a/WebCore/platform/graphics/qt/FontQt.cpp
+++ b/WebCore/platform/graphics/qt/FontQt.cpp
@@ -21,14 +21,14 @@
 
 #include "config.h"
 #include "Font.h"
+
+#include "AffineTransform.h"
 #include "FontDescription.h"
 #include "FontFallbackList.h"
 #include "FontSelector.h"
-
 #include "Gradient.h"
 #include "GraphicsContext.h"
 #include "Pattern.h"
-#include "TransformationMatrix.h"
 
 #include <QBrush>
 #include <QFontInfo>
@@ -79,7 +79,7 @@ void Font::drawComplexText(GraphicsContext* ctx, const TextRun& run, const Float
             brush.setTransform(ctx->fillGradient()->gradientSpaceTransform());
             p->setPen(QPen(brush, 0));
         } else if (ctx->fillPattern()) {
-            TransformationMatrix affine;
+            AffineTransform affine;
             p->setPen(QPen(QBrush(ctx->fillPattern()->createPlatformPattern(affine)), 0));
         } else
             p->setPen(QColor(ctx->fillColor()));
@@ -91,7 +91,7 @@ void Font::drawComplexText(GraphicsContext* ctx, const TextRun& run, const Float
             brush.setTransform(ctx->strokeGradient()->gradientSpaceTransform());
             p->setPen(QPen(brush, ctx->strokeThickness()));
         } else if (ctx->strokePattern()) {
-            TransformationMatrix affine;
+            AffineTransform affine;
             p->setPen(QPen(QBrush(ctx->strokePattern()->createPlatformPattern(affine)), ctx->strokeThickness()));
         } else
             p->setPen(QPen(QColor(ctx->strokeColor()), ctx->strokeThickness()));
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 938d7b2..230dabb 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -50,7 +50,6 @@
 #include "Path.h"
 #include "Pattern.h"
 #include "Pen.h"
-#include "TransformationMatrix.h"
 
 #include <QBrush>
 #include <QDebug>
@@ -276,22 +275,13 @@ PlatformGraphicsContext* GraphicsContext::platformContext() const
     return m_data->p();
 }
 
-AffineTransform GraphicsContext::getAffineCTM() const
+AffineTransform GraphicsContext::getCTM() const
 {
     QTransform matrix(platformContext()->combinedTransform());
     return AffineTransform(matrix.m11(), matrix.m12(), matrix.m21(),
                            matrix.m22(), matrix.dx(), matrix.dy());
 }
 
-TransformationMatrix GraphicsContext::getCTM() const
-{
-    QTransform matrix(platformContext()->combinedTransform());
-    return TransformationMatrix(matrix.m11(), matrix.m12(), 0, matrix.m13(),
-                                matrix.m21(), matrix.m22(), 0, matrix.m23(),
-                                           0,            0, 1,            0,
-                                matrix.m31(), matrix.m32(), 0, matrix.m33());
-}
-
 void GraphicsContext::savePlatformState()
 {
     m_data->p()->save();
@@ -650,7 +640,7 @@ void GraphicsContext::fillPath()
     if (m_common->state.fillPattern || m_common->state.fillGradient || fillColor().alpha()) {
         drawFilledShadowPath(this, p, path);
         if (m_common->state.fillPattern) {
-            TransformationMatrix affine;
+            AffineTransform affine;
             p->fillPath(path, QBrush(m_common->state.fillPattern->createPlatformPattern(affine)));
         } else if (m_common->state.fillGradient) {
             QBrush brush(*m_common->state.fillGradient->platformGradient());
@@ -687,7 +677,7 @@ void GraphicsContext::strokePath()
             p->setWorldTransform(t);
         }
         if (m_common->state.strokePattern) {
-            TransformationMatrix affine;
+            AffineTransform affine;
             pen.setBrush(QBrush(m_common->state.strokePattern->createPlatformPattern(affine)));
             p->setPen(pen);
             p->strokePath(path, pen);
@@ -727,7 +717,7 @@ void GraphicsContext::fillRect(const FloatRect& rect)
     if (m_common->state.fillPattern || m_common->state.fillGradient || fillColor().alpha()) {
         drawBorderlessRectShadow(this, p, rect);
         if (m_common->state.fillPattern) {
-            TransformationMatrix affine;
+            AffineTransform affine;
             p->fillRect(rect, QBrush(m_common->state.fillPattern->createPlatformPattern(affine)));
         } else if (m_common->state.fillGradient) {
             QBrush brush(*m_common->state.fillGradient->platformGradient());
@@ -1213,24 +1203,6 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     }
 }
 
-
-void GraphicsContext::concatCTM(const TransformationMatrix& transform)
-{
-    if (paintingDisabled())
-        return;
-
-    m_data->p()->setWorldTransform(transform, true);
-
-    // Transformations to the context shouldn't transform the currentPath.
-    // We have to undo every change made to the context from the currentPath
-    // to avoid wrong drawings.
-    if (!m_data->currentPath.isEmpty() && transform.isInvertible()) {
-        QTransform matrix = transform.inverse();
-        m_data->currentPath = m_data->currentPath * matrix;
-        m_common->state.pathTransform.multiply(transform);
-    }
-}
-
 void GraphicsContext::setURLForRect(const KURL&, const IntRect&)
 {
     notImplemented();
diff --git a/WebCore/platform/graphics/qt/ImageQt.cpp b/WebCore/platform/graphics/qt/ImageQt.cpp
index fea1448..db12738 100644
--- a/WebCore/platform/graphics/qt/ImageQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageQt.cpp
@@ -31,12 +31,12 @@
 #include "config.h"
 #include "Image.h"
 
+#include "AffineTransform.h"
 #include "ImageObserver.h"
 #include "BitmapImage.h"
 #include "FloatRect.h"
 #include "PlatformString.h"
 #include "GraphicsContext.h"
-#include "TransformationMatrix.h"
 #include "StillImageQt.h"
 #include "qwebsettings.h"
 
@@ -93,7 +93,7 @@ PassRefPtr<Image> Image::loadPlatformResource(const char* name)
     return StillImage::create(loadResourcePixmap(name));
 }
 
-void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const TransformationMatrix& patternTransform,
+void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const AffineTransform& patternTransform,
                         const FloatPoint& phase, ColorSpace, CompositeOperator op, const FloatRect& destRect)
 {
     QPixmap* framePixmap = nativeImageForCurrentFrame();
diff --git a/WebCore/platform/graphics/qt/PathQt.cpp b/WebCore/platform/graphics/qt/PathQt.cpp
index fc80a69..507f029 100644
--- a/WebCore/platform/graphics/qt/PathQt.cpp
+++ b/WebCore/platform/graphics/qt/PathQt.cpp
@@ -36,7 +36,6 @@
 #include "ImageBuffer.h"
 #include "PlatformString.h"
 #include "StrokeStyleApplier.h"
-#include "TransformationMatrix.h"
 #include <QPainterPath>
 #include <QTransform>
 #include <QString>
@@ -385,11 +384,6 @@ void Path::transform(const AffineTransform& transform)
     m_path = QTransform(transform).map(m_path);
 }
 
-void Path::transform(const TransformationMatrix& transform)
-{
-    m_path = QTransform(transform).map(m_path);
-}
-
 }
 
 // vim: ts=4 sw=4 et
diff --git a/WebCore/platform/graphics/qt/PatternQt.cpp b/WebCore/platform/graphics/qt/PatternQt.cpp
index b261613..af7b128 100644
--- a/WebCore/platform/graphics/qt/PatternQt.cpp
+++ b/WebCore/platform/graphics/qt/PatternQt.cpp
@@ -26,12 +26,12 @@
 #include "config.h"
 #include "Pattern.h"
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "GraphicsContext.h"
 
 namespace WebCore {
 
-QBrush Pattern::createPlatformPattern(const TransformationMatrix&) const
+QBrush Pattern::createPlatformPattern(const AffineTransform&) const
 {
     QPixmap* pixmap = tileImage()->nativeImageForCurrentFrame();
     if (!pixmap)
diff --git a/WebCore/platform/graphics/skia/GradientSkia.cpp b/WebCore/platform/graphics/skia/GradientSkia.cpp
index 268b17e..7370a49 100644
--- a/WebCore/platform/graphics/skia/GradientSkia.cpp
+++ b/WebCore/platform/graphics/skia/GradientSkia.cpp
@@ -187,7 +187,7 @@ void Gradient::fill(GraphicsContext* context, const FloatRect& rect)
     context->fillRect(rect);
 }
 
-void Gradient::setPlatformGradientSpaceTransform(const TransformationMatrix& matrix)
+void Gradient::setPlatformGradientSpaceTransform(const AffineTransform& matrix)
 {
     if (m_gradient)
         m_gradient->setLocalMatrix(m_gradientSpaceTransformation);
diff --git a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
index bd97ca2..8986685 100644
--- a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
@@ -42,7 +42,6 @@
 #include "NativeImageSkia.h"
 #include "NotImplemented.h"
 #include "PlatformContextSkia.h"
-#include "TransformationMatrix.h"
 
 #include "SkBitmap.h"
 #include "SkBlurDrawLooper.h"
@@ -447,13 +446,6 @@ void GraphicsContext::concatCTM(const AffineTransform& affine)
     platformContext()->canvas()->concat(affine);
 }
 
-void GraphicsContext::concatCTM(const TransformationMatrix& xform)
-{
-    if (paintingDisabled())
-        return;
-    platformContext()->canvas()->concat(xform);
-}
-
 void GraphicsContext::drawConvexPolygon(size_t numPoints,
                                         const FloatPoint* points,
                                         bool shouldAntialias)
@@ -813,26 +805,15 @@ void GraphicsContext::fillRoundedRect(const IntRect& rect,
     platformContext()->canvas()->drawPath(path, paint);
 }
 
-AffineTransform GraphicsContext::getAffineCTM() const
-{
-    const SkMatrix& m = platformContext()->canvas()->getTotalMatrix();
-    return AffineTransform(SkScalarToDouble(m.getScaleX()),      // a
-                           SkScalarToDouble(m.getSkewY()),       // b
-                           SkScalarToDouble(m.getSkewX()),       // c
-                           SkScalarToDouble(m.getScaleY()),      // d
-                           SkScalarToDouble(m.getTranslateX()),  // e
-                           SkScalarToDouble(m.getTranslateY())); // f
-}
-
-TransformationMatrix GraphicsContext::getCTM() const
+AffineTransform GraphicsContext::getCTM() const
 {
     const SkMatrix& m = platformContext()->canvas()->getTotalMatrix();
-    return TransformationMatrix(SkScalarToDouble(m.getScaleX()),      // a
-                                SkScalarToDouble(m.getSkewY()),       // b
-                                SkScalarToDouble(m.getSkewX()),       // c
-                                SkScalarToDouble(m.getScaleY()),      // d
-                                SkScalarToDouble(m.getTranslateX()),  // e
-                                SkScalarToDouble(m.getTranslateY())); // f
+    return AffineTransform(SkScalarToDouble(m.getScaleX()),
+                           SkScalarToDouble(m.getSkewY()),
+                           SkScalarToDouble(m.getSkewX()),
+                           SkScalarToDouble(m.getScaleY()),
+                           SkScalarToDouble(m.getTranslateX()),
+                           SkScalarToDouble(m.getTranslateY()));
 }
 
 FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect)
diff --git a/WebCore/platform/graphics/skia/ImageSkia.cpp b/WebCore/platform/graphics/skia/ImageSkia.cpp
index 6d8ed22..ba9f824 100644
--- a/WebCore/platform/graphics/skia/ImageSkia.cpp
+++ b/WebCore/platform/graphics/skia/ImageSkia.cpp
@@ -30,6 +30,7 @@
 
 #include "config.h"
 
+#include "AffineTransform.h"
 #include "BitmapImage.h"
 #include "BitmapImageSingleFrameSkia.h"
 #include "ChromiumBridge.h"
@@ -43,7 +44,6 @@
 #include "SkiaUtils.h"
 #include "SkRect.h"
 #include "SkShader.h"
-#include "TransformationMatrix.h"
 
 #include "skia/ext/image_operations.h"
 #include "skia/ext/platform_canvas.h"
@@ -300,7 +300,7 @@ PassRefPtr<Image> Image::loadPlatformResource(const char *name)
 
 void Image::drawPattern(GraphicsContext* context,
                         const FloatRect& floatSrcRect,
-                        const TransformationMatrix& patternTransform,
+                        const AffineTransform& patternTransform,
                         const FloatPoint& phase,
                         ColorSpace styleColorSpace,
                         CompositeOperator compositeOp,
diff --git a/WebCore/platform/graphics/skia/PathSkia.cpp b/WebCore/platform/graphics/skia/PathSkia.cpp
index fe4c3d0..a0d4c79 100644
--- a/WebCore/platform/graphics/skia/PathSkia.cpp
+++ b/WebCore/platform/graphics/skia/PathSkia.cpp
@@ -220,11 +220,6 @@ void Path::transform(const AffineTransform& xform)
     m_path->transform(xform);
 }
 
-void Path::transform(const TransformationMatrix& xform)
-{
-    m_path->transform(xform);
-}
-
 String Path::debugString() const
 {
     String result;
diff --git a/WebCore/platform/graphics/skia/PatternSkia.cpp b/WebCore/platform/graphics/skia/PatternSkia.cpp
index b98825b..bd27b6a 100644
--- a/WebCore/platform/graphics/skia/PatternSkia.cpp
+++ b/WebCore/platform/graphics/skia/PatternSkia.cpp
@@ -29,9 +29,9 @@
 #include "config.h"
 #include "Pattern.h"
 
+#include "AffineTransform.h"
 #include "Image.h"
 #include "NativeImageSkia.h"
-#include "TransformationMatrix.h"
 
 #include "SkCanvas.h"
 #include "SkColor.h"
@@ -46,7 +46,7 @@ void Pattern::platformDestroy()
     m_pattern = 0;
 }
 
-PlatformPatternPtr Pattern::platformPattern(const TransformationMatrix& patternTransform)
+PlatformPatternPtr Pattern::platformPattern(const AffineTransform& patternTransform)
 {
     if (m_pattern)
         return m_pattern;
diff --git a/WebCore/platform/graphics/skia/SkiaFontWin.cpp b/WebCore/platform/graphics/skia/SkiaFontWin.cpp
index f1c5cdc..58fa7d3 100644
--- a/WebCore/platform/graphics/skia/SkiaFontWin.cpp
+++ b/WebCore/platform/graphics/skia/SkiaFontWin.cpp
@@ -31,13 +31,13 @@
 #include "config.h"
 #include "SkiaFontWin.h"
 
+#include "AffineTransform.h"
 #include "PlatformContextSkia.h"
 #include "Gradient.h"
 #include "Pattern.h"
 #include "SkCanvas.h"
 #include "SkPaint.h"
 #include "SkShader.h"
-#include "TransformationMatrix.h"
 
 #include <wtf/ListHashSet.h>
 #include <wtf/Vector.h>
@@ -237,7 +237,7 @@ bool windowsCanHandleTextDrawing(GraphicsContext* context)
     // in using Skia will show you the hinted outlines for the smaller size,
     // which look weird. All else being equal, it's better to use Windows' text
     // drawing, so we don't check for zooms.
-    const TransformationMatrix& matrix = context->getCTM();
+    const AffineTransform& matrix = context->getCTM();
     if (matrix.b() != 0 || matrix.c() != 0)  // Check for skew.
         return false;
 
diff --git a/WebCore/platform/graphics/transforms/AffineTransform.cpp b/WebCore/platform/graphics/transforms/AffineTransform.cpp
index f26bcb7..183bff5 100644
--- a/WebCore/platform/graphics/transforms/AffineTransform.cpp
+++ b/WebCore/platform/graphics/transforms/AffineTransform.cpp
@@ -97,7 +97,7 @@ AffineTransform::AffineTransform(double a, double b, double c, double d, double
     setMatrix(a, b, c, d, e, f);
 }
 
-void AffineTransform::reset()
+void AffineTransform::makeIdentity()
 {
     setMatrix(1, 0, 0, 1, 0, 0);
 }
@@ -188,14 +188,16 @@ AffineTransform& AffineTransform::scale(double s)
 AffineTransform& AffineTransform::scale(double sx, double sy)
 {
     m_transform[0] *= sx;
+    m_transform[1] *= sx;
+    m_transform[2] *= sy;
     m_transform[3] *= sy;
     return *this;
 }
 
 AffineTransform& AffineTransform::translate(double tx, double ty)
 {
-    m_transform[4] += tx;
-    m_transform[5] += ty;
+    m_transform[4] += tx * m_transform[0] + ty * m_transform[2];
+    m_transform[5] += tx * m_transform[1] + ty * m_transform[3];
     return *this;
 }
 
@@ -221,9 +223,14 @@ AffineTransform& AffineTransform::flipY()
 
 AffineTransform& AffineTransform::shear(double sx, double sy)
 {
-    AffineTransform shear(1, sy, sx, 1, 0, 0);
+    double a = m_transform[0];
+    double b = m_transform[1];
+
+    m_transform[0] += sy * m_transform[2];
+    m_transform[1] += sy * m_transform[3];
+    m_transform[2] += sx * a;
+    m_transform[3] += sx * b;
 
-    multLeft(shear);
     return *this;
 }
 
@@ -250,16 +257,16 @@ AffineTransform makeMapBetweenRects(const FloatRect& source, const FloatRect& de
     return transform;
 }
 
-void AffineTransform::map(double x, double y, double* x2, double* y2) const
+void AffineTransform::map(double x, double y, double& x2, double& y2) const
 {
-    *x2 = (m_transform[0] * x + m_transform[2] * y + m_transform[4]);
-    *y2 = (m_transform[1] * x + m_transform[3] * y + m_transform[5]);
+    x2 = (m_transform[0] * x + m_transform[2] * y + m_transform[4]);
+    y2 = (m_transform[1] * x + m_transform[3] * y + m_transform[5]);
 }
 
 IntPoint AffineTransform::mapPoint(const IntPoint& point) const
 {
     double x2, y2;
-    map(point.x(), point.y(), &x2, &y2);
+    map(point.x(), point.y(), x2, y2);
     
     // Round the point.
     return IntPoint(lround(x2), lround(y2));
@@ -268,13 +275,24 @@ IntPoint AffineTransform::mapPoint(const IntPoint& point) const
 FloatPoint AffineTransform::mapPoint(const FloatPoint& point) const
 {
     double x2, y2;
-    map(point.x(), point.y(), &x2, &y2);
+    map(point.x(), point.y(), x2, y2);
 
     return FloatPoint(narrowPrecisionToFloat(x2), narrowPrecisionToFloat(y2));
 }
 
+IntRect AffineTransform::mapRect(const IntRect &rect) const
+{
+    return enclosingIntRect(mapRect(FloatRect(rect)));
+}
+
 FloatRect AffineTransform::mapRect(const FloatRect& rect) const
 {
+    if (isIdentityOrTranslation()) {
+        FloatRect mappedRect(rect);
+        mappedRect.move(narrowPrecisionToFloat(m_transform[4]), narrowPrecisionToFloat(m_transform[5]));
+        return mappedRect;
+    }
+
     FloatQuad q(rect);
 
     FloatQuad result;
diff --git a/WebCore/platform/graphics/transforms/AffineTransform.h b/WebCore/platform/graphics/transforms/AffineTransform.h
index 49add18..30d712d 100644
--- a/WebCore/platform/graphics/transforms/AffineTransform.h
+++ b/WebCore/platform/graphics/transforms/AffineTransform.h
@@ -51,6 +51,7 @@ class FloatQuad;
 class FloatRect;
 class IntPoint;
 class IntRect;
+class TransformationMatrix;
 
 class AffineTransform : public FastAllocBase {
 public:
@@ -61,7 +62,7 @@ public:
 
     void setMatrix(double a, double b, double c, double d, double e, double f);
 
-    void map(double x, double y, double* x2, double* y2) const;
+    void map(double x, double y, double& x2, double& y2) const;
 
     // Rounds the mapped point to the nearest integer value.
     IntPoint mapPoint(const IntPoint&) const;
@@ -89,7 +90,7 @@ public:
     double f() const { return m_transform[5]; }
     void setF(double f) { m_transform[5] = f; }
 
-    void reset();
+    void makeIdentity();
 
     AffineTransform& multiply(const AffineTransform&);
     AffineTransform& multLeft(const AffineTransform&);
@@ -114,6 +115,11 @@ public:
 
     TransformationMatrix toTransformationMatrix() const;
 
+    bool isIdentityOrTranslation() const
+    {
+        return m_transform[0] == 1 && m_transform[1] == 0 && m_transform[2] == 0 && m_transform[3] == 1;
+    }
+
     bool operator== (const AffineTransform& m2) const
     {
         return (m_transform[0] == m2.m_transform[0]
diff --git a/WebCore/platform/graphics/transforms/TransformationMatrix.cpp b/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
index 13ef281..0400d40 100644
--- a/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
+++ b/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
@@ -999,6 +999,12 @@ void TransformationMatrix::makeAffine()
     m_matrix[3][3] = 1;
 }
 
+AffineTransform TransformationMatrix::toAffineTransform() const
+{
+    return AffineTransform(m_matrix[0][0], m_matrix[0][1], m_matrix[1][0],
+                           m_matrix[1][1], m_matrix[3][0], m_matrix[3][1]);
+}
+
 static inline void blendFloat(double& from, double to, double progress)
 {
     if (from != to)
diff --git a/WebCore/platform/graphics/transforms/TransformationMatrix.h b/WebCore/platform/graphics/transforms/TransformationMatrix.h
index 9e724d5..cdf101d 100644
--- a/WebCore/platform/graphics/transforms/TransformationMatrix.h
+++ b/WebCore/platform/graphics/transforms/TransformationMatrix.h
@@ -26,6 +26,7 @@
 #ifndef TransformationMatrix_h
 #define TransformationMatrix_h
 
+#include "AffineTransform.h"
 #include "FloatPoint.h"
 #include "IntPoint.h"
 #include <string.h> //for memcpy
@@ -55,6 +56,7 @@ typedef struct tagXFORM XFORM;
 
 namespace WebCore {
 
+class AffineTransform;
 class IntRect;
 class FloatPoint3D;
 class FloatRect;
@@ -268,6 +270,8 @@ public:
     // Throw away the non-affine parts of the matrix (lossy!)
     void makeAffine();
 
+    AffineTransform toAffineTransform() const;
+
     bool operator==(const TransformationMatrix& m2) const
     {
         return (m_matrix[0][0] == m2.m_matrix[0][0] &&
diff --git a/WebCore/platform/graphics/win/FontCGWin.cpp b/WebCore/platform/graphics/win/FontCGWin.cpp
index 653b573..8ed8712 100644
--- a/WebCore/platform/graphics/win/FontCGWin.cpp
+++ b/WebCore/platform/graphics/win/FontCGWin.cpp
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "Font.h"
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "FloatConversion.h"
 #include "GlyphBuffer.h"
 #include "GraphicsContext.h"
@@ -225,7 +225,7 @@ static void drawGDIGlyphs(GraphicsContext* graphicsContext, const SimpleFontData
     } else {
         XFORM xform;
         GetWorldTransform(hdc, &xform);
-        TransformationMatrix hdcTransform(xform.eM11, xform.eM21, xform.eM12, xform.eM22, xform.eDx, xform.eDy);
+        AffineTransform hdcTransform(xform.eM11, xform.eM21, xform.eM12, xform.eM22, xform.eDx, xform.eDy);
         CGAffineTransform initialGlyphTransform = hdcTransform.isInvertible() ? hdcTransform.inverse() : CGAffineTransformIdentity;
         if (font->platformData().syntheticOblique())
             initialGlyphTransform = CGAffineTransformConcat(initialGlyphTransform, CGAffineTransformMake(1, 0, tanf(syntheticObliqueAngle * piFloat / 180.0f), 1, 0, 0));
diff --git a/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp b/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
index 47a51de..84c4ce0 100644
--- a/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
+++ b/WebCore/platform/graphics/win/GraphicsContextCGWin.cpp
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "GraphicsContext.h"
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "Path.h"
 
 #include <CoreGraphics/CGBitmapContext.h>
diff --git a/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp b/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp
index 43d92fb..7387a14 100644
--- a/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp
+++ b/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "GraphicsContext.h"
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "Path.h"
 
 #include <cairo-win32.h>
diff --git a/WebCore/platform/graphics/win/GraphicsContextWin.cpp b/WebCore/platform/graphics/win/GraphicsContextWin.cpp
index 68c12d1..b110145 100644
--- a/WebCore/platform/graphics/win/GraphicsContextWin.cpp
+++ b/WebCore/platform/graphics/win/GraphicsContextWin.cpp
@@ -195,17 +195,7 @@ void GraphicsContextPlatformPrivate::concatCTM(const AffineTransform& transform)
     if (!m_hdc)
         return;
 
-    XFORM xform = TransformationMatrix(transform.a(), transform.b(), transform.c(),
-                                       transform.d(), transform.e(), transform.f());
-    ModifyWorldTransform(m_hdc, &xform, MWT_LEFTMULTIPLY);
-}
-
-void GraphicsContextPlatformPrivate::concatCTM(const TransformationMatrix& transform)
-{
-    if (!m_hdc)
-        return;
-
-    XFORM xform = transform;
+    XFORM xform = transform.toTransformationMatrix();
     ModifyWorldTransform(m_hdc, &xform, MWT_LEFTMULTIPLY);
 }
 
diff --git a/WebCore/platform/graphics/wince/FontWince.cpp b/WebCore/platform/graphics/wince/FontWince.cpp
index d00336b..6c03712 100644
--- a/WebCore/platform/graphics/wince/FontWince.cpp
+++ b/WebCore/platform/graphics/wince/FontWince.cpp
@@ -29,6 +29,7 @@
 #include "config.h"
 #include "Font.h"
 
+#include "AffineTransform.h"
 #include "FloatRect.h"
 #include "FontCache.h"
 #include "FontData.h"
@@ -37,7 +38,6 @@
 #include "GraphicsContext.h"
 #include "IntRect.h"
 #include "NotImplemented.h"
-#include "TransformationMatrix.h"
 #include "WidthIterator.h"
 #include <wtf/MathExtras.h>
 #include <wtf/OwnPtr.h>
diff --git a/WebCore/platform/graphics/wince/GraphicsContextWince.cpp b/WebCore/platform/graphics/wince/GraphicsContextWince.cpp
index 410aeb1..42e94a4 100644
--- a/WebCore/platform/graphics/wince/GraphicsContextWince.cpp
+++ b/WebCore/platform/graphics/wince/GraphicsContextWince.cpp
@@ -31,7 +31,6 @@
 #include "PlatformPathWince.h"
 #include "SharedBitmap.h"
 #include "SimpleFontData.h"
-#include "TransformationMatrix.h"
 #include <wtf/OwnPtr.h>
 
 #include <windows.h>
@@ -169,7 +168,7 @@ public:
     {
     }
 
-    TransformationMatrix m_transform;
+    AffineTransform m_transform;
     float m_opacity;
     Vector<Path> m_paths;
 };
@@ -212,7 +211,7 @@ public:
         m_transform.rotate(rad2deg(radians));
     }
 
-    void  concatCTM(const TransformationMatrix& transform)
+    void  concatCTM(const AffineTransform& transform)
     {
         m_transform = transform * m_transform;
     }
@@ -1149,11 +1148,6 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     m_data->concatCTM(transform);
 }
 
-void GraphicsContext::concatCTM(const TransformationMatrix& transform)
-{
-    m_data->concatCTM(transform);
-}
-
 TransformationMatrix& GraphicsContext::affineTransform()
 {
     return m_data->m_transform;
@@ -1386,7 +1380,7 @@ void GraphicsContext::fillPath()
             if (!dc)
                 continue;
 
-            TransformationMatrix tr = m_data->m_transform;
+            AffineTransform tr = m_data->m_transform;
             tr.translate(transparentDC.toShift().width(), transparentDC.toShift().height());
 
             SelectObject(dc, GetStockObject(NULL_PEN));
@@ -1426,7 +1420,7 @@ void GraphicsContext::strokePath()
             if (!dc)
                 continue;
 
-            TransformationMatrix tr = m_data->m_transform;
+            AffineTransform tr = m_data->m_transform;
             tr.translate(transparentDC.toShift().width(), transparentDC.toShift().height());
 
             SelectObject(dc, GetStockObject(NULL_BRUSH));
@@ -1537,12 +1531,7 @@ void GraphicsContext::fillRect(const FloatRect& r, const Gradient* gradient)
     GradientFill(dc, tv.data(), tv.size(), mesh.data(), mesh.size(), vertical ? GRADIENT_FILL_RECT_V : GRADIENT_FILL_RECT_H);
 }
 
-AffineTransform GraphicsContext::getAffineCTM() const
-{
-    return m_data->m_transform;
-}
-
-TransformationMatrix GraphicsContext::getCTM() const
+AffineTransform GraphicsContext::getCTM() const
 {
     return m_data->m_transform;
 }
@@ -1885,7 +1874,7 @@ void GraphicsContext::drawBitmap(SharedBitmap* bmp, const IntRect& dstRectIn, co
         transparentDC.fillAlphaChannel();
 }
 
-void GraphicsContext::drawBitmapPattern(SharedBitmap* bmp, const FloatRect& tileRectIn, const TransformationMatrix& patternTransform,
+void GraphicsContext::drawBitmapPattern(SharedBitmap* bmp, const FloatRect& tileRectIn, const AffineTransform& patternTransform,
                 const FloatPoint& phase, CompositeOperator op, const FloatRect& destRectIn, const IntSize& origSourceSize)
 {
     if (!m_data->m_opacity)
@@ -1904,7 +1893,7 @@ void GraphicsContext::drawBitmapPattern(SharedBitmap* bmp, const FloatRect& tile
     trRect.move(transparentDC.toShift());
     FloatRect movedDstRect = m_data->m_transform.inverse().mapRect(FloatRect(trRect));
     FloatSize moved(movedDstRect.location() - destRectIn.location());
-    TransformationMatrix transform = m_data->m_transform;
+    AffineTransform transform = m_data->m_transform;
     transform.translate(moved.width(), moved.height());
 
     bmp->drawPattern(dc, transform, tileRectIn, patternTransform, phase, op, destRectIn, origSourceSize);
diff --git a/WebCore/platform/graphics/wince/ImageBufferWince.cpp b/WebCore/platform/graphics/wince/ImageBufferWince.cpp
index 3417f5f..9624e26 100644
--- a/WebCore/platform/graphics/wince/ImageBufferWince.cpp
+++ b/WebCore/platform/graphics/wince/ImageBufferWince.cpp
@@ -42,7 +42,7 @@ public:
     virtual void destroyDecodedData(bool destroyAll = true) {}
     virtual unsigned decodedSize() const { return 0; }
     virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator);
-    virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const TransformationMatrix& patternTransform,
+    virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform,
                              const FloatPoint& phase, CompositeOperator, const FloatRect& destRect);
 
     const ImageBufferData* m_data;
@@ -55,7 +55,7 @@ void BufferedImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const
     m_data->m_bitmap->draw(ctxt, intDstRect, intSrcRect, compositeOp);
 }
 
-void BufferedImage::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRectIn, const TransformationMatrix& patternTransform,
+void BufferedImage::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRectIn, const AffineTransform& patternTransform,
                              const FloatPoint& phase, CompositeOperator op, const FloatRect& destRect)
 {
     m_data->m_bitmap->drawPattern(ctxt, tileRectIn, patternTransform, phase, op, destRect, size());
diff --git a/WebCore/platform/graphics/wince/PathWince.cpp b/WebCore/platform/graphics/wince/PathWince.cpp
index 7589ccb..00d03b1 100644
--- a/WebCore/platform/graphics/wince/PathWince.cpp
+++ b/WebCore/platform/graphics/wince/PathWince.cpp
@@ -20,11 +20,11 @@
 #include "config.h"
 #include "Path.h"
 
+#include "AffineTransform.h"
 #include "FloatRect.h"
 #include "NotImplemented.h"
 #include "PlatformPathWince.h"
 #include "PlatformString.h"
-#include "TransformationMatrix.h"
 #include <wtf/OwnPtr.h>
 
 namespace WebCore {
@@ -133,7 +133,7 @@ void Path::apply(void* info, PathApplierFunction function) const
     m_path->apply(info, function);
 }
 
-void Path::transform(const TransformationMatrix& t)
+void Path::transform(const AffineTransform& t)
 {
     m_path->transform(t);
 }
diff --git a/WebCore/platform/graphics/wince/PlatformPathWince.cpp b/WebCore/platform/graphics/wince/PlatformPathWince.cpp
index 66fad50..cde5461 100644
--- a/WebCore/platform/graphics/wince/PlatformPathWince.cpp
+++ b/WebCore/platform/graphics/wince/PlatformPathWince.cpp
@@ -20,11 +20,11 @@
 #include "config.h"
 #include "PlatformPathWince.h"
 
+#include "AffineTransform.h"
 #include "FloatRect.h"
 #include "GraphicsContext.h"
 #include "Path.h"
 #include "PlatformString.h"
-#include "TransformationMatrix.h"
 #include "WinceGraphicsExtras.h"
 #include <wtf/MathExtras.h>
 #include <wtf/OwnPtr.h>
@@ -232,7 +232,7 @@ static void addArcPoints(PathPolygon& poly, const PlatformPathElement::ArcTo& da
         poly.append(data.m_end);
 }
 
-static void drawPolygons(HDC dc, const Vector<PathPolygon>& polygons, bool fill, const TransformationMatrix* transformation)
+static void drawPolygons(HDC dc, const Vector<PathPolygon>& polygons, bool fill, const AffineTransform* transformation)
 {
     MemoryAllocationCanFail canFail;
     for (Vector<PathPolygon>::const_iterator i = polygons.begin(); i != polygons.end(); ++i) {
@@ -317,7 +317,7 @@ void PathPolygon::move(const FloatSize& offset)
         i->move(offset);
 }
 
-void PathPolygon::transform(const TransformationMatrix& t)
+void PathPolygon::transform(const AffineTransform& t)
 {
     for (Vector<PathPoint>::iterator i = begin(); i < end(); ++i)
         *i = t.mapPoint(*i);
@@ -403,7 +403,7 @@ void PlatformPathElement::move(const FloatSize& offset)
         m_data.m_points[i].move(offset);
 }
 
-void PlatformPathElement::transform(const TransformationMatrix& t)
+void PlatformPathElement::transform(const AffineTransform& t)
 {
     int n = numControlPoints();
     for (int i = 0; i < n; ++i) {
@@ -571,12 +571,12 @@ void PlatformPath::clear()
     m_penLifted = true;
 }
 
-void PlatformPath::strokePath(HDC dc, const TransformationMatrix* transformation) const
+void PlatformPath::strokePath(HDC dc, const AffineTransform* transformation) const
 {
     drawPolygons(dc, m_subpaths, false, transformation);
 }
 
-void PlatformPath::fillPath(HDC dc, const TransformationMatrix* transformation) const
+void PlatformPath::fillPath(HDC dc, const AffineTransform* transformation) const
 {
     HGDIOBJ oldPen = SelectObject(dc, GetStockObject(NULL_PEN));
     drawPolygons(dc, m_subpaths, true, transformation);
@@ -593,7 +593,7 @@ void PlatformPath::translate(const FloatSize& size)
         it->move(size);
 }
 
-void PlatformPath::transform(const TransformationMatrix& t)
+void PlatformPath::transform(const AffineTransform& t)
 {
     for (PlatformPathElements::iterator it(m_elements.begin()); it != m_elements.end(); ++it)
         it->transform(t);
diff --git a/WebCore/platform/graphics/wince/PlatformPathWince.h b/WebCore/platform/graphics/wince/PlatformPathWince.h
index fca00a7..e614cec 100644
--- a/WebCore/platform/graphics/wince/PlatformPathWince.h
+++ b/WebCore/platform/graphics/wince/PlatformPathWince.h
@@ -51,7 +51,7 @@ namespace WebCore {
 
     struct PathPolygon: public Vector<PathPoint> {
         void move(const FloatSize& offset);
-        void transform(const TransformationMatrix& t);
+        void transform(const AffineTransform& t);
         bool contains(const FloatPoint& point) const;
     };
 
@@ -113,7 +113,7 @@ namespace WebCore {
         int numPoints() const;
         int numControlPoints() const;
         void move(const FloatSize& offset);
-        void transform(const TransformationMatrix& t);
+        void transform(const AffineTransform& t);
         PathElementType type() const;
         PlaformPathElementType platformType() const { return m_type; }
         void inflateRectToContainMe(FloatRect& r, const FloatPoint& lastPoint) const;
@@ -141,14 +141,14 @@ namespace WebCore {
         void clear();
         bool isEmpty() const { return m_elements.isEmpty(); }
 
-        void strokePath(HDC, const TransformationMatrix* tr) const;
-        void fillPath(HDC, const TransformationMatrix* tr) const;
+        void strokePath(HDC, const AffineTransform* tr) const;
+        void fillPath(HDC, const AffineTransform* tr) const;
         FloatPoint lastPoint() const { return m_elements.isEmpty() ? FloatPoint(0, 0) : m_elements.last().lastPoint(); }
 
         const FloatRect& boundingRect() const { return m_boundingRect; }
         bool contains(const FloatPoint& point, WindRule rule) const;
         void translate(const FloatSize& size);
-        void transform(const TransformationMatrix& t);
+        void transform(const AffineTransform& t);
 
         void moveTo(const FloatPoint&);
         void addLineTo(const FloatPoint&);
diff --git a/WebCore/platform/graphics/wx/GraphicsContextWx.cpp b/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
index e35334e..8e1a391 100644
--- a/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
+++ b/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
@@ -27,7 +27,6 @@
 #include "GraphicsContext.h"
 
 #include "AffineTransform.h"
-#include "TransformationMatrix.h"
 #include "FloatRect.h"
 #include "Font.h"
 #include "IntRect.h"
@@ -360,18 +359,12 @@ void GraphicsContext::clipToImageBuffer(const FloatRect&, const ImageBuffer*)
     notImplemented();
 }
 
-AffineTransform GraphicsContext::getAffineCTM() const
+AffineTransform GraphicsContext::getCTM() const
 { 
     notImplemented();
     return AffineTransform();
 }
 
-TransformationMatrix GraphicsContext::getCTM() const
-{ 
-    notImplemented();
-    return TransformationMatrix();
-}
-
 void GraphicsContext::translate(float tx, float ty) 
 { 
 #if USE(WXGC)
@@ -487,15 +480,6 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     return;
 }
 
-void GraphicsContext::concatCTM(const TransformationMatrix& transform)
-{
-    if (paintingDisabled())
-        return;
-
-    notImplemented();
-    return;
-}
-
 void GraphicsContext::setPlatformShouldAntialias(bool enable)
 {
     if (paintingDisabled())
diff --git a/WebCore/platform/graphics/wx/ImageWx.cpp b/WebCore/platform/graphics/wx/ImageWx.cpp
index ff60d6f..6ca0f4b 100644
--- a/WebCore/platform/graphics/wx/ImageWx.cpp
+++ b/WebCore/platform/graphics/wx/ImageWx.cpp
@@ -26,13 +26,13 @@
 #include "config.h"
 #include "Image.h"
 
+#include "AffineTransform.h"
 #include "BitmapImage.h"
 #include "FloatConversion.h"
 #include "FloatRect.h"
 #include "GraphicsContext.h"
 #include "ImageObserver.h"
 #include "NotImplemented.h"
-#include "TransformationMatrix.h"
 
 #include <math.h>
 #include <stdio.h>
@@ -176,7 +176,7 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dst, const FloatR
         observer->didDraw(this);
 }
 
-void BitmapImage::drawPattern(GraphicsContext* ctxt, const FloatRect& srcRect, const TransformationMatrix& patternTransform, const FloatPoint& phase, ColorSpace, CompositeOperator, const FloatRect& dstRect)
+void BitmapImage::drawPattern(GraphicsContext* ctxt, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace, CompositeOperator, const FloatRect& dstRect)
 {
     if (!m_source.initialized())
         return;
@@ -261,7 +261,7 @@ void BitmapImage::invalidatePlatformData()
 
 }
 
-void Image::drawPattern(GraphicsContext*, const FloatRect& srcRect, const TransformationMatrix& patternTransform, const FloatPoint& phase, ColorSpace, CompositeOperator, const FloatRect& destRect)
+void Image::drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace, CompositeOperator, const FloatRect& destRect)
 {
     notImplemented();
 }
diff --git a/WebCore/platform/graphics/wx/PathWx.cpp b/WebCore/platform/graphics/wx/PathWx.cpp
index 21693c9..6c115ac 100644
--- a/WebCore/platform/graphics/wx/PathWx.cpp
+++ b/WebCore/platform/graphics/wx/PathWx.cpp
@@ -27,7 +27,6 @@
 #include "Path.h"
 
 #include "AffineTransform.h"
-#include "TransformationMatrix.h"
 #include "FloatPoint.h"
 #include "FloatRect.h"
 #include "NotImplemented.h"
@@ -211,14 +210,6 @@ void Path::transform(const AffineTransform& transform)
 #endif
 }
 
-void Path::transform(const TransformationMatrix& transform) 
-{
-#if USE(WXGC)
-    if (m_path)
-        m_path->Transform(transform);
-#endif
-}
-
 void Path::apply(void* info, PathApplierFunction function) const 
 {
     notImplemented(); 
diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp
index 0c157cf..727788a 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.cpp
+++ b/WebCore/platform/gtk/RenderThemeGtk.cpp
@@ -24,6 +24,7 @@
 #include "config.h"
 #include "RenderThemeGtk.h"
 
+#include "AffineTransform.h"
 #include "CString.h"
 #include "GOwnPtr.h"
 #include "GraphicsContext.h"
@@ -32,7 +33,6 @@
 #include "NotImplemented.h"
 #include "RenderBox.h"
 #include "RenderObject.h"
-#include "TransformationMatrix.h"
 #include "UserAgentStyleSheets.h"
 #include "gtkdrawing.h"
 
@@ -307,7 +307,7 @@ static bool paintMozillaGtkWidget(const RenderThemeGtk* theme, GtkThemeWidgetTyp
         break;
     }
 
-    TransformationMatrix ctm = i.context->getCTM();
+    AffineTransform ctm = i.context->getCTM();
 
     IntPoint pos = ctm.mapPoint(rect.location());
     GdkRectangle gdkRect = IntRect(pos.x(), pos.y(), rect.width(), rect.height());
diff --git a/WebCore/plugins/win/PluginViewWin.cpp b/WebCore/plugins/win/PluginViewWin.cpp
index 2ade663..04fda8e 100644
--- a/WebCore/plugins/win/PluginViewWin.cpp
+++ b/WebCore/plugins/win/PluginViewWin.cpp
@@ -585,9 +585,9 @@ void PluginView::paintWindowedPluginIntoContext(GraphicsContext* context, const
 
     // The plugin expects the DC to be in client coordinates, so we translate
     // the DC to make that so.
-    TransformationMatrix ctm = context->getCTM();
+    AffineTransform ctm = context->getCTM();
     ctm.translate(locationInWindow.x(), locationInWindow.y());
-    XFORM transform = static_cast<XFORM>(ctm);
+    XFORM transform = static_cast<XFORM>(ctm.toTransformationMatrix());
 
     SetWorldTransform(hdc, &transform);
 
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index 4a3fa31..df925ba 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -2899,9 +2899,9 @@ void RenderBox::clearLayoutOverflow()
 
 #if ENABLE(SVG)
 
-TransformationMatrix RenderBox::localTransform() const
+AffineTransform RenderBox::localTransform() const
 {
-    return TransformationMatrix(1, 0, 0, 1, x(), y());
+    return AffineTransform(1, 0, 0, 1, x(), y());
 }
 
 #endif
diff --git a/WebCore/rendering/RenderBox.h b/WebCore/rendering/RenderBox.h
index d91dd1d..961b7fa 100644
--- a/WebCore/rendering/RenderBox.h
+++ b/WebCore/rendering/RenderBox.h
@@ -297,7 +297,7 @@ public:
     virtual bool avoidsFloats() const;
 
 #if ENABLE(SVG)
-    virtual TransformationMatrix localTransform() const;
+    virtual AffineTransform localTransform() const;
 #endif
 
 protected:
diff --git a/WebCore/rendering/RenderBoxModelObject.cpp b/WebCore/rendering/RenderBoxModelObject.cpp
index a68c930..f8bf05e 100644
--- a/WebCore/rendering/RenderBoxModelObject.cpp
+++ b/WebCore/rendering/RenderBoxModelObject.cpp
@@ -50,7 +50,7 @@ static const double cLowQualityTimeThreshold = 0.500; // 500 ms
 
 class RenderBoxModelScaleData : public Noncopyable {
 public:
-    RenderBoxModelScaleData(RenderBoxModelObject* object, const IntSize& size, const TransformationMatrix& transform, double time, bool lowQualityScale)
+    RenderBoxModelScaleData(RenderBoxModelObject* object, const IntSize& size, const AffineTransform& transform, double time, bool lowQualityScale)
         : m_size(size)
         , m_transform(transform)
         , m_lastPaintTime(time)
@@ -71,8 +71,8 @@ public:
     double lastPaintTime() const { return m_lastPaintTime; }
     void setLastPaintTime(double t) { m_lastPaintTime = t; }
     bool useLowQualityScale() const { return m_lowQualityScale; }
-    const TransformationMatrix& transform() const { return m_transform; }
-    void setTransform(const TransformationMatrix& transform) { m_transform = transform; }
+    const AffineTransform& transform() const { return m_transform; }
+    void setTransform(const AffineTransform& transform) { m_transform = transform; }
     void setUseLowQualityScale(bool b)
     {
         m_highQualityRepaintTimer.stop();
@@ -83,7 +83,7 @@ public:
 
 private:
     IntSize m_size;
-    TransformationMatrix m_transform;
+    AffineTransform m_transform;
     double m_lastPaintTime;
     bool m_lowQualityScale;
     Timer<RenderBoxModelObject> m_highQualityRepaintTimer;
@@ -130,7 +130,7 @@ bool RenderBoxModelScaleObserver::shouldPaintBackgroundAtLowQuality(GraphicsCont
     if (gBoxModelObjects)
         data = gBoxModelObjects->get(object);
 
-    const TransformationMatrix& currentTransform = context->getCTM();
+    const AffineTransform& currentTransform = context->getCTM();
     bool contextIsScaled = !currentTransform.isIdentityOrTranslation();
     if (!contextIsScaled && imageSize == size) {
         // There is no scale in effect.  If we had a scale in effect before, we can just delete this data.
@@ -1390,7 +1390,7 @@ void RenderBoxModelObject::paintBoxShadow(GraphicsContext* context, int tx, int
                 // edges if they are not pixel-aligned. Those are avoided by insetting the clipping path
                 // by one pixel.
                 if (hasOpaqueBackground) {
-                    TransformationMatrix currentTransformation = context->getCTM();
+                    AffineTransform currentTransformation = context->getCTM();
                     if (currentTransformation.a() != 1 || (currentTransformation.d() != 1 && currentTransformation.d() != -1)
                             || currentTransformation.b() || currentTransformation.c())
                         rectToClipOut.inflate(-1);
diff --git a/WebCore/rendering/RenderForeignObject.cpp b/WebCore/rendering/RenderForeignObject.cpp
index 6597554..d7532b1 100644
--- a/WebCore/rendering/RenderForeignObject.cpp
+++ b/WebCore/rendering/RenderForeignObject.cpp
@@ -38,10 +38,10 @@ RenderForeignObject::RenderForeignObject(SVGForeignObjectElement* node)
 {
 }
 
-TransformationMatrix RenderForeignObject::translationForAttributes() const
+AffineTransform RenderForeignObject::translationForAttributes() const
 {
     SVGForeignObjectElement* foreign = static_cast<SVGForeignObjectElement*>(node());
-    return TransformationMatrix().translate(foreign->x().value(foreign), foreign->y().value(foreign));
+    return AffineTransform().translate(foreign->x().value(foreign), foreign->y().value(foreign));
 }
 
 void RenderForeignObject::paint(PaintInfo& paintInfo, int, int)
@@ -88,7 +88,7 @@ void RenderForeignObject::computeRectForRepaint(RenderBoxModelObject* repaintCon
     RenderBlock::computeRectForRepaint(repaintContainer, rect, fixed);
 }
 
-const TransformationMatrix& RenderForeignObject::localToParentTransform() const
+const AffineTransform& RenderForeignObject::localToParentTransform() const
 {
     m_localToParentTransform = localTransform() * translationForAttributes();
     return m_localToParentTransform;
diff --git a/WebCore/rendering/RenderForeignObject.h b/WebCore/rendering/RenderForeignObject.h
index 8cb9a55..17057b5 100644
--- a/WebCore/rendering/RenderForeignObject.h
+++ b/WebCore/rendering/RenderForeignObject.h
@@ -23,7 +23,7 @@
 #define RenderForeignObject_h
 #if ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT)
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "RenderSVGBlock.h"
 
 namespace WebCore {
@@ -38,7 +38,7 @@ public:
 
     virtual void paint(PaintInfo&, int parentX, int parentY);
 
-    virtual const TransformationMatrix& localToParentTransform() const;
+    virtual const AffineTransform& localToParentTransform() const;
 
     virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false);
     virtual bool requiresLayer() const { return false; }
@@ -55,12 +55,12 @@ public:
     virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed , bool useTransforms, TransformState& transformState) const;
 
  private:
-    TransformationMatrix translationForAttributes() const;
+    AffineTransform translationForAttributes() const;
 
-    virtual TransformationMatrix localTransform() const { return m_localTransform; }
+    virtual AffineTransform localTransform() const { return m_localTransform; }
 
-    TransformationMatrix m_localTransform;
-    mutable TransformationMatrix m_localToParentTransform;
+    AffineTransform m_localTransform;
+    mutable AffineTransform m_localToParentTransform;
 };
 
 } // namespace WebCore
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index 5d4d3bd..5833f31 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -2236,7 +2236,7 @@ void RenderLayer::paintLayer(RenderLayer* rootLayer, GraphicsContext* p,
         
         // Apply the transform.
         p->save();
-        p->concatCTM(transform);
+        p->concatCTM(transform.toAffineTransform());
 
         // Now do a paint with the root layer shifted to be us.
         paintLayer(this, p, transform.inverse().mapRect(paintDirtyRect), paintBehavior, paintingRoot, overlapTestRequests, paintFlags | PaintLayerAppliedTransform);
diff --git a/WebCore/rendering/RenderObject.cpp b/WebCore/rendering/RenderObject.cpp
index 62d5a20..db0fda0 100644
--- a/WebCore/rendering/RenderObject.cpp
+++ b/WebCore/rendering/RenderObject.cpp
@@ -2520,15 +2520,15 @@ FloatRect RenderObject::repaintRectInLocalCoordinates() const
     return FloatRect();
 }
 
-TransformationMatrix RenderObject::localTransform() const
+AffineTransform RenderObject::localTransform() const
 {
-    static const TransformationMatrix identity;
+    static const AffineTransform identity;
     return identity;
 }
 
-const TransformationMatrix& RenderObject::localToParentTransform() const
+const AffineTransform& RenderObject::localToParentTransform() const
 {
-    static const TransformationMatrix identity;
+    static const AffineTransform identity;
     return identity;
 }
 
diff --git a/WebCore/rendering/RenderObject.h b/WebCore/rendering/RenderObject.h
index e38c0c5..fe15456 100644
--- a/WebCore/rendering/RenderObject.h
+++ b/WebCore/rendering/RenderObject.h
@@ -26,6 +26,7 @@
 #ifndef RenderObject_h
 #define RenderObject_h
 
+#include "AffineTransform.h"
 #include "CachedResourceClient.h"
 #include "Document.h"
 #include "Element.h"
@@ -347,11 +348,11 @@ public:
     // FIXME: This accessor is deprecated and mostly around for SVGRenderTreeAsText.
     // This only returns the transform="" value from the element
     // most callsites want localToParentTransform() instead.
-    virtual TransformationMatrix localTransform() const;
+    virtual AffineTransform localTransform() const;
 
     // Returns the full transform mapping from local coordinates to local coords for the parent SVG renderer
     // This includes any viewport transforms and x/y offsets as well as the transform="" value off the element.
-    virtual const TransformationMatrix& localToParentTransform() const;
+    virtual const AffineTransform& localToParentTransform() const;
 
     // SVG uses FloatPoint precise hit testing, and passes the point in parent
     // coordinates instead of in repaint container coordinates.  Eventually the
diff --git a/WebCore/rendering/RenderPath.cpp b/WebCore/rendering/RenderPath.cpp
index f497dcf..7dbde42 100644
--- a/WebCore/rendering/RenderPath.cpp
+++ b/WebCore/rendering/RenderPath.cpp
@@ -69,12 +69,12 @@ RenderPath::RenderPath(SVGStyledTransformableElement* node)
 {
 }
 
-const TransformationMatrix& RenderPath::localToParentTransform() const
+const AffineTransform& RenderPath::localToParentTransform() const
 {
     return m_localTransform;
 }
 
-TransformationMatrix RenderPath::localTransform() const
+AffineTransform RenderPath::localTransform() const
 {
     return m_localTransform;
 }
diff --git a/WebCore/rendering/RenderPath.h b/WebCore/rendering/RenderPath.h
index be4c2dc..d530f3c 100644
--- a/WebCore/rendering/RenderPath.h
+++ b/WebCore/rendering/RenderPath.h
@@ -25,10 +25,10 @@
 #define RenderPath_h
 
 #if ENABLE(SVG)
+#include "AffineTransform.h"
 #include "FloatRect.h"
 #include "RenderSVGModelObject.h"
 #include "SVGMarkerLayoutInfo.h"
-#include "TransformationMatrix.h"
 
 namespace WebCore {
 
@@ -52,7 +52,7 @@ private:
     virtual FloatRect markerBoundingBox() const;
     virtual FloatRect repaintRectInLocalCoordinates() const;
 
-    virtual const TransformationMatrix& localToParentTransform() const;
+    virtual const AffineTransform& localToParentTransform() const;
 
     void setPath(const Path&);
 
@@ -68,7 +68,7 @@ private:
     void calculateMarkerBoundsIfNeeded() const;
 
 private:
-    virtual TransformationMatrix localTransform() const;
+    virtual AffineTransform localTransform() const;
 
     mutable Path m_path;
     mutable FloatRect m_cachedLocalFillBBox;
@@ -76,7 +76,7 @@ private:
     mutable FloatRect m_cachedLocalRepaintRect;
     mutable FloatRect m_cachedLocalMarkerBBox;
     mutable SVGMarkerLayoutInfo m_markerLayoutInfo;
-    TransformationMatrix m_localTransform;
+    AffineTransform m_localTransform;
 };
 
 inline RenderPath* toRenderPath(RenderObject* object)
diff --git a/WebCore/rendering/RenderSVGImage.h b/WebCore/rendering/RenderSVGImage.h
index 0558aed..82ed69f 100644
--- a/WebCore/rendering/RenderSVGImage.h
+++ b/WebCore/rendering/RenderSVGImage.h
@@ -24,11 +24,11 @@
 #define RenderSVGImage_h
 
 #if ENABLE(SVG)
+#include "AffineTransform.h"
 #include "FloatRect.h"
 #include "RenderImage.h"
 #include "SVGPreserveAspectRatio.h"
 #include "SVGRenderSupport.h"
-#include "TransformationMatrix.h"
 
 namespace WebCore {
 
@@ -43,7 +43,7 @@ namespace WebCore {
         virtual const char* renderName() const { return "RenderSVGImage"; }
         virtual bool isSVGImage() const { return true; }
 
-        virtual const TransformationMatrix& localToParentTransform() const { return m_localTransform; }
+        virtual const AffineTransform& localToParentTransform() const { return m_localTransform; }
 
         virtual FloatRect objectBoundingBox() const;
         virtual FloatRect strokeBoundingBox() const { return m_localBounds; }
@@ -68,9 +68,9 @@ namespace WebCore {
         virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
         virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
 
-        virtual TransformationMatrix localTransform() const { return m_localTransform; }
+        virtual AffineTransform localTransform() const { return m_localTransform; }
 
-        TransformationMatrix m_localTransform;
+        AffineTransform m_localTransform;
         FloatRect m_localBounds;
         mutable FloatRect m_cachedLocalRepaintRect;
     };
diff --git a/WebCore/rendering/RenderSVGRoot.cpp b/WebCore/rendering/RenderSVGRoot.cpp
index 7997494..75dd5dc 100644
--- a/WebCore/rendering/RenderSVGRoot.cpp
+++ b/WebCore/rendering/RenderSVGRoot.cpp
@@ -192,9 +192,9 @@ void RenderSVGRoot::calcViewport()
 
 // RenderBox methods will expect coordinates w/o any transforms in coordinates
 // relative to our borderBox origin.  This method gives us exactly that.
-TransformationMatrix RenderSVGRoot::localToBorderBoxTransform() const
+AffineTransform RenderSVGRoot::localToBorderBoxTransform() const
 {
-    TransformationMatrix ctm;
+    AffineTransform ctm;
     IntSize borderAndPadding = borderOriginToContentBox();
     ctm.translate(borderAndPadding.width(), borderAndPadding.height());
     SVGSVGElement* svg = static_cast<SVGSVGElement*>(node());
@@ -213,18 +213,18 @@ IntSize RenderSVGRoot::borderOriginToContentBox() const
     return IntSize(borderLeft() + paddingLeft(), borderTop() + paddingTop());
 }
 
-TransformationMatrix RenderSVGRoot::localToRepaintContainerTransform(const IntPoint& parentOriginInContainer) const
+AffineTransform RenderSVGRoot::localToRepaintContainerTransform(const IntPoint& parentOriginInContainer) const
 {
-    TransformationMatrix parentToContainer;
+    AffineTransform parentToContainer;
     parentToContainer.translate(parentOriginInContainer.x(), parentOriginInContainer.y());
     return localToParentTransform() * parentToContainer;
 }
 
-const TransformationMatrix& RenderSVGRoot::localToParentTransform() const
+const AffineTransform& RenderSVGRoot::localToParentTransform() const
 {
     IntSize parentToBorderBoxOffset = parentOriginToBorderBox();
 
-    TransformationMatrix borderBoxOriginToParentOrigin;
+    AffineTransform borderBoxOriginToParentOrigin;
     borderBoxOriginToParentOrigin.translate(parentToBorderBoxOffset.width(), parentToBorderBoxOffset.height());
 
     m_localToParentTransform = localToBorderBoxTransform() * borderBoxOriginToParentOrigin;
@@ -244,9 +244,9 @@ FloatRect RenderSVGRoot::repaintRectInLocalCoordinates() const
     return repaintRect;
 }
 
-TransformationMatrix RenderSVGRoot::localTransform() const
+AffineTransform RenderSVGRoot::localTransform() const
 {
-    return TransformationMatrix();
+    return AffineTransform();
 }
 
 void RenderSVGRoot::computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect& repaintRect, bool fixed)
diff --git a/WebCore/rendering/RenderSVGRoot.h b/WebCore/rendering/RenderSVGRoot.h
index 7f42738..12ceb82 100644
--- a/WebCore/rendering/RenderSVGRoot.h
+++ b/WebCore/rendering/RenderSVGRoot.h
@@ -31,7 +31,7 @@
 namespace WebCore {
 
 class SVGStyledElement;
-class TransformationMatrix;
+class AffineTransform;
 
 class RenderSVGRoot : public RenderBox, SVGRenderBase {
 public:
@@ -54,7 +54,7 @@ private:
     virtual void layout();
     virtual void paint(PaintInfo&, int parentX, int parentY);
 
-    virtual const TransformationMatrix& localToParentTransform() const;
+    virtual const AffineTransform& localToParentTransform() const;
 
     bool fillContains(const FloatPoint&) const;
     bool strokeContains(const FloatPoint&) const;
@@ -64,7 +64,7 @@ private:
     virtual FloatRect repaintRectInLocalCoordinates() const;
 
     // FIXME: This override should be removed.
-    virtual TransformationMatrix localTransform() const;
+    virtual AffineTransform localTransform() const;
 
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
 
@@ -78,12 +78,12 @@ private:
 
     IntSize parentOriginToBorderBox() const;
     IntSize borderOriginToContentBox() const;
-    TransformationMatrix localToRepaintContainerTransform(const IntPoint& parentOriginInContainer) const;
-    TransformationMatrix localToBorderBoxTransform() const;
+    AffineTransform localToRepaintContainerTransform(const IntPoint& parentOriginInContainer) const;
+    AffineTransform localToBorderBoxTransform() const;
 
     RenderObjectChildList m_children;
     FloatSize m_viewportSize;
-    mutable TransformationMatrix m_localToParentTransform;
+    mutable AffineTransform m_localToParentTransform;
 };
 
 inline RenderSVGRoot* toRenderSVGRoot(RenderObject* object)
diff --git a/WebCore/rendering/RenderSVGText.h b/WebCore/rendering/RenderSVGText.h
index d001d1c..9ae96a0 100644
--- a/WebCore/rendering/RenderSVGText.h
+++ b/WebCore/rendering/RenderSVGText.h
@@ -26,7 +26,7 @@
 
 #if ENABLE(SVG)
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "RenderSVGBlock.h"
 
 namespace WebCore {
@@ -44,7 +44,7 @@ private:
 
     virtual bool isSVGText() const { return true; }
 
-    virtual const TransformationMatrix& localToParentTransform() const { return m_localTransform; }
+    virtual const AffineTransform& localToParentTransform() const { return m_localTransform; }
 
     virtual void paint(PaintInfo&, int tx, int ty);
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
@@ -66,11 +66,11 @@ private:
     virtual FloatRect repaintRectInLocalCoordinates() const;
 
     // FIXME: This can be removed when localTransform() is removed from RenderObject
-    virtual TransformationMatrix localTransform() const { return m_localTransform; }
+    virtual AffineTransform localTransform() const { return m_localTransform; }
 
     virtual RootInlineBox* createRootInlineBox();
 
-    TransformationMatrix m_localTransform;
+    AffineTransform m_localTransform;
 };
 
 }
diff --git a/WebCore/rendering/RenderSVGTransformableContainer.cpp b/WebCore/rendering/RenderSVGTransformableContainer.cpp
index 050e1bd..4bec7a7 100644
--- a/WebCore/rendering/RenderSVGTransformableContainer.cpp
+++ b/WebCore/rendering/RenderSVGTransformableContainer.cpp
@@ -34,12 +34,12 @@ RenderSVGTransformableContainer::RenderSVGTransformableContainer(SVGStyledTransf
 {
 }
 
-const TransformationMatrix& RenderSVGTransformableContainer::localToParentTransform() const
+const AffineTransform& RenderSVGTransformableContainer::localToParentTransform() const
 {
     return m_localTransform;
 }
 
-TransformationMatrix RenderSVGTransformableContainer::localTransform() const
+AffineTransform RenderSVGTransformableContainer::localTransform() const
 {
     return m_localTransform;
 }
@@ -54,7 +54,7 @@ void RenderSVGTransformableContainer::calculateLocalTransform()
     if (translation.width() == 0 && translation.height() == 0)
         return;
 
-    m_localTransform.translateRight(translation.width(), translation.height());
+    m_localTransform.translate(translation.width(), translation.height());
 }
 
 }
diff --git a/WebCore/rendering/RenderSVGTransformableContainer.h b/WebCore/rendering/RenderSVGTransformableContainer.h
index 43e4001..1de0b19 100644
--- a/WebCore/rendering/RenderSVGTransformableContainer.h
+++ b/WebCore/rendering/RenderSVGTransformableContainer.h
@@ -31,14 +31,14 @@ namespace WebCore {
     public:
         RenderSVGTransformableContainer(SVGStyledTransformableElement*);
 
-        virtual const TransformationMatrix& localToParentTransform() const;
+        virtual const AffineTransform& localToParentTransform() const;
 
     private:
         virtual void calculateLocalTransform();
         // FIXME: This can be made non-virtual once SVGRenderTreeAsText stops using localTransform()
-        virtual TransformationMatrix localTransform() const;
+        virtual AffineTransform localTransform() const;
 
-        TransformationMatrix m_localTransform;
+        AffineTransform m_localTransform;
     };
 }
 
diff --git a/WebCore/rendering/RenderSVGViewportContainer.cpp b/WebCore/rendering/RenderSVGViewportContainer.cpp
index 277a0ad..f81ab48 100644
--- a/WebCore/rendering/RenderSVGViewportContainer.cpp
+++ b/WebCore/rendering/RenderSVGViewportContainer.cpp
@@ -38,7 +38,7 @@ RenderSVGViewportContainer::RenderSVGViewportContainer(SVGStyledElement* node)
 {
 }
 
-FloatRect RenderSVGViewportContainer::markerBoundaries(const TransformationMatrix& markerTransformation) const
+FloatRect RenderSVGViewportContainer::markerBoundaries(const AffineTransform& markerTransformation) const
 {
     FloatRect coordinates = repaintRectInLocalCoordinates();
 
@@ -48,12 +48,12 @@ FloatRect RenderSVGViewportContainer::markerBoundaries(const TransformationMatri
     return markerTransformation.mapRect(coordinates);
 }
 
-TransformationMatrix RenderSVGViewportContainer::markerContentTransformation(const TransformationMatrix& contentTransformation, const FloatPoint& origin, float strokeWidth) const
+AffineTransform RenderSVGViewportContainer::markerContentTransformation(const AffineTransform& contentTransformation, const FloatPoint& origin, float strokeWidth) const
 {
     // The 'origin' coordinate maps to SVGs refX/refY, given in coordinates relative to the viewport established by the marker
     FloatPoint mappedOrigin = viewportTransform().mapPoint(origin);
 
-    TransformationMatrix transformation = contentTransformation;
+    AffineTransform transformation = contentTransformation;
     if (strokeWidth != -1)
         transformation.scaleNonUniform(strokeWidth, strokeWidth);
 
@@ -92,7 +92,7 @@ void RenderSVGViewportContainer::calcViewport()
     }
 }
 
-TransformationMatrix RenderSVGViewportContainer::viewportTransform() const
+AffineTransform RenderSVGViewportContainer::viewportTransform() const
 {
     if (node()->hasTagName(SVGNames::svgTag)) {
         SVGSVGElement* svg = static_cast<SVGSVGElement*>(node());
@@ -102,12 +102,12 @@ TransformationMatrix RenderSVGViewportContainer::viewportTransform() const
         return marker->viewBoxToViewTransform(m_viewport.width(), m_viewport.height());
     }
 
-    return TransformationMatrix();
+    return AffineTransform();
 }
 
-const TransformationMatrix& RenderSVGViewportContainer::localToParentTransform() const
+const AffineTransform& RenderSVGViewportContainer::localToParentTransform() const
 {
-    TransformationMatrix viewportTranslation;
+    AffineTransform viewportTranslation;
     viewportTranslation.translate(m_viewport.x(), m_viewport.y());
     m_localToParentTransform = viewportTransform() * viewportTranslation;
     return m_localToParentTransform;
diff --git a/WebCore/rendering/RenderSVGViewportContainer.h b/WebCore/rendering/RenderSVGViewportContainer.h
index 7b9e375..c4043ec 100644
--- a/WebCore/rendering/RenderSVGViewportContainer.h
+++ b/WebCore/rendering/RenderSVGViewportContainer.h
@@ -35,18 +35,18 @@ public:
     RenderSVGViewportContainer(SVGStyledElement*);
 
     // Calculates marker boundaries, mapped to the target element's coordinate space
-    FloatRect markerBoundaries(const TransformationMatrix& markerTransformation) const;
+    FloatRect markerBoundaries(const AffineTransform& markerTransformation) const;
 
     // Generates a transformation matrix usable to render marker content. Handles scaling the marker content
     // acording to SVGs markerUnits="strokeWidth" concept, when a strokeWidth value != -1 is passed in.
-    TransformationMatrix markerContentTransformation(const TransformationMatrix& contentTransformation, const FloatPoint& origin, float strokeWidth = -1) const;
+    AffineTransform markerContentTransformation(const AffineTransform& contentTransformation, const FloatPoint& origin, float strokeWidth = -1) const;
 
 private:
     virtual bool isSVGContainer() const { return true; }
     virtual const char* renderName() const { return "RenderSVGViewportContainer"; }
 
-    TransformationMatrix viewportTransform() const;
-    virtual const TransformationMatrix& localToParentTransform() const;
+    AffineTransform viewportTransform() const;
+    virtual const AffineTransform& localToParentTransform() const;
 
     virtual void calcViewport();
 
@@ -54,7 +54,7 @@ private:
     virtual bool pointIsInsideViewportClip(const FloatPoint& pointInParent);
 
     FloatRect m_viewport;
-    mutable TransformationMatrix m_localToParentTransform;
+    mutable AffineTransform m_localToParentTransform;
 };
   
 inline RenderSVGViewportContainer* toRenderSVGViewportContainer(RenderObject* object)
diff --git a/WebCore/rendering/SVGCharacterLayoutInfo.cpp b/WebCore/rendering/SVGCharacterLayoutInfo.cpp
index 900e0ba..7e85672 100644
--- a/WebCore/rendering/SVGCharacterLayoutInfo.cpp
+++ b/WebCore/rendering/SVGCharacterLayoutInfo.cpp
@@ -512,9 +512,9 @@ bool SVGChar::isHidden() const
     return pathData && pathData->hidden;
 }
 
-TransformationMatrix SVGChar::characterTransform() const
+AffineTransform SVGChar::characterTransform() const
 {
-    TransformationMatrix ctm;
+    AffineTransform ctm;
 
     // Rotate character around angle, and possibly scale.
     ctm.translate(x, y);
diff --git a/WebCore/rendering/SVGCharacterLayoutInfo.h b/WebCore/rendering/SVGCharacterLayoutInfo.h
index fb29110..3c69ac2 100644
--- a/WebCore/rendering/SVGCharacterLayoutInfo.h
+++ b/WebCore/rendering/SVGCharacterLayoutInfo.h
@@ -24,15 +24,15 @@
 #define SVGCharacterLayoutInfo_h
 
 #if ENABLE(SVG)
+#include "AffineTransform.h"
+#include "SVGRenderStyle.h"
+#include "SVGTextContentElement.h"
+
 #include <wtf/Assertions.h>
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
-#include <wtf/Vector.h>
-
-#include "TransformationMatrix.h"
 #include <wtf/RefCounted.h>
-#include "SVGRenderStyle.h"
-#include "SVGTextContentElement.h"
+#include <wtf/Vector.h>
 
 namespace WebCore {
 
@@ -234,7 +234,7 @@ struct SVGChar {
 
     // Helper methods
     bool isHidden() const;
-    TransformationMatrix characterTransform() const;
+    AffineTransform characterTransform() const;
 };
 
 struct SVGInlineBoxCharacterRange {
@@ -275,7 +275,7 @@ struct SVGTextChunk {
     // textLength & lengthAdjust support
     float textLength;
     ELengthAdjust lengthAdjust;
-    TransformationMatrix ctm;
+    AffineTransform ctm;
 
     // status flags
     bool isVerticalText : 1;
@@ -291,7 +291,7 @@ struct SVGTextChunk {
 struct SVGTextChunkWalkerBase {
     virtual ~SVGTextChunkWalkerBase() { }
 
-    virtual void operator()(SVGInlineTextBox* textBox, int startOffset, const TransformationMatrix& chunkCtm,
+    virtual void operator()(SVGInlineTextBox* textBox, int startOffset, const AffineTransform& chunkCtm,
                             const Vector<SVGChar>::iterator& start, const Vector<SVGChar>::iterator& end) = 0;
 
     // Followings methods are only used for painting text chunks
@@ -309,7 +309,7 @@ struct SVGTextChunkWalker : public SVGTextChunkWalkerBase {
 public:
     typedef void (CallbackClass::*SVGTextChunkWalkerCallback)(SVGInlineTextBox* textBox,
                                                               int startOffset,
-                                                              const TransformationMatrix& chunkCtm,
+                                                              const AffineTransform& chunkCtm,
                                                               const Vector<SVGChar>::iterator& start,
                                                               const Vector<SVGChar>::iterator& end);
 
@@ -343,7 +343,7 @@ public:
         ASSERT(walker);
     }
 
-    virtual void operator()(SVGInlineTextBox* textBox, int startOffset, const TransformationMatrix& chunkCtm,
+    virtual void operator()(SVGInlineTextBox* textBox, int startOffset, const AffineTransform& chunkCtm,
                             const Vector<SVGChar>::iterator& start, const Vector<SVGChar>::iterator& end)
     {
         (*m_object.*m_walkerCallback)(textBox, startOffset, chunkCtm, start, end);
diff --git a/WebCore/rendering/SVGInlineTextBox.cpp b/WebCore/rendering/SVGInlineTextBox.cpp
index 2f56e68..3e2a0f8 100644
--- a/WebCore/rendering/SVGInlineTextBox.cpp
+++ b/WebCore/rendering/SVGInlineTextBox.cpp
@@ -108,9 +108,7 @@ FloatRect SVGInlineTextBox::calculateGlyphBoundaries(RenderStyle* style, int off
     FloatRect glyphRect(x1, y1, x2 - x1, y2 - y1);
 
     // Take per-character transformations into account
-    TransformationMatrix ctm = svgChar.characterTransform();
-    if (!ctm.isIdentity())
-        glyphRect = ctm.mapRect(glyphRect);
+    glyphRect = svgChar.characterTransform().mapRect(glyphRect);
 
     return glyphRect;
 }
@@ -126,7 +124,7 @@ struct SVGInlineTextBoxClosestCharacterToPositionWalker {
     {
     }
 
-    void chunkPortionCallback(SVGInlineTextBox* textBox, int startOffset, const TransformationMatrix& chunkCtm,
+    void chunkPortionCallback(SVGInlineTextBox* textBox, int startOffset, const AffineTransform& chunkCtm,
                               const Vector<SVGChar>::iterator& start, const Vector<SVGChar>::iterator& end)
     {
         RenderStyle* style = textBox->textRenderer()->style();
@@ -193,7 +191,7 @@ struct SVGInlineTextBoxSelectionRectWalker {
     {
     }
 
-    void chunkPortionCallback(SVGInlineTextBox* textBox, int startOffset, const TransformationMatrix& chunkCtm,
+    void chunkPortionCallback(SVGInlineTextBox* textBox, int startOffset, const AffineTransform& chunkCtm,
                               const Vector<SVGChar>::iterator& start, const Vector<SVGChar>::iterator& end)
     {
         RenderStyle* style = textBox->textRenderer()->style();
@@ -350,7 +348,7 @@ void SVGInlineTextBox::paintCharacters(RenderObject::PaintInfo& paintInfo, int t
     RenderStyle* styleToUse = text->style(isFirstLineStyle());
     const Font& font = styleToUse->font();
 
-    TransformationMatrix ctm = svgChar.characterTransform();
+    AffineTransform ctm = svgChar.characterTransform();
     if (!ctm.isIdentity())
         paintInfo.context->concatCTM(ctm);
 
@@ -523,7 +521,7 @@ void SVGInlineTextBox::paintDecoration(ETextDecoration decoration, GraphicsConte
     context->save();
     context->beginPath();
 
-    TransformationMatrix ctm = svgChar.characterTransform();
+    AffineTransform ctm = svgChar.characterTransform();
     if (!ctm.isIdentity())
         context->concatCTM(ctm);
 
diff --git a/WebCore/rendering/SVGMarkerLayoutInfo.h b/WebCore/rendering/SVGMarkerLayoutInfo.h
index 1dfeee9..517c993 100644
--- a/WebCore/rendering/SVGMarkerLayoutInfo.h
+++ b/WebCore/rendering/SVGMarkerLayoutInfo.h
@@ -31,7 +31,7 @@ class Path;
 class SVGResourceMarker;
 
 struct MarkerLayout {
-    MarkerLayout(SVGResourceMarker* markerObj = 0, TransformationMatrix matrixObj = TransformationMatrix())
+    MarkerLayout(SVGResourceMarker* markerObj = 0, AffineTransform matrixObj = AffineTransform())
         : marker(markerObj)
         , matrix(matrixObj)
     {
@@ -39,7 +39,7 @@ struct MarkerLayout {
     }
 
     SVGResourceMarker* marker;
-    TransformationMatrix matrix;
+    AffineTransform matrix;
 };
 
 class SVGMarkerLayoutInfo : public Noncopyable {
diff --git a/WebCore/rendering/SVGRenderSupport.cpp b/WebCore/rendering/SVGRenderSupport.cpp
index 2c80735..996ce81 100644
--- a/WebCore/rendering/SVGRenderSupport.cpp
+++ b/WebCore/rendering/SVGRenderSupport.cpp
@@ -27,6 +27,7 @@
 #if ENABLE(SVG)
 #include "SVGRenderSupport.h"
 
+#include "AffineTransform.h"
 #include "ImageBuffer.h"
 #include "RenderObject.h"
 #include "RenderSVGContainer.h"
@@ -37,7 +38,6 @@
 #include "SVGStyledElement.h"
 #include "SVGURIReference.h"
 #include "TransformState.h"
-#include "TransformationMatrix.h"
 #include <wtf/UnusedParam.h>
 
 namespace WebCore {
@@ -299,7 +299,7 @@ FloatRect SVGRenderBase::maskerBoundingBoxForRenderer(const RenderObject* object
     return FloatRect();
 }
 
-void applyTransformToPaintInfo(RenderObject::PaintInfo& paintInfo, const TransformationMatrix& localToAncestorTransform)
+void applyTransformToPaintInfo(RenderObject::PaintInfo& paintInfo, const AffineTransform& localToAncestorTransform)
 {
     if (localToAncestorTransform.isIdentity())
         return;
diff --git a/WebCore/rendering/SVGRenderSupport.h b/WebCore/rendering/SVGRenderSupport.h
index 0e01705..cf75365 100644
--- a/WebCore/rendering/SVGRenderSupport.h
+++ b/WebCore/rendering/SVGRenderSupport.h
@@ -75,7 +75,7 @@ namespace WebCore {
 
     // FIXME: This should move to RenderObject or PaintInfo
     // Used for transforming the GraphicsContext and damage rect before passing PaintInfo to child renderers.
-    void applyTransformToPaintInfo(RenderObject::PaintInfo&, const TransformationMatrix& localToChildTransform);
+    void applyTransformToPaintInfo(RenderObject::PaintInfo&, const AffineTransform& localToChildTransform);
 
     // This offers a way to render parts of a WebKit rendering tree into a ImageBuffer.
     void renderSubtreeToImage(ImageBuffer*, RenderObject*);
diff --git a/WebCore/rendering/SVGRenderTreeAsText.cpp b/WebCore/rendering/SVGRenderTreeAsText.cpp
index 913cad7..aff718f 100644
--- a/WebCore/rendering/SVGRenderTreeAsText.cpp
+++ b/WebCore/rendering/SVGRenderTreeAsText.cpp
@@ -179,7 +179,7 @@ TextStream& operator<<(TextStream& ts, const FloatSize& s)
     return ts;
 }
 
-TextStream& operator<<(TextStream& ts, const TransformationMatrix& transform)
+TextStream& operator<<(TextStream& ts, const AffineTransform& transform)
 {
     if (transform.isIdentity())
         ts << "identity";
diff --git a/WebCore/rendering/SVGRenderTreeAsText.h b/WebCore/rendering/SVGRenderTreeAsText.h
index bee4f36..13fc475 100644
--- a/WebCore/rendering/SVGRenderTreeAsText.h
+++ b/WebCore/rendering/SVGRenderTreeAsText.h
@@ -45,7 +45,7 @@ namespace WebCore {
     class RenderPath;
     class RenderSVGRoot;
     class RenderText;
-    class TransformationMatrix;
+    class AffineTransform;
 
 // functions used by the main RenderTreeAsText code
 void write(TextStream&, const RenderPath&, int indent);
@@ -58,7 +58,7 @@ void writeSVGText(TextStream&, const RenderBlock&, int indent);
 void writeRenderResources(TextStream&, Node* parent);
 
 // helper operators defined used in various classes to dump the render tree.
-TextStream& operator<<(TextStream&, const TransformationMatrix&);
+TextStream& operator<<(TextStream&, const AffineTransform&);
 TextStream& operator<<(TextStream&, const IntRect&);
 TextStream& operator<<(TextStream&, const Color&);
 TextStream& operator<<(TextStream&, const IntPoint&);
diff --git a/WebCore/rendering/SVGRootInlineBox.cpp b/WebCore/rendering/SVGRootInlineBox.cpp
index 92e7654..69e1b16 100644
--- a/WebCore/rendering/SVGRootInlineBox.cpp
+++ b/WebCore/rendering/SVGRootInlineBox.cpp
@@ -507,7 +507,7 @@ struct SVGRootInlineBoxPaintWalker {
         }
     }
 
-    void chunkPortionCallback(SVGInlineTextBox* textBox, int startOffset, const TransformationMatrix& chunkCtm,
+    void chunkPortionCallback(SVGInlineTextBox* textBox, int startOffset, const AffineTransform& chunkCtm,
                               const Vector<SVGChar>::iterator& start, const Vector<SVGChar>::iterator& end)
     {
         RenderText* text = textBox->textRenderer();
@@ -865,7 +865,7 @@ static void applyTextLengthCorrectionToTextChunk(SVGTextChunk& chunk)
         SVGChar& firstChar = *(chunk.start);
 
         // Assure we apply the chunk scaling in the right origin
-        TransformationMatrix newChunkCtm;
+        AffineTransform newChunkCtm;
         newChunkCtm.translate(firstChar.x, firstChar.y);
         newChunkCtm = chunk.ctm * newChunkCtm;
         newChunkCtm.translate(-firstChar.x, -firstChar.y);
@@ -978,7 +978,6 @@ void SVGRootInlineBox::buildLayoutInformation(InlineFlowBox* start, SVGCharacter
                 Vector<SVGTextChunk>::iterator it = tempChunks.begin();
                 Vector<SVGTextChunk>::iterator end = tempChunks.end();
 
-                TransformationMatrix ctm;
                 float computedLength = 0.0f;
  
                 for (; it != end; ++it) {
diff --git a/WebCore/rendering/TransformState.cpp b/WebCore/rendering/TransformState.cpp
index 700831b..ecc614e 100644
--- a/WebCore/rendering/TransformState.cpp
+++ b/WebCore/rendering/TransformState.cpp
@@ -49,6 +49,12 @@ void TransformState::move(int x, int y, TransformAccumulation accumulate)
     m_accumulatingTransform = accumulate == AccumulateTransform;
 }
 
+// FIXME: We transform AffineTransform to TransformationMatrix. This is rather inefficient.
+void TransformState::applyTransform(const AffineTransform& transformFromContainer, TransformAccumulation accumulate)
+{
+    applyTransform(transformFromContainer.toTransformationMatrix(), accumulate);
+}
+
 void TransformState::applyTransform(const TransformationMatrix& transformFromContainer, TransformAccumulation accumulate)
 {
     // If we have an accumulated transform from last time, multiply in this transform
diff --git a/WebCore/rendering/TransformState.h b/WebCore/rendering/TransformState.h
index d2c962a..0b4ca46 100644
--- a/WebCore/rendering/TransformState.h
+++ b/WebCore/rendering/TransformState.h
@@ -26,6 +26,7 @@
 #ifndef TransformState_h
 #define TransformState_h
 
+#include "AffineTransform.h"
 #include "FloatPoint.h"
 #include "FloatQuad.h"
 #include "IntSize.h"
@@ -59,6 +60,7 @@ public:
     }
     
     void move(int x, int y, TransformAccumulation = FlattenTransform);
+    void applyTransform(const AffineTransform& transformFromContainer, TransformAccumulation = FlattenTransform);
     void applyTransform(const TransformationMatrix& transformFromContainer, TransformAccumulation = FlattenTransform);
     void flatten();
 
diff --git a/WebCore/svg/GradientAttributes.h b/WebCore/svg/GradientAttributes.h
index 941e816..ba513b8 100644
--- a/WebCore/svg/GradientAttributes.h
+++ b/WebCore/svg/GradientAttributes.h
@@ -36,12 +36,12 @@ namespace WebCore {
 
         GradientSpreadMethod spreadMethod() const { return m_spreadMethod; }
         bool boundingBoxMode() const { return m_boundingBoxMode; }
-        TransformationMatrix gradientTransform() const { return m_gradientTransform; }
+        AffineTransform gradientTransform() const { return m_gradientTransform; }
         const Vector<SVGGradientStop>& stops() const { return m_stops; }
 
         void setSpreadMethod(GradientSpreadMethod value) { m_spreadMethod = value; m_spreadMethodSet = true; }
         void setBoundingBoxMode(bool value) { m_boundingBoxMode = value; m_boundingBoxModeSet = true; }
-        void setGradientTransform(const TransformationMatrix& value) { m_gradientTransform = value; m_gradientTransformSet = true; }
+        void setGradientTransform(const AffineTransform& value) { m_gradientTransform = value; m_gradientTransformSet = true; }
         void setStops(const Vector<SVGGradientStop>& value) { m_stops = value; m_stopsSet = true; } 
 
         bool hasSpreadMethod() const { return m_spreadMethodSet; }
@@ -53,7 +53,7 @@ namespace WebCore {
         // Properties
         GradientSpreadMethod m_spreadMethod;
         bool m_boundingBoxMode;
-        TransformationMatrix m_gradientTransform;
+        AffineTransform m_gradientTransform;
         Vector<SVGGradientStop> m_stops;
 
         // Property states
diff --git a/WebCore/svg/PatternAttributes.h b/WebCore/svg/PatternAttributes.h
index 36d1765..2d25763 100644
--- a/WebCore/svg/PatternAttributes.h
+++ b/WebCore/svg/PatternAttributes.h
@@ -49,7 +49,7 @@ namespace WebCore {
         SVGLength height() const { return m_height; }
         bool boundingBoxMode() const { return m_boundingBoxMode; }
         bool boundingBoxModeContent() const { return m_boundingBoxModeContent; }
-        TransformationMatrix patternTransform() const { return m_patternTransform; }
+        AffineTransform patternTransform() const { return m_patternTransform; }
         const SVGPatternElement* patternContentElement() const { return m_patternContentElement; }
 
         void setX(const SVGLength& value) { m_x = value; m_xSet = true; }
@@ -58,7 +58,7 @@ namespace WebCore {
         void setHeight(const SVGLength& value) { m_height = value; m_heightSet = true; }
         void setBoundingBoxMode(bool value) { m_boundingBoxMode = value; m_boundingBoxModeSet = true; }
         void setBoundingBoxModeContent(bool value) { m_boundingBoxModeContent = value; m_boundingBoxModeContentSet = true; }
-        void setPatternTransform(const TransformationMatrix& value) { m_patternTransform = value; m_patternTransformSet = true; }
+        void setPatternTransform(const AffineTransform& value) { m_patternTransform = value; m_patternTransformSet = true; }
         void setPatternContentElement(const SVGPatternElement* value) { m_patternContentElement = value; m_patternContentElementSet = true; }
 
         bool hasX() const { return m_xSet; }
@@ -78,7 +78,7 @@ namespace WebCore {
         SVGLength m_height;
         bool m_boundingBoxMode;
         bool m_boundingBoxModeContent;
-        TransformationMatrix m_patternTransform;
+        AffineTransform m_patternTransform;
         const SVGPatternElement* m_patternContentElement;
 
         // Property states
diff --git a/WebCore/svg/SVGAnimateMotionElement.cpp b/WebCore/svg/SVGAnimateMotionElement.cpp
index bd6de49..9355436 100644
--- a/WebCore/svg/SVGAnimateMotionElement.cpp
+++ b/WebCore/svg/SVGAnimateMotionElement.cpp
@@ -149,7 +149,7 @@ void SVGAnimateMotionElement::resetToBaseValue(const String&)
     if (!hasValidTarget())
         return;
     SVGElement* target = targetElement();
-    TransformationMatrix* transform = target->supplementalTransform();
+    AffineTransform* transform = target->supplementalTransform();
     if (!transform)
         return;
     transform->makeIdentity();
@@ -176,7 +176,7 @@ void SVGAnimateMotionElement::calculateAnimatedValue(float percentage, unsigned,
     SVGElement* target = targetElement();
     if (!target)
         return;
-    TransformationMatrix* transform = target->supplementalTransform();
+    AffineTransform* transform = target->supplementalTransform();
     if (!transform)
         return;
     
@@ -220,8 +220,8 @@ void SVGAnimateMotionElement::applyResultsToTarget()
     for (HashSet<SVGElementInstance*>::const_iterator it = instances.begin(); it != end; ++it) {
         SVGElement* shadowTreeElement = (*it)->shadowTreeElement();
         ASSERT(shadowTreeElement);
-        TransformationMatrix* transform = shadowTreeElement->supplementalTransform();
-        TransformationMatrix* t = targetElement->supplementalTransform();
+        AffineTransform* transform = shadowTreeElement->supplementalTransform();
+        AffineTransform* t = targetElement->supplementalTransform();
         transform->setMatrix(t->a(), t->b(), t->c(), t->d(), t->e(), t->f());
         if (shadowTreeElement->renderer())
             shadowTreeElement->renderer()->setNeedsLayout(true);
diff --git a/WebCore/svg/SVGAnimateMotionElement.h b/WebCore/svg/SVGAnimateMotionElement.h
index 910ef17..f401220 100644
--- a/WebCore/svg/SVGAnimateMotionElement.h
+++ b/WebCore/svg/SVGAnimateMotionElement.h
@@ -23,10 +23,9 @@
 #ifndef SVGAnimateMotionElement_h
 #define SVGAnimateMotionElement_h
 #if ENABLE(SVG_ANIMATION)
-
-#include "SVGAnimationElement.h"
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "Path.h"
+#include "SVGAnimationElement.h"
 
 namespace WebCore {
             
diff --git a/WebCore/svg/SVGAnimateTransformElement.cpp b/WebCore/svg/SVGAnimateTransformElement.cpp
index ac6eac9..8e077a4 100644
--- a/WebCore/svg/SVGAnimateTransformElement.cpp
+++ b/WebCore/svg/SVGAnimateTransformElement.cpp
@@ -27,6 +27,7 @@
 #if ENABLE(SVG) && ENABLE(SVG_ANIMATION)
 #include "SVGAnimateTransformElement.h"
 
+#include "AffineTransform.h"
 #include "MappedAttribute.h"
 #include "RenderObject.h"
 #include "SVGAngle.h"
@@ -38,7 +39,6 @@
 #include "SVGTransform.h"
 #include "SVGTransformList.h"
 #include "SVGUseElement.h"
-#include "TransformationMatrix.h"
 #include <math.h>
 #include <wtf/MathExtras.h>
 
diff --git a/WebCore/svg/SVGAnimateTransformElement.h b/WebCore/svg/SVGAnimateTransformElement.h
index c9139c4..c93e694 100644
--- a/WebCore/svg/SVGAnimateTransformElement.h
+++ b/WebCore/svg/SVGAnimateTransformElement.h
@@ -30,34 +30,34 @@
 
 namespace WebCore {
 
-    class TransformationMatrix;
+class AffineTransform;
 
-    class SVGAnimateTransformElement : public SVGAnimationElement {
-    public:
-        SVGAnimateTransformElement(const QualifiedName&, Document*);
-        virtual ~SVGAnimateTransformElement();
-        
-        virtual bool hasValidTarget() const;
+class SVGAnimateTransformElement : public SVGAnimationElement {
+public:
+    SVGAnimateTransformElement(const QualifiedName&, Document*);
+    virtual ~SVGAnimateTransformElement();
+    
+    virtual bool hasValidTarget() const;
 
-        virtual void parseMappedAttribute(MappedAttribute*);
+    virtual void parseMappedAttribute(MappedAttribute*);
 
-    private:
-        virtual void resetToBaseValue(const String&);
-        virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
-        virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
-        virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSMILElement* resultElement);
-        virtual void applyResultsToTarget();
-        virtual float calculateDistance(const String& fromString, const String& toString);
+private:
+    virtual void resetToBaseValue(const String&);
+    virtual bool calculateFromAndToValues(const String& fromString, const String& toString);
+    virtual bool calculateFromAndByValues(const String& fromString, const String& byString);
+    virtual void calculateAnimatedValue(float percentage, unsigned repeat, SVGSMILElement* resultElement);
+    virtual void applyResultsToTarget();
+    virtual float calculateDistance(const String& fromString, const String& toString);
 
-        SVGTransform parseTransformValue(const String&) const;
-        
-        SVGTransform::SVGTransformType m_type;
-        
-        unsigned m_baseIndexInTransformList;
+    SVGTransform parseTransformValue(const String&) const;
+    
+    SVGTransform::SVGTransformType m_type;
+    
+    unsigned m_baseIndexInTransformList;
 
-        SVGTransform m_toTransform;
-        SVGTransform m_fromTransform;
-    };
+    SVGTransform m_toTransform;
+    SVGTransform m_fromTransform;
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGElement.h b/WebCore/svg/SVGElement.h
index 679c265..88d7412 100644
--- a/WebCore/svg/SVGElement.h
+++ b/WebCore/svg/SVGElement.h
@@ -34,7 +34,7 @@ namespace WebCore {
     class SVGElementInstance;
     class SVGElementRareData;
     class SVGSVGElement;
-    class TransformationMatrix;
+    class AffineTransform;
 
     class SVGElement : public StyledElement {
     public:
@@ -70,7 +70,7 @@ namespace WebCore {
 
         void sendSVGLoadEventIfPossible(bool sendParentLoadEvents = false);
         
-        virtual TransformationMatrix* supplementalTransform() { return 0; }
+        virtual AffineTransform* supplementalTransform() { return 0; }
 
         void setSynchronizedSVGAttributes(bool value) { m_areSVGAttributesValid = value; }
 
diff --git a/WebCore/svg/SVGFitToViewBox.cpp b/WebCore/svg/SVGFitToViewBox.cpp
index 80dead6..64c978f 100644
--- a/WebCore/svg/SVGFitToViewBox.cpp
+++ b/WebCore/svg/SVGFitToViewBox.cpp
@@ -23,6 +23,7 @@
 #if ENABLE(SVG)
 #include "SVGFitToViewBox.h"
 
+#include "AffineTransform.h"
 #include "Attr.h"
 #include "Document.h"
 #include "FloatRect.h"
@@ -31,7 +32,6 @@
 #include "SVGParserUtilities.h"
 #include "SVGPreserveAspectRatio.h"
 #include "StringImpl.h"
-#include "TransformationMatrix.h"
 
 namespace WebCore {
 
@@ -75,10 +75,10 @@ bool SVGFitToViewBox::parseViewBox(Document* doc, const UChar*& c, const UChar*
     return true;
 }
 
-TransformationMatrix SVGFitToViewBox::viewBoxToViewTransform(const FloatRect& viewBoxRect, const SVGPreserveAspectRatio& preserveAspectRatio, float viewWidth, float viewHeight)
+AffineTransform SVGFitToViewBox::viewBoxToViewTransform(const FloatRect& viewBoxRect, const SVGPreserveAspectRatio& preserveAspectRatio, float viewWidth, float viewHeight)
 {
     if (!viewBoxRect.width() || !viewBoxRect.height())
-        return TransformationMatrix();
+        return AffineTransform();
 
     return preserveAspectRatio.getCTM(viewBoxRect.x(), viewBoxRect.y(), viewBoxRect.width(), viewBoxRect.height(), 0, 0, viewWidth, viewHeight);
 }
diff --git a/WebCore/svg/SVGFitToViewBox.h b/WebCore/svg/SVGFitToViewBox.h
index 20fb7c1..ef7e54b 100644
--- a/WebCore/svg/SVGFitToViewBox.h
+++ b/WebCore/svg/SVGFitToViewBox.h
@@ -27,22 +27,22 @@
 
 namespace WebCore {
 
-    class TransformationMatrix;
+class AffineTransform;
 
-    class SVGFitToViewBox {
-    public:
-        SVGFitToViewBox();
-        virtual ~SVGFitToViewBox();
+class SVGFitToViewBox {
+public:
+    SVGFitToViewBox();
+    virtual ~SVGFitToViewBox();
 
-        bool parseViewBox(Document*, const UChar*& start, const UChar* end, float& x, float& y, float& w, float& h, bool validate = true);
-        static TransformationMatrix viewBoxToViewTransform(const FloatRect& viewBoxRect, const SVGPreserveAspectRatio&, float viewWidth, float viewHeight);
+    bool parseViewBox(Document*, const UChar*& start, const UChar* end, float& x, float& y, float& w, float& h, bool validate = true);
+    static AffineTransform viewBoxToViewTransform(const FloatRect& viewBoxRect, const SVGPreserveAspectRatio&, float viewWidth, float viewHeight);
 
-        bool parseMappedAttribute(Document*, MappedAttribute*);
-        bool isKnownAttribute(const QualifiedName&);
+    bool parseMappedAttribute(Document*, MappedAttribute*);
+    bool isKnownAttribute(const QualifiedName&);
 
-        virtual void setViewBoxBaseValue(SVGAnimatedPropertyTraits<FloatRect>::PassType) = 0;
-        virtual void setPreserveAspectRatioBaseValue(SVGAnimatedPropertyTraits<SVGPreserveAspectRatio>::PassType) = 0;
-    };
+    virtual void setViewBoxBaseValue(SVGAnimatedPropertyTraits<FloatRect>::PassType) = 0;
+    virtual void setPreserveAspectRatioBaseValue(SVGAnimatedPropertyTraits<SVGPreserveAspectRatio>::PassType) = 0;
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGLocatable.cpp b/WebCore/svg/SVGLocatable.cpp
index 00acc2a..39cf589 100644
--- a/WebCore/svg/SVGLocatable.cpp
+++ b/WebCore/svg/SVGLocatable.cpp
@@ -24,7 +24,7 @@
 
 #include "SVGLocatable.h"
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "RenderPath.h"
 #include "SVGException.h"
 #include "SVGSVGElement.h"
@@ -82,16 +82,16 @@ FloatRect SVGLocatable::getBBox(const SVGElement* element)
     return element->renderer()->objectBoundingBox();
 }
 
-TransformationMatrix SVGLocatable::getCTM(const SVGElement* element)
+AffineTransform SVGLocatable::getCTM(const SVGElement* element)
 {
     ASSERT(element);
-    TransformationMatrix ctm;
+    AffineTransform ctm;
 
     Node* parent = element->parentNode();
     if (parent && parent->isSVGElement()) {
         SVGElement* parentElement = static_cast<SVGElement*>(parent);
         if (parentElement && parentElement->isStyledLocatable()) {
-            TransformationMatrix parentCTM = static_cast<SVGStyledLocatableElement*>(parentElement)->getCTM();
+            AffineTransform parentCTM = static_cast<SVGStyledLocatableElement*>(parentElement)->getCTM();
             ctm = parentCTM * ctm;
         }
     }
@@ -99,16 +99,16 @@ TransformationMatrix SVGLocatable::getCTM(const SVGElement* element)
     return ctm;
 }
 
-TransformationMatrix SVGLocatable::getScreenCTM(const SVGElement* element)
+AffineTransform SVGLocatable::getScreenCTM(const SVGElement* element)
 {
     ASSERT(element);
-    TransformationMatrix ctm;
+    AffineTransform ctm;
 
     Node* parent = element->parentNode();
     if (parent && parent->isSVGElement()) {
         SVGElement* parentElement = static_cast<SVGElement*>(parent);
         if (parentElement && parentElement->isStyledLocatable()) {
-            TransformationMatrix parentCTM = static_cast<SVGStyledLocatableElement*>(parentElement)->getScreenCTM();
+            AffineTransform parentCTM = static_cast<SVGStyledLocatableElement*>(parentElement)->getScreenCTM();
             ctm = parentCTM * ctm;
         }
     }
@@ -116,12 +116,12 @@ TransformationMatrix SVGLocatable::getScreenCTM(const SVGElement* element)
     return ctm;
 }
 
-TransformationMatrix SVGLocatable::getTransformToElement(SVGElement* target, ExceptionCode& ec) const
+AffineTransform SVGLocatable::getTransformToElement(SVGElement* target, ExceptionCode& ec) const
 {
-    TransformationMatrix ctm = getCTM();
+    AffineTransform ctm = getCTM();
 
     if (target && target->isStyledLocatable()) {
-        TransformationMatrix targetCTM = static_cast<SVGStyledLocatableElement*>(target)->getCTM();
+        AffineTransform targetCTM = static_cast<SVGStyledLocatableElement*>(target)->getCTM();
         if (!targetCTM.isInvertible()) {
             ec = SVGException::SVG_MATRIX_NOT_INVERTABLE;
             return ctm;
diff --git a/WebCore/svg/SVGLocatable.h b/WebCore/svg/SVGLocatable.h
index 180dae5..b7d8d30 100644
--- a/WebCore/svg/SVGLocatable.h
+++ b/WebCore/svg/SVGLocatable.h
@@ -27,32 +27,32 @@
 
 namespace WebCore {
 
-    class TransformationMatrix;
-    class FloatRect;
-    class SVGElement;
-
-    class SVGLocatable {
-    public:
-        SVGLocatable();
-        virtual ~SVGLocatable();
-
-        // 'SVGLocatable' functions
-        virtual SVGElement* nearestViewportElement() const = 0;
-        virtual SVGElement* farthestViewportElement() const = 0;
-
-        virtual FloatRect getBBox() const = 0;
-        virtual TransformationMatrix getCTM() const = 0;
-        virtual TransformationMatrix getScreenCTM() const = 0;
-        TransformationMatrix getTransformToElement(SVGElement*, ExceptionCode&) const;
-
-        static SVGElement* nearestViewportElement(const SVGElement*);
-        static SVGElement* farthestViewportElement(const SVGElement*);
-
-    protected:
-        static FloatRect getBBox(const SVGElement*);
-        static TransformationMatrix getCTM(const SVGElement*);
-        static TransformationMatrix getScreenCTM(const SVGElement*);
-    };
+class AffineTransform;
+class FloatRect;
+class SVGElement;
+
+class SVGLocatable {
+public:
+    SVGLocatable();
+    virtual ~SVGLocatable();
+
+    // 'SVGLocatable' functions
+    virtual SVGElement* nearestViewportElement() const = 0;
+    virtual SVGElement* farthestViewportElement() const = 0;
+
+    virtual FloatRect getBBox() const = 0;
+    virtual AffineTransform getCTM() const = 0;
+    virtual AffineTransform getScreenCTM() const = 0;
+    AffineTransform getTransformToElement(SVGElement*, ExceptionCode&) const;
+
+    static SVGElement* nearestViewportElement(const SVGElement*);
+    static SVGElement* farthestViewportElement(const SVGElement*);
+
+protected:
+    static FloatRect getBBox(const SVGElement*);
+    static AffineTransform getCTM(const SVGElement*);
+    static AffineTransform getScreenCTM(const SVGElement*);
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGMarkerElement.cpp b/WebCore/svg/SVGMarkerElement.cpp
index ca57fa6..7716af7 100644
--- a/WebCore/svg/SVGMarkerElement.cpp
+++ b/WebCore/svg/SVGMarkerElement.cpp
@@ -56,7 +56,7 @@ SVGMarkerElement::~SVGMarkerElement()
 {
 }
 
-TransformationMatrix SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float viewHeight) const
+AffineTransform SVGMarkerElement::viewBoxToViewTransform(float viewWidth, float viewHeight) const
 {
     return SVGFitToViewBox::viewBoxToViewTransform(viewBox(), preserveAspectRatio(), viewWidth, viewHeight);
 }
diff --git a/WebCore/svg/SVGMarkerElement.h b/WebCore/svg/SVGMarkerElement.h
index 8a25cba..fd5a13b 100644
--- a/WebCore/svg/SVGMarkerElement.h
+++ b/WebCore/svg/SVGMarkerElement.h
@@ -57,7 +57,7 @@ namespace WebCore {
         SVGMarkerElement(const QualifiedName&, Document*);
         virtual ~SVGMarkerElement();
 
-        TransformationMatrix viewBoxToViewTransform(float viewWidth, float viewHeight) const;
+        AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
 
         void setOrientToAuto();
         void setOrientToAngle(const SVGAngle&);
diff --git a/WebCore/svg/SVGMaskElement.cpp b/WebCore/svg/SVGMaskElement.cpp
index 75f3dcd..dc330be 100644
--- a/WebCore/svg/SVGMaskElement.cpp
+++ b/WebCore/svg/SVGMaskElement.cpp
@@ -198,7 +198,7 @@ PassOwnPtr<ImageBuffer> SVGMaskElement::drawMaskerContent(const RenderObject* ob
         repaintRect.unite(node->renderer()->localToParentTransform().mapRect(node->renderer()->repaintRectInLocalCoordinates()));
     }
 
-    TransformationMatrix contextTransform;
+    AffineTransform contextTransform;
     // We need to scale repaintRect for objectBoundingBox to get the drawing area.
     if (maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
         contextTransform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
diff --git a/WebCore/svg/SVGMatrix.idl b/WebCore/svg/SVGMatrix.idl
index d064aa9..1b91d53 100644
--- a/WebCore/svg/SVGMatrix.idl
+++ b/WebCore/svg/SVGMatrix.idl
@@ -22,9 +22,9 @@
 
 module svg {
 
-    interface [Conditional=SVG, PODType=TransformationMatrix] SVGMatrix {
+    interface [Conditional=SVG, PODType=AffineTransform] SVGMatrix {
         // FIXME: these attributes should all be floats but since we implement
-        // TransformationMatrix with doubles setting these as doubles makes more sense.
+        // AffineTransform with doubles setting these as doubles makes more sense.
         attribute double a;
         attribute double b;
         attribute double c;
diff --git a/WebCore/svg/SVGPatternElement.cpp b/WebCore/svg/SVGPatternElement.cpp
index b3c040b..a79d011 100644
--- a/WebCore/svg/SVGPatternElement.cpp
+++ b/WebCore/svg/SVGPatternElement.cpp
@@ -23,6 +23,7 @@
 #if ENABLE(SVG)
 #include "SVGPatternElement.h"
 
+#include "AffineTransform.h"
 #include "Document.h"
 #include "FloatConversion.h"
 #include "GraphicsContext.h"
@@ -39,7 +40,6 @@
 #include "SVGTransformList.h"
 #include "SVGTransformable.h"
 #include "SVGUnitTypes.h"
-#include "TransformationMatrix.h"
 #include <math.h>
 #include <wtf/MathExtras.h>
 #include <wtf/OwnPtr.h>
@@ -235,7 +235,7 @@ void SVGPatternElement::buildPattern(const FloatRect& targetRect) const
         }
     }
 
-    TransformationMatrix viewBoxCTM = viewBoxToViewTransform(viewBox(), preserveAspectRatio(), patternBoundaries.width(), patternBoundaries.height()); 
+    AffineTransform viewBoxCTM = viewBoxToViewTransform(viewBox(), preserveAspectRatio(), patternBoundaries.width(), patternBoundaries.height()); 
     FloatRect patternBoundariesIncludingOverflow = patternBoundaries;
 
     // Apply objectBoundingBoxMode fixup for patternContentUnits, if viewBox is not set.
diff --git a/WebCore/svg/SVGPreserveAspectRatio.cpp b/WebCore/svg/SVGPreserveAspectRatio.cpp
index be07a26..6853a14 100644
--- a/WebCore/svg/SVGPreserveAspectRatio.cpp
+++ b/WebCore/svg/SVGPreserveAspectRatio.cpp
@@ -24,7 +24,7 @@
 #if ENABLE(SVG)
 #include "SVGPreserveAspectRatio.h"
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "SVGParserUtilities.h"
 #include "SVGSVGElement.h"
 
@@ -235,12 +235,12 @@ void SVGPreserveAspectRatio::transformRect(FloatRect& destRect, FloatRect& srcRe
     }
 }
 
-TransformationMatrix SVGPreserveAspectRatio::getCTM(double logicX, double logicY,
+AffineTransform SVGPreserveAspectRatio::getCTM(double logicX, double logicY,
                                                double logicWidth, double logicHeight,
                                                double /*physX*/, double /*physY*/,
                                                double physWidth, double physHeight) const
 {
-    TransformationMatrix temp;
+    AffineTransform temp;
 
     if (align() == SVG_PRESERVEASPECTRATIO_UNKNOWN)
         return temp;
diff --git a/WebCore/svg/SVGPreserveAspectRatio.h b/WebCore/svg/SVGPreserveAspectRatio.h
index 2be053c..8ee8d07 100644
--- a/WebCore/svg/SVGPreserveAspectRatio.h
+++ b/WebCore/svg/SVGPreserveAspectRatio.h
@@ -29,7 +29,7 @@
 namespace WebCore {
 
     class String;
-    class TransformationMatrix;
+    class AffineTransform;
 
     class SVGPreserveAspectRatio {
     public:
@@ -64,7 +64,7 @@ namespace WebCore {
 
         void transformRect(FloatRect& destRect, FloatRect& srcRect);
         
-        TransformationMatrix getCTM(double logicX, double logicY,
+        AffineTransform getCTM(double logicX, double logicY,
                                double logicWidth, double logicHeight,
                                double physX, double physY,
                                double physWidth, double physHeight) const;
diff --git a/WebCore/svg/SVGSVGElement.cpp b/WebCore/svg/SVGSVGElement.cpp
index eed8b54..cfe1615 100644
--- a/WebCore/svg/SVGSVGElement.cpp
+++ b/WebCore/svg/SVGSVGElement.cpp
@@ -24,6 +24,7 @@
 #if ENABLE(SVG)
 #include "SVGSVGElement.h"
 
+#include "AffineTransform.h"
 #include "CSSHelper.h"
 #include "CSSPropertyNames.h"
 #include "Document.h"
@@ -48,7 +49,6 @@
 #include "SVGZoomEvent.h"
 #include "ScriptEventListener.h"
 #include "SelectionController.h"
-#include "TransformationMatrix.h"
 #include <wtf/StdLibExtras.h>
 
 namespace WebCore {
@@ -119,7 +119,7 @@ FloatRect SVGSVGElement::viewport() const
     }
     float w = width().value(this);
     float h = height().value(this);
-    TransformationMatrix viewBox = viewBoxToViewTransform(w, h);
+    AffineTransform viewBox = viewBoxToViewTransform(w, h);
     double wDouble = w;
     double hDouble = h;
     viewBox.map(_x, _y, _x, _y);
@@ -414,9 +414,9 @@ FloatPoint SVGSVGElement::createSVGPoint()
     return FloatPoint();
 }
 
-TransformationMatrix SVGSVGElement::createSVGMatrix()
+AffineTransform SVGSVGElement::createSVGMatrix()
 {
-    return TransformationMatrix();
+    return AffineTransform();
 }
 
 FloatRect SVGSVGElement::createSVGRect()
@@ -429,26 +429,26 @@ SVGTransform SVGSVGElement::createSVGTransform()
     return SVGTransform();
 }
 
-SVGTransform SVGSVGElement::createSVGTransformFromMatrix(const TransformationMatrix& matrix)
+SVGTransform SVGSVGElement::createSVGTransformFromMatrix(const AffineTransform& matrix)
 {
     return SVGTransform(matrix);
 }
 
-TransformationMatrix SVGSVGElement::getCTM() const
+AffineTransform SVGSVGElement::getCTM() const
 {
-    TransformationMatrix mat;
+    AffineTransform mat;
     if (!isOutermostSVG())
         mat.translate(x().value(this), y().value(this));
 
     if (attributes()->getAttributeItem(SVGNames::viewBoxAttr)) {
-        TransformationMatrix viewBox = viewBoxToViewTransform(width().value(this), height().value(this));
+        AffineTransform viewBox = viewBoxToViewTransform(width().value(this), height().value(this));
         mat = viewBox * mat;
     }
 
     return mat;
 }
 
-TransformationMatrix SVGSVGElement::getScreenCTM() const
+AffineTransform SVGSVGElement::getScreenCTM() const
 {
     document()->updateLayoutIgnorePendingStylesheets();
     FloatPoint rootLocation;
@@ -464,11 +464,11 @@ TransformationMatrix SVGSVGElement::getScreenCTM() const
             rootLocation.move(x().value(this), y().value(this));
     }
     
-    TransformationMatrix mat = SVGStyledLocatableElement::getScreenCTM();
+    AffineTransform mat = SVGStyledLocatableElement::getScreenCTM();
     mat.translate(rootLocation.x(), rootLocation.y());
 
     if (attributes()->getAttributeItem(SVGNames::viewBoxAttr)) {
-        TransformationMatrix viewBox = viewBoxToViewTransform(width().value(this), height().value(this));
+        AffineTransform viewBox = viewBoxToViewTransform(width().value(this), height().value(this));
         mat = viewBox * mat;
     }
 
@@ -538,7 +538,7 @@ bool SVGSVGElement::isOutermostSVG() const
     return !parentNode()->isSVGElement();
 }
 
-TransformationMatrix SVGSVGElement::viewBoxToViewTransform(float viewWidth, float viewHeight) const
+AffineTransform SVGSVGElement::viewBoxToViewTransform(float viewWidth, float viewHeight) const
 {
     FloatRect viewBoxRect;
     if (useCurrentView()) {
@@ -547,7 +547,7 @@ TransformationMatrix SVGSVGElement::viewBoxToViewTransform(float viewWidth, floa
     } else
         viewBoxRect = viewBox();
 
-    TransformationMatrix ctm = SVGFitToViewBox::viewBoxToViewTransform(viewBoxRect, preserveAspectRatio(), viewWidth, viewHeight);
+    AffineTransform ctm = SVGFitToViewBox::viewBoxToViewTransform(viewBoxRect, preserveAspectRatio(), viewWidth, viewHeight);
     if (useCurrentView() && currentView())
         return currentView()->transform()->concatenate().matrix() * ctm;
 
diff --git a/WebCore/svg/SVGSVGElement.h b/WebCore/svg/SVGSVGElement.h
index 3d6f109..dde6534 100644
--- a/WebCore/svg/SVGSVGElement.h
+++ b/WebCore/svg/SVGSVGElement.h
@@ -107,16 +107,16 @@ namespace WebCore {
         static SVGLength createSVGLength();
         static SVGAngle createSVGAngle();
         static FloatPoint createSVGPoint();
-        static TransformationMatrix createSVGMatrix();
+        static AffineTransform createSVGMatrix();
         static FloatRect createSVGRect();
         static SVGTransform createSVGTransform();
-        static SVGTransform createSVGTransformFromMatrix(const TransformationMatrix&);
+        static SVGTransform createSVGTransformFromMatrix(const AffineTransform&);
 
         virtual void parseMappedAttribute(MappedAttribute*);
 
         // 'virtual SVGLocatable' functions
-        virtual TransformationMatrix getCTM() const;
-        virtual TransformationMatrix getScreenCTM() const;
+        virtual AffineTransform getCTM() const;
+        virtual AffineTransform getScreenCTM() const;
 
         virtual bool rendererIsNeeded(RenderStyle* style) { return StyledElement::rendererIsNeeded(style); }
         virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
@@ -127,7 +127,7 @@ namespace WebCore {
         virtual void svgAttributeChanged(const QualifiedName&);
         virtual void synchronizeProperty(const QualifiedName&);
 
-        TransformationMatrix viewBoxToViewTransform(float viewWidth, float viewHeight) const;
+        AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
 
         void inheritViewAttributes(SVGViewElement*);
 
diff --git a/WebCore/svg/SVGStyledLocatableElement.cpp b/WebCore/svg/SVGStyledLocatableElement.cpp
index a48082c..79b1fe3 100644
--- a/WebCore/svg/SVGStyledLocatableElement.cpp
+++ b/WebCore/svg/SVGStyledLocatableElement.cpp
@@ -23,9 +23,9 @@
 #if ENABLE(SVG)
 #include "SVGStyledLocatableElement.h"
 
+#include "AffineTransform.h"
 #include "RenderPath.h"
 #include "SVGElement.h"
-#include "TransformationMatrix.h"
 #include "SVGSVGElement.h"
 
 namespace WebCore {
@@ -55,12 +55,12 @@ FloatRect SVGStyledLocatableElement::getBBox() const
     return SVGLocatable::getBBox(this);
 }
 
-TransformationMatrix SVGStyledLocatableElement::getCTM() const
+AffineTransform SVGStyledLocatableElement::getCTM() const
 {
     return SVGLocatable::getCTM(this);
 }
 
-TransformationMatrix SVGStyledLocatableElement::getScreenCTM() const
+AffineTransform SVGStyledLocatableElement::getScreenCTM() const
 {
     return SVGLocatable::getScreenCTM(this);
 }
diff --git a/WebCore/svg/SVGStyledLocatableElement.h b/WebCore/svg/SVGStyledLocatableElement.h
index 3902c73..5e835bd 100644
--- a/WebCore/svg/SVGStyledLocatableElement.h
+++ b/WebCore/svg/SVGStyledLocatableElement.h
@@ -41,8 +41,8 @@ namespace WebCore {
         virtual SVGElement* farthestViewportElement() const;
 
         virtual FloatRect getBBox() const;
-        virtual TransformationMatrix getCTM() const;
-        virtual TransformationMatrix getScreenCTM() const;
+        virtual AffineTransform getCTM() const;
+        virtual AffineTransform getScreenCTM() const;
     };
 
 } // namespace WebCore
diff --git a/WebCore/svg/SVGStyledTransformableElement.cpp b/WebCore/svg/SVGStyledTransformableElement.cpp
index 6815914..a71cd16 100644
--- a/WebCore/svg/SVGStyledTransformableElement.cpp
+++ b/WebCore/svg/SVGStyledTransformableElement.cpp
@@ -23,13 +23,13 @@
 #if ENABLE(SVG)
 #include "SVGStyledTransformableElement.h"
 
+#include "AffineTransform.h"
 #include "Attr.h"
 #include "MappedAttribute.h"
 #include "RenderPath.h"
 #include "SVGDocument.h"
 #include "SVGStyledElement.h"
 #include "SVGTransformList.h"
-#include "TransformationMatrix.h"
 
 namespace WebCore {
 
@@ -44,25 +44,25 @@ SVGStyledTransformableElement::~SVGStyledTransformableElement()
 {
 }
 
-TransformationMatrix SVGStyledTransformableElement::getCTM() const
+AffineTransform SVGStyledTransformableElement::getCTM() const
 {
     return SVGTransformable::getCTM(this);
 }
 
-TransformationMatrix SVGStyledTransformableElement::getScreenCTM() const
+AffineTransform SVGStyledTransformableElement::getScreenCTM() const
 {
     return SVGTransformable::getScreenCTM(this);
 }
 
-TransformationMatrix SVGStyledTransformableElement::animatedLocalTransform() const
+AffineTransform SVGStyledTransformableElement::animatedLocalTransform() const
 {
     return m_supplementalTransform ? transform()->concatenate().matrix() * *m_supplementalTransform : transform()->concatenate().matrix();
 }
     
-TransformationMatrix* SVGStyledTransformableElement::supplementalTransform()
+AffineTransform* SVGStyledTransformableElement::supplementalTransform()
 {
     if (!m_supplementalTransform)
-        m_supplementalTransform.set(new TransformationMatrix());
+        m_supplementalTransform.set(new AffineTransform());
     return m_supplementalTransform.get();
 }
 
diff --git a/WebCore/svg/SVGStyledTransformableElement.h b/WebCore/svg/SVGStyledTransformableElement.h
index b6ab6dd..ee204ad 100644
--- a/WebCore/svg/SVGStyledTransformableElement.h
+++ b/WebCore/svg/SVGStyledTransformableElement.h
@@ -28,42 +28,42 @@
 
 namespace WebCore {
 
-    class TransformationMatrix;
-
-    class SVGStyledTransformableElement : public SVGStyledLocatableElement,
-                                          public SVGTransformable {
-    public:
-        SVGStyledTransformableElement(const QualifiedName&, Document*);
-        virtual ~SVGStyledTransformableElement();
-        
-        virtual bool isStyledTransformable() const { return true; }
-
-        virtual TransformationMatrix getCTM() const;
-        virtual TransformationMatrix getScreenCTM() const;
-        virtual SVGElement* nearestViewportElement() const;
-        virtual SVGElement* farthestViewportElement() const;
-        
-        virtual TransformationMatrix animatedLocalTransform() const;
-        virtual TransformationMatrix* supplementalTransform();
-
-        virtual FloatRect getBBox() const;
-
-        virtual void parseMappedAttribute(MappedAttribute*);
-        virtual void synchronizeProperty(const QualifiedName&);
-        bool isKnownAttribute(const QualifiedName&);
-
-        // "base class" methods for all the elements which render as paths
-        virtual Path toPathData() const { return Path(); }
-        virtual Path toClipPath() const;
-        virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-
-    protected:
-        DECLARE_ANIMATED_PROPERTY(SVGStyledTransformableElement, SVGNames::transformAttr, SVGTransformList*, Transform, transform)
-
-    private:
-        // Used by <animateMotion>
-        OwnPtr<TransformationMatrix> m_supplementalTransform;
-    };
+class AffineTransform;
+
+class SVGStyledTransformableElement : public SVGStyledLocatableElement,
+                                      public SVGTransformable {
+public:
+    SVGStyledTransformableElement(const QualifiedName&, Document*);
+    virtual ~SVGStyledTransformableElement();
+    
+    virtual bool isStyledTransformable() const { return true; }
+
+    virtual AffineTransform getCTM() const;
+    virtual AffineTransform getScreenCTM() const;
+    virtual SVGElement* nearestViewportElement() const;
+    virtual SVGElement* farthestViewportElement() const;
+    
+    virtual AffineTransform animatedLocalTransform() const;
+    virtual AffineTransform* supplementalTransform();
+
+    virtual FloatRect getBBox() const;
+
+    virtual void parseMappedAttribute(MappedAttribute*);
+    virtual void synchronizeProperty(const QualifiedName&);
+    bool isKnownAttribute(const QualifiedName&);
+
+    // "base class" methods for all the elements which render as paths
+    virtual Path toPathData() const { return Path(); }
+    virtual Path toClipPath() const;
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
+
+protected:
+    DECLARE_ANIMATED_PROPERTY(SVGStyledTransformableElement, SVGNames::transformAttr, SVGTransformList*, Transform, transform)
+
+private:
+    // Used by <animateMotion>
+    OwnPtr<AffineTransform> m_supplementalTransform;
+};
 
 } // namespace WebCore
 
diff --git a/WebCore/svg/SVGTextContentElement.cpp b/WebCore/svg/SVGTextContentElement.cpp
index 167d241..b28536b 100644
--- a/WebCore/svg/SVGTextContentElement.cpp
+++ b/WebCore/svg/SVGTextContentElement.cpp
@@ -124,7 +124,7 @@ struct SVGInlineTextBoxQueryWalker {
     {
     }
 
-    void chunkPortionCallback(SVGInlineTextBox* textBox, int startOffset, const TransformationMatrix&,
+    void chunkPortionCallback(SVGInlineTextBox* textBox, int startOffset, const AffineTransform&,
                               const Vector<SVGChar>::iterator& start, const Vector<SVGChar>::iterator& end)
     {
         RenderStyle* style = textBox->textRenderer()->style();
diff --git a/WebCore/svg/SVGTextElement.cpp b/WebCore/svg/SVGTextElement.cpp
index 7de34fe..96fd11a 100644
--- a/WebCore/svg/SVGTextElement.cpp
+++ b/WebCore/svg/SVGTextElement.cpp
@@ -23,6 +23,7 @@
 #if ENABLE(SVG)
 #include "SVGTextElement.h"
 
+#include "AffineTransform.h"
 #include "FloatRect.h"
 #include "MappedAttribute.h"
 #include "RenderSVGText.h"
@@ -30,7 +31,6 @@
 #include "SVGRenderStyle.h"
 #include "SVGTSpanElement.h"
 #include "SVGTransformList.h"
-#include "TransformationMatrix.h"
 
 namespace WebCore {
 
@@ -72,25 +72,25 @@ FloatRect SVGTextElement::getBBox() const
     return SVGTransformable::getBBox(this);
 }
 
-TransformationMatrix SVGTextElement::getScreenCTM() const
+AffineTransform SVGTextElement::getScreenCTM() const
 {
     return SVGTransformable::getScreenCTM(this);
 }
 
-TransformationMatrix SVGTextElement::getCTM() const
+AffineTransform SVGTextElement::getCTM() const
 {
     return SVGTransformable::getCTM(this);
 }
 
-TransformationMatrix SVGTextElement::animatedLocalTransform() const
+AffineTransform SVGTextElement::animatedLocalTransform() const
 {
     return m_supplementalTransform ? transform()->concatenate().matrix() * *m_supplementalTransform : transform()->concatenate().matrix();
 }
 
-TransformationMatrix* SVGTextElement::supplementalTransform()
+AffineTransform* SVGTextElement::supplementalTransform()
 {
     if (!m_supplementalTransform)
-        m_supplementalTransform.set(new TransformationMatrix());
+        m_supplementalTransform.set(new AffineTransform());
     return m_supplementalTransform.get();
 }
 
diff --git a/WebCore/svg/SVGTextElement.h b/WebCore/svg/SVGTextElement.h
index 217964a..4fca6bf 100644
--- a/WebCore/svg/SVGTextElement.h
+++ b/WebCore/svg/SVGTextElement.h
@@ -39,10 +39,10 @@ namespace WebCore {
         virtual SVGElement* farthestViewportElement() const;
 
         virtual FloatRect getBBox() const;
-        virtual TransformationMatrix getCTM() const;
-        virtual TransformationMatrix getScreenCTM() const;
-        virtual TransformationMatrix animatedLocalTransform() const;
-        virtual TransformationMatrix* supplementalTransform();
+        virtual AffineTransform getCTM() const;
+        virtual AffineTransform getScreenCTM() const;
+        virtual AffineTransform animatedLocalTransform() const;
+        virtual AffineTransform* supplementalTransform();
 
         virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
         virtual bool childShouldCreateRenderer(Node*) const;
@@ -55,7 +55,7 @@ namespace WebCore {
         DECLARE_ANIMATED_PROPERTY(SVGTextElement, SVGNames::transformAttr, SVGTransformList*, Transform, transform)
        
        // Used by <animateMotion>
-       OwnPtr<TransformationMatrix> m_supplementalTransform;
+       OwnPtr<AffineTransform> m_supplementalTransform;
     };
 
 } // namespace WebCore
diff --git a/WebCore/svg/SVGTextPathElement.cpp b/WebCore/svg/SVGTextPathElement.cpp
index eec6fc8..a428a44 100644
--- a/WebCore/svg/SVGTextPathElement.cpp
+++ b/WebCore/svg/SVGTextPathElement.cpp
@@ -22,6 +22,7 @@
 #if ENABLE(SVG)
 #include "SVGTextPathElement.h"
 
+#include "AffineTransform.h"
 #include "FloatRect.h"
 #include "MappedAttribute.h"
 #include "RenderSVGTextPath.h"
@@ -29,7 +30,6 @@
 #include "SVGPathElement.h"
 #include "SVGRenderStyle.h"
 #include "SVGTransformList.h"
-#include "TransformationMatrix.h"
 
 namespace WebCore {
 
diff --git a/WebCore/svg/SVGTransform.cpp b/WebCore/svg/SVGTransform.cpp
index 9fe770c..1af0cd9 100644
--- a/WebCore/svg/SVGTransform.cpp
+++ b/WebCore/svg/SVGTransform.cpp
@@ -41,11 +41,11 @@ SVGTransform::SVGTransform(SVGTransformType type)
     : m_type(type)
     , m_angle(0)
     , m_center(FloatPoint())
-    , m_matrix(TransformationMatrix())
+    , m_matrix(AffineTransform())
 {
 }
 
-SVGTransform::SVGTransform(const TransformationMatrix& matrix)
+SVGTransform::SVGTransform(const AffineTransform& matrix)
     : m_type(SVG_TRANSFORM_MATRIX)
     , m_angle(0)
     , m_matrix(matrix)
@@ -66,7 +66,7 @@ SVGTransform::SVGTransformType SVGTransform::type() const
     return m_type;
 }
 
-TransformationMatrix SVGTransform::matrix() const
+AffineTransform SVGTransform::matrix() const
 {
     return m_matrix;
 }
@@ -81,7 +81,7 @@ FloatPoint SVGTransform::rotationCenter() const
     return m_center;
 }
 
-void SVGTransform::setMatrix(TransformationMatrix matrix) //const TransformationMatrix& matrix)
+void SVGTransform::setMatrix(AffineTransform matrix)
 {
     m_type = SVG_TRANSFORM_MATRIX;
     m_angle = 0;
@@ -149,6 +149,5 @@ void SVGTransform::setSkewY(float angle)
     m_matrix.skewY(angle);
 }
 
-// vim:ts=4:noet
 #endif // ENABLE(SVG)
 
diff --git a/WebCore/svg/SVGTransform.h b/WebCore/svg/SVGTransform.h
index aad7a60..88912c2 100644
--- a/WebCore/svg/SVGTransform.h
+++ b/WebCore/svg/SVGTransform.h
@@ -22,7 +22,7 @@
 #define SVGTransform_h
 
 #if ENABLE(SVG)
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "FloatPoint.h"
 #include "SVGNames.h"
 
@@ -44,17 +44,17 @@ namespace WebCore {
  
         SVGTransform();
         SVGTransform(SVGTransformType);
-        explicit SVGTransform(const TransformationMatrix&);
+        explicit SVGTransform(const AffineTransform&);
         virtual ~SVGTransform();
                
         SVGTransformType type() const;
 
-        TransformationMatrix matrix() const;
+        AffineTransform matrix() const;
     
         float angle() const;
         FloatPoint rotationCenter() const;
 
-        void setMatrix(TransformationMatrix);
+        void setMatrix(AffineTransform);
 
         void setTranslate(float tx, float ty);
         void setScale(float sx, float sy);
@@ -72,7 +72,7 @@ namespace WebCore {
         SVGTransformType m_type;
         float m_angle;
         FloatPoint m_center;
-        TransformationMatrix m_matrix;
+        AffineTransform m_matrix;
     };
 
     inline bool operator==(const SVGTransform& a, const SVGTransform& b)
diff --git a/WebCore/svg/SVGTransformDistance.cpp b/WebCore/svg/SVGTransformDistance.cpp
index 00b5387..51dfd74 100644
--- a/WebCore/svg/SVGTransformDistance.cpp
+++ b/WebCore/svg/SVGTransformDistance.cpp
@@ -40,7 +40,7 @@ SVGTransformDistance::SVGTransformDistance()
 {
 }
 
-SVGTransformDistance::SVGTransformDistance(SVGTransform::SVGTransformType type, float angle, float cx, float cy, const TransformationMatrix& transform)
+SVGTransformDistance::SVGTransformDistance(SVGTransform::SVGTransformType type, float angle, float cx, float cy, const AffineTransform& transform)
     : m_type(type)
     , m_angle(angle)
     , m_cx(cx)
@@ -97,20 +97,20 @@ SVGTransformDistance SVGTransformDistance::scaledDistance(float scaleFactor) con
     case SVGTransform::SVG_TRANSFORM_UNKNOWN:
         return SVGTransformDistance();
     case SVGTransform::SVG_TRANSFORM_ROTATE:
-        return SVGTransformDistance(m_type, m_angle * scaleFactor, m_cx * scaleFactor, m_cy * scaleFactor, TransformationMatrix());
+        return SVGTransformDistance(m_type, m_angle * scaleFactor, m_cx * scaleFactor, m_cy * scaleFactor, AffineTransform());
     case SVGTransform::SVG_TRANSFORM_SCALE:
     case SVGTransform::SVG_TRANSFORM_MATRIX:
-        return SVGTransformDistance(m_type, m_angle * scaleFactor, m_cx * scaleFactor, m_cy * scaleFactor, TransformationMatrix(m_transform).scale(scaleFactor));
+        return SVGTransformDistance(m_type, m_angle * scaleFactor, m_cx * scaleFactor, m_cy * scaleFactor, AffineTransform(m_transform).scale(scaleFactor));
     case SVGTransform::SVG_TRANSFORM_TRANSLATE:
     {
-        TransformationMatrix newTransform(m_transform);
+        AffineTransform newTransform(m_transform);
         newTransform.setE(m_transform.e() * scaleFactor);
         newTransform.setF(m_transform.f() * scaleFactor);
         return SVGTransformDistance(m_type, 0, 0, 0, newTransform);
     }
     case SVGTransform::SVG_TRANSFORM_SKEWX:
     case SVGTransform::SVG_TRANSFORM_SKEWY:
-        return SVGTransformDistance(m_type, m_angle * scaleFactor, m_cx * scaleFactor, m_cy * scaleFactor, TransformationMatrix());
+        return SVGTransformDistance(m_type, m_angle * scaleFactor, m_cx * scaleFactor, m_cy * scaleFactor, AffineTransform());
     }
     
     ASSERT_NOT_REACHED();
@@ -251,7 +251,7 @@ SVGTransform SVGTransformDistance::addToSVGTransform(const SVGTransform& transfo
 
 bool SVGTransformDistance::isZero() const
 {
-    return (m_transform == TransformationMatrix() && m_angle == 0);
+    return (m_transform == AffineTransform() && m_angle == 0);
 }
 
 float SVGTransformDistance::distance() const
diff --git a/WebCore/svg/SVGTransformDistance.h b/WebCore/svg/SVGTransformDistance.h
index 470e2eb..7c54dc7 100644
--- a/WebCore/svg/SVGTransformDistance.h
+++ b/WebCore/svg/SVGTransformDistance.h
@@ -27,31 +27,31 @@
 
 namespace WebCore {
     
-    class TransformationMatrix;
-        
-    class SVGTransformDistance {
-    public:
-        SVGTransformDistance();
-        SVGTransformDistance(const SVGTransform& fromTransform, const SVGTransform& toTransform);
-        
-        SVGTransformDistance scaledDistance(float scaleFactor) const;
-        SVGTransform addToSVGTransform(const SVGTransform&) const;
-        void addSVGTransform(const SVGTransform&, bool absoluteValue = false);
-        
-        static SVGTransform addSVGTransforms(const SVGTransform&, const SVGTransform&);
-        
-        bool isZero() const;
+class AffineTransform;
+    
+class SVGTransformDistance {
+public:
+    SVGTransformDistance();
+    SVGTransformDistance(const SVGTransform& fromTransform, const SVGTransform& toTransform);
+    
+    SVGTransformDistance scaledDistance(float scaleFactor) const;
+    SVGTransform addToSVGTransform(const SVGTransform&) const;
+    void addSVGTransform(const SVGTransform&, bool absoluteValue = false);
+    
+    static SVGTransform addSVGTransforms(const SVGTransform&, const SVGTransform&);
+    
+    bool isZero() const;
+    
+    float distance() const;
+private:
+    SVGTransformDistance(SVGTransform::SVGTransformType, float angle, float cx, float cy, const AffineTransform&);
         
-        float distance() const;
-    private:
-        SVGTransformDistance(SVGTransform::SVGTransformType, float angle, float cx, float cy, const TransformationMatrix&);
-            
-        SVGTransform::SVGTransformType m_type;
-        float m_angle;
-        float m_cx;
-        float m_cy;
-        TransformationMatrix m_transform; // for storing scale, translation or matrix transforms
-    };
+    SVGTransform::SVGTransformType m_type;
+    float m_angle;
+    float m_cx;
+    float m_cy;
+    AffineTransform m_transform; // for storing scale, translation or matrix transforms
+};
 }
 
 #endif // ENABLE(SVG)
diff --git a/WebCore/svg/SVGTransformList.cpp b/WebCore/svg/SVGTransformList.cpp
index f4f0965..38dbc9a 100644
--- a/WebCore/svg/SVGTransformList.cpp
+++ b/WebCore/svg/SVGTransformList.cpp
@@ -21,11 +21,12 @@
 #include "config.h"
 
 #if ENABLE(SVG)
-#include "TransformationMatrix.h"
-#include "SVGTransform.h"
-#include "SVGSVGElement.h"
 #include "SVGTransformList.h"
 
+#include "AffineTransform.h"
+#include "SVGSVGElement.h"
+#include "SVGTransform.h"
+
 using namespace WebCore;
 
 SVGTransformList::SVGTransformList(const QualifiedName& attributeName)
@@ -37,7 +38,7 @@ SVGTransformList::~SVGTransformList()
 {
 }
 
-SVGTransform SVGTransformList::createSVGTransformFromMatrix(const TransformationMatrix& matrix) const
+SVGTransform SVGTransformList::createSVGTransformFromMatrix(const AffineTransform& matrix) const
 {
     return SVGSVGElement::createSVGTransformFromMatrix(matrix);
 }
@@ -54,7 +55,7 @@ SVGTransform SVGTransformList::concatenate() const
     if (!length)
         return SVGTransform();
         
-    TransformationMatrix matrix;
+    AffineTransform matrix;
     ExceptionCode ec = 0;
     for (unsigned int i = 0; i < length; i++)
         matrix = getItem(i, ec).matrix() * matrix;
@@ -67,7 +68,7 @@ String SVGTransformList::valueAsString() const
     // TODO: We may want to build a real transform string, instead of concatting to a matrix(...).
     SVGTransform transform = concatenate();
     if (transform.type() == SVGTransform::SVG_TRANSFORM_MATRIX) {
-        TransformationMatrix matrix = transform.matrix();
+        AffineTransform matrix = transform.matrix();
         return String::format("matrix(%f %f %f %f %f %f)", matrix.a(), matrix.b(), matrix.c(), matrix.d(), matrix.e(), matrix.f());
     }
 
diff --git a/WebCore/svg/SVGTransformList.h b/WebCore/svg/SVGTransformList.h
index 9aea524..683f0f7 100644
--- a/WebCore/svg/SVGTransformList.h
+++ b/WebCore/svg/SVGTransformList.h
@@ -35,7 +35,7 @@ namespace WebCore {
         static PassRefPtr<SVGTransformList> create(const QualifiedName& attributeName) { return adoptRef(new SVGTransformList(attributeName)); }
         virtual ~SVGTransformList();
 
-        SVGTransform createSVGTransformFromMatrix(const TransformationMatrix&) const;
+        SVGTransform createSVGTransformFromMatrix(const AffineTransform&) const;
         SVGTransform consolidate();
 
         // Internal use only
diff --git a/WebCore/svg/SVGTransformable.cpp b/WebCore/svg/SVGTransformable.cpp
index 78afbc8..d710a34 100644
--- a/WebCore/svg/SVGTransformable.cpp
+++ b/WebCore/svg/SVGTransformable.cpp
@@ -26,7 +26,7 @@
 #if ENABLE(SVG)
 #include "SVGTransformable.h"
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "FloatConversion.h"
 #include "SVGNames.h"
 #include "SVGParserUtilities.h"
@@ -43,15 +43,15 @@ SVGTransformable::~SVGTransformable()
 {
 }
 
-TransformationMatrix SVGTransformable::getCTM(const SVGElement* element) const
+AffineTransform SVGTransformable::getCTM(const SVGElement* element) const
 {
-    TransformationMatrix ctm = SVGLocatable::getCTM(element);
+    AffineTransform ctm = SVGLocatable::getCTM(element);
     return animatedLocalTransform() * ctm;
 }
 
-TransformationMatrix SVGTransformable::getScreenCTM(const SVGElement* element) const
+AffineTransform SVGTransformable::getScreenCTM(const SVGElement* element) const
 {
-    TransformationMatrix ctm = SVGLocatable::getScreenCTM(element);
+    AffineTransform ctm = SVGLocatable::getScreenCTM(element);
     return animatedLocalTransform() * ctm;
 }
 
@@ -147,7 +147,7 @@ bool SVGTransformable::parseTransformValue(unsigned type, const UChar*& ptr, con
                   t.setRotate(values[0], values[1], values[2]);
             break;
         case SVGTransform::SVG_TRANSFORM_MATRIX:
-            t.setMatrix(TransformationMatrix(values[0], values[1], values[2], values[3], values[4], values[5]));
+            t.setMatrix(AffineTransform(values[0], values[1], values[2], values[3], values[4], values[5]));
             break;
     }
 
diff --git a/WebCore/svg/SVGTransformable.h b/WebCore/svg/SVGTransformable.h
index a74eff7..7579fa9 100644
--- a/WebCore/svg/SVGTransformable.h
+++ b/WebCore/svg/SVGTransformable.h
@@ -28,33 +28,33 @@
 
 namespace WebCore {
     
-    class TransformationMatrix;
-    class AtomicString;
-    class SVGTransform;
-    class QualifiedName;
-
-    class SVGTransformable : virtual public SVGLocatable {
-    public:
-        SVGTransformable();
-        virtual ~SVGTransformable();
-
-        enum TransformParsingMode {
-            ClearList,
-            DoNotClearList
-        };
-
-        static bool parseTransformAttribute(SVGTransformList*, const AtomicString& transform);
-        static bool parseTransformAttribute(SVGTransformList*, const UChar*& ptr, const UChar* end, TransformParsingMode mode = ClearList);
-        static bool parseTransformValue(unsigned type, const UChar*& ptr, const UChar* end, SVGTransform&);
-        
-        TransformationMatrix getCTM(const SVGElement*) const;
-        TransformationMatrix getScreenCTM(const SVGElement*) const;
-        
-        virtual TransformationMatrix animatedLocalTransform() const = 0;
-
-        bool isKnownAttribute(const QualifiedName&);
+class AffineTransform;
+class AtomicString;
+class SVGTransform;
+class QualifiedName;
+
+class SVGTransformable : virtual public SVGLocatable {
+public:
+    SVGTransformable();
+    virtual ~SVGTransformable();
+
+    enum TransformParsingMode {
+        ClearList,
+        DoNotClearList
     };
 
+    static bool parseTransformAttribute(SVGTransformList*, const AtomicString& transform);
+    static bool parseTransformAttribute(SVGTransformList*, const UChar*& ptr, const UChar* end, TransformParsingMode mode = ClearList);
+    static bool parseTransformValue(unsigned type, const UChar*& ptr, const UChar* end, SVGTransform&);
+    
+    AffineTransform getCTM(const SVGElement*) const;
+    AffineTransform getScreenCTM(const SVGElement*) const;
+    
+    virtual AffineTransform animatedLocalTransform() const = 0;
+
+    bool isKnownAttribute(const QualifiedName&);
+};
+
 } // namespace WebCore
 
 #endif // ENABLE(SVG)
diff --git a/WebCore/svg/graphics/SVGPaintServerGradient.cpp b/WebCore/svg/graphics/SVGPaintServerGradient.cpp
index 2c6a522..8a56624 100644
--- a/WebCore/svg/graphics/SVGPaintServerGradient.cpp
+++ b/WebCore/svg/graphics/SVGPaintServerGradient.cpp
@@ -106,12 +106,12 @@ void SVGPaintServerGradient::setBoundingBoxMode(bool mode)
     m_boundingBoxMode = mode;
 }
 
-TransformationMatrix SVGPaintServerGradient::gradientTransform() const
+AffineTransform SVGPaintServerGradient::gradientTransform() const
 {
     return m_gradientTransform;
 }
 
-void SVGPaintServerGradient::setGradientTransform(const TransformationMatrix& transform)
+void SVGPaintServerGradient::setGradientTransform(const AffineTransform& transform)
 {
     m_gradientTransform = transform;
 }
@@ -127,9 +127,9 @@ static inline const RenderObject* findTextRootObject(const RenderObject* start)
     return start;
 }
 
-static inline TransformationMatrix absoluteTransformForRenderer(const RenderObject* object)
+static inline AffineTransform absoluteTransformForRenderer(const RenderObject* object)
 {
-    TransformationMatrix absoluteTransform;
+    AffineTransform absoluteTransform;
 
     const RenderObject* currentObject = object;
     while (currentObject) {
@@ -146,7 +146,7 @@ static inline bool createMaskAndSwapContextForTextGradient(
 {
     const RenderObject* textRootBlock = findTextRootObject(object);
 
-    TransformationMatrix transform = absoluteTransformForRenderer(textRootBlock);
+    AffineTransform transform = absoluteTransformForRenderer(textRootBlock);
     FloatRect maskAbsoluteBoundingBox = transform.mapRect(textRootBlock->repaintRectInLocalCoordinates());
 
     IntRect maskImageRect = enclosingIntRect(maskAbsoluteBoundingBox);
@@ -171,14 +171,14 @@ static inline bool createMaskAndSwapContextForTextGradient(
     return true;
 }
 
-static inline TransformationMatrix clipToTextMask(GraphicsContext* context,
+static inline AffineTransform clipToTextMask(GraphicsContext* context,
     OwnPtr<ImageBuffer>& imageBuffer, const RenderObject* object,
     const SVGPaintServerGradient* gradientServer)
 {
     const RenderObject* textRootBlock = findTextRootObject(object);
     context->clipToImageBuffer(textRootBlock->repaintRectInLocalCoordinates(), imageBuffer.get());
 
-    TransformationMatrix matrix;
+    AffineTransform matrix;
     if (gradientServer->boundingBoxMode()) {
         FloatRect maskBoundingBox = textRootBlock->objectBoundingBox();
         matrix.translate(maskBoundingBox.x(), maskBoundingBox.y());
@@ -222,7 +222,7 @@ bool SVGPaintServerGradient::setup(GraphicsContext*& context, const RenderObject
         applyStrokeStyleToContext(context, object->style(), object);
     }
 
-    TransformationMatrix matrix;
+    AffineTransform matrix;
     // CG platforms will handle the gradient space transform for text in
     // teardown, so we don't apply it here.  For non-CG platforms, we
     // want the text bounding box applied to the gradient space transform now,
@@ -258,7 +258,7 @@ void SVGPaintServerGradient::teardown(GraphicsContext*& context, const RenderObj
         context = m_savedContext;
         m_savedContext = 0;
 
-        TransformationMatrix matrix = clipToTextMask(context, m_imageBuffer, object, this);
+        AffineTransform matrix = clipToTextMask(context, m_imageBuffer, object, this);
         m_gradient->setGradientSpaceTransform(matrix);
         context->setFillGradient(m_gradient);
         
diff --git a/WebCore/svg/graphics/SVGPaintServerGradient.h b/WebCore/svg/graphics/SVGPaintServerGradient.h
index b24c417..d643b3b 100644
--- a/WebCore/svg/graphics/SVGPaintServerGradient.h
+++ b/WebCore/svg/graphics/SVGPaintServerGradient.h
@@ -29,7 +29,7 @@
 
 #if ENABLE(SVG)
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "Color.h"
 #include "Gradient.h"
 #include "GraphicsContext.h"
@@ -58,8 +58,8 @@ namespace WebCore {
         bool boundingBoxMode() const;
         void setBoundingBoxMode(bool mode = true);
 
-        TransformationMatrix gradientTransform() const;
-        void setGradientTransform(const TransformationMatrix&);
+        AffineTransform gradientTransform() const;
+        void setGradientTransform(const AffineTransform&);
 
         void setGradientStops(const Vector<SVGGradientStop>& stops) { m_stops = stops; }
         const Vector<SVGGradientStop>& gradientStops() const { return m_stops; }
@@ -76,7 +76,7 @@ namespace WebCore {
         Vector<SVGGradientStop> m_stops;
         RefPtr<Gradient> m_gradient;
         bool m_boundingBoxMode;
-        TransformationMatrix m_gradientTransform;
+        AffineTransform m_gradientTransform;
         const SVGGradientElement* m_ownerElement;
 
 #if PLATFORM(CG)
diff --git a/WebCore/svg/graphics/SVGPaintServerPattern.cpp b/WebCore/svg/graphics/SVGPaintServerPattern.cpp
index 28706ba..d029f8f 100644
--- a/WebCore/svg/graphics/SVGPaintServerPattern.cpp
+++ b/WebCore/svg/graphics/SVGPaintServerPattern.cpp
@@ -29,6 +29,7 @@
 #if ENABLE(SVG)
 #include "SVGPaintServerPattern.h"
 
+#include "AffineTransform.h"
 #include "GraphicsContext.h"
 #include "Image.h"
 #include "ImageBuffer.h"
@@ -36,7 +37,6 @@
 #include "RenderObject.h"
 #include "SVGPatternElement.h"
 #include "SVGRenderTreeAsText.h"
-#include "TransformationMatrix.h"
 
 using namespace std;
 
@@ -73,12 +73,12 @@ void SVGPaintServerPattern::setTile(PassOwnPtr<ImageBuffer> tile)
     m_tile = tile;
 }
 
-TransformationMatrix SVGPaintServerPattern::patternTransform() const
+AffineTransform SVGPaintServerPattern::patternTransform() const
 {
     return m_patternTransform;
 }
 
-void SVGPaintServerPattern::setPatternTransform(const TransformationMatrix& transform)
+void SVGPaintServerPattern::setPatternTransform(const AffineTransform& transform)
 {
     m_patternTransform = transform;
 }
@@ -153,7 +153,7 @@ bool SVGPaintServerPattern::setup(GraphicsContext*& context, const RenderObject*
         applyStrokeStyleToContext(context, object->style(), object);
     }
 
-    TransformationMatrix matrix;
+    AffineTransform matrix;
     matrix.translate(patternBoundaries().x(), patternBoundaries().y());
     matrix.multiply(patternTransform());
     m_pattern->setPatternSpaceTransform(matrix);
diff --git a/WebCore/svg/graphics/SVGPaintServerPattern.h b/WebCore/svg/graphics/SVGPaintServerPattern.h
index 253e012..cda07c5 100644
--- a/WebCore/svg/graphics/SVGPaintServerPattern.h
+++ b/WebCore/svg/graphics/SVGPaintServerPattern.h
@@ -28,7 +28,7 @@
 
 #if ENABLE(SVG)
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "FloatRect.h"
 #include "Pattern.h"
 #include "SVGPaintServer.h"
@@ -59,8 +59,8 @@ namespace WebCore {
         ImageBuffer* tile() const;
         void setTile(PassOwnPtr<ImageBuffer>);
 
-        TransformationMatrix patternTransform() const;
-        void setPatternTransform(const TransformationMatrix&);
+        AffineTransform patternTransform() const;
+        void setPatternTransform(const AffineTransform&);
 
         virtual TextStream& externalRepresentation(TextStream&) const;
 
@@ -72,7 +72,7 @@ namespace WebCore {
         
         OwnPtr<ImageBuffer> m_tile;
         const SVGPatternElement* m_ownerElement;
-        TransformationMatrix m_patternTransform;
+        AffineTransform m_patternTransform;
         FloatRect m_patternBoundaries;
 
         mutable RefPtr<Pattern> m_pattern;
diff --git a/WebCore/svg/graphics/SVGResourceClipper.cpp b/WebCore/svg/graphics/SVGResourceClipper.cpp
index c0fccaf..5316c95 100644
--- a/WebCore/svg/graphics/SVGResourceClipper.cpp
+++ b/WebCore/svg/graphics/SVGResourceClipper.cpp
@@ -29,9 +29,9 @@
 #if ENABLE(SVG)
 #include "SVGResourceClipper.h"
 
+#include "AffineTransform.h"
 #include "GraphicsContext.h"
 #include "SVGRenderTreeAsText.h"
-#include "TransformationMatrix.h"
 
 #if PLATFORM(CG)
 #include <ApplicationServices/ApplicationServices.h>
@@ -101,7 +101,7 @@ void SVGResourceClipper::applyClip(GraphicsContext* context, const FloatRect& bo
         Path clipPath = clipData.path;
 
         if (clipData.bboxUnits) {
-            TransformationMatrix transform;
+            AffineTransform transform;
             transform.translate(boundingBox.x(), boundingBox.y());
             transform.scaleNonUniform(boundingBox.width(), boundingBox.height());
             clipPath.transform(transform);
diff --git a/WebCore/svg/graphics/SVGResourceMarker.cpp b/WebCore/svg/graphics/SVGResourceMarker.cpp
index 955c048..2c036a4 100644
--- a/WebCore/svg/graphics/SVGResourceMarker.cpp
+++ b/WebCore/svg/graphics/SVGResourceMarker.cpp
@@ -28,7 +28,7 @@
 #if ENABLE(SVG)
 #include "SVGResourceMarker.h"
 
-#include "TransformationMatrix.h"
+#include "AffineTransform.h"
 #include "GraphicsContext.h"
 #include "RenderSVGViewportContainer.h"
 #include "TextStream.h"
@@ -48,18 +48,18 @@ SVGResourceMarker::~SVGResourceMarker()
 {
 }
 
-TransformationMatrix SVGResourceMarker::markerTransformation(const FloatPoint& origin, float angle, float strokeWidth) const
+AffineTransform SVGResourceMarker::markerTransformation(const FloatPoint& origin, float angle, float strokeWidth) const
 {
     ASSERT(m_renderer);
 
-    TransformationMatrix transform;
+    AffineTransform transform;
     transform.translate(origin.x(), origin.y());
     transform.rotate(m_angle == -1 ? angle : m_angle);
     transform = m_renderer->markerContentTransformation(transform, m_referencePoint, m_useStrokeWidth ? strokeWidth : -1);
     return transform;
 }
 
-void SVGResourceMarker::draw(RenderObject::PaintInfo& paintInfo, const TransformationMatrix& transform)
+void SVGResourceMarker::draw(RenderObject::PaintInfo& paintInfo, const AffineTransform& transform)
 {
     if (!m_renderer)
         return;
diff --git a/WebCore/svg/graphics/SVGResourceMarker.h b/WebCore/svg/graphics/SVGResourceMarker.h
index 5c98d2f..f2ce33d 100644
--- a/WebCore/svg/graphics/SVGResourceMarker.h
+++ b/WebCore/svg/graphics/SVGResourceMarker.h
@@ -35,7 +35,7 @@
 namespace WebCore {
 
     class RenderSVGViewportContainer;
-    class TransformationMatrix;
+    class AffineTransform;
 
     class SVGResourceMarker : public SVGResource {
     public:
@@ -55,8 +55,8 @@ namespace WebCore {
         void setUseStrokeWidth(bool useStrokeWidth = true) { m_useStrokeWidth = useStrokeWidth; }
         bool useStrokeWidth() const { return m_useStrokeWidth; }
 
-        TransformationMatrix markerTransformation(const FloatPoint& origin, float angle, float strokeWidth) const;
-        void draw(RenderObject::PaintInfo&, const TransformationMatrix&);
+        AffineTransform markerTransformation(const FloatPoint& origin, float angle, float strokeWidth) const;
+        void draw(RenderObject::PaintInfo&, const AffineTransform&);
 
         virtual SVGResourceType resourceType() const { return MarkerResourceType; }
         virtual TextStream& externalRepresentation(TextStream&) const;
diff --git a/WebCore/svg/graphics/filters/SVGFEImage.cpp b/WebCore/svg/graphics/filters/SVGFEImage.cpp
index 331de4f..950203a 100644
--- a/WebCore/svg/graphics/filters/SVGFEImage.cpp
+++ b/WebCore/svg/graphics/filters/SVGFEImage.cpp
@@ -25,11 +25,11 @@
 #if ENABLE(SVG) && ENABLE(FILTERS)
 #include "SVGFEImage.h"
 
+#include "AffineTransform.h"
 #include "Filter.h"
 #include "GraphicsContext.h"
 #include "SVGPreserveAspectRatio.h"
 #include "SVGRenderTreeAsText.h"
-#include "TransformationMatrix.h"
 
 namespace WebCore {
 
diff --git a/WebCore/svg/graphics/filters/SVGFETile.cpp b/WebCore/svg/graphics/filters/SVGFETile.cpp
index 42da34d..5bc2129 100644
--- a/WebCore/svg/graphics/filters/SVGFETile.cpp
+++ b/WebCore/svg/graphics/filters/SVGFETile.cpp
@@ -23,10 +23,10 @@
 #if ENABLE(SVG) && ENABLE(FILTERS)
 #include "SVGFETile.h"
 
+#include "AffineTransform.h"
 #include "Filter.h"
 #include "GraphicsContext.h"
 #include "Pattern.h"
-#include "TransformationMatrix.h"
 #include "SVGRenderTreeAsText.h"
 
 namespace WebCore {
@@ -75,7 +75,7 @@ void FETile::apply(Filter* filter)
     tileImageContext->drawImage(m_in->resultImage()->image(), DeviceColorSpace, IntPoint());
     RefPtr<Pattern> pattern = Pattern::create(tileImage->image(), true, true);
 
-    TransformationMatrix matrix;
+    AffineTransform matrix;
     matrix.translate(m_in->scaledSubRegion().x() - scaledSubRegion().x(), m_in->scaledSubRegion().y() - scaledSubRegion().y());
     pattern.get()->setPatternSpaceTransform(matrix);
 
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index e3e5a07..92c3f41 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-08  Dirk Schulze  <krit at webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        Add back an AffineTransform class for use by SVG
+        https://bugs.webkit.org/show_bug.cgi?id=33750
+
+        Use AffineTransform instead of TransformationMatrix here.
+
+        * tests/TransparencyWinTest.cpp:
+        (WebCore::TEST):
+
 2010-02-07  Jian Li  <jianli at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebKit/chromium/tests/TransparencyWinTest.cpp b/WebKit/chromium/tests/TransparencyWinTest.cpp
index 5fdff11..b83c2a9 100644
--- a/WebKit/chromium/tests/TransparencyWinTest.cpp
+++ b/WebKit/chromium/tests/TransparencyWinTest.cpp
@@ -29,14 +29,14 @@
  */
 
 #include "config.h"
+#include "TransparencyWin.h"
+
+#include "AffineTransform.h"
+#include "ImageBuffer.h"
 
 #include <gtest/gtest.h>
 #include <windows.h>
 
-#include "ImageBuffer.h"
-#include "TransformationMatrix.h"
-#include "TransparencyWin.h"
-
 namespace WebCore {
 
 static FloatRect RECTToFloatRect(const RECT* rect)
@@ -416,10 +416,7 @@ TEST(TransparencyWin, RotateOpaqueCompositeLayer)
     // antialiasing or other rounding problems since we're testing exact pixel
     // values.
     src->context()->save();
-    TransformationMatrix cw90(0, 1, 0, 0,
-                              -1, 0, 0, 0,
-                              0, 0, 1, 0,
-                              0, 0, 0, 1);
+    AffineTransform cw90(0, 1, -1, 0, 0, 0);
     src->context()->concatCTM(cw90);
 
     // Make a transparency layer consisting of a horizontal line of 50% black.
@@ -497,16 +494,16 @@ TEST(TransparencyWin, TranslateScaleOpaqueCompositeLayer)
     src->context()->save();
 
     // Translate left by one pixel.
-    TransformationMatrix left;
+    AffineTransform left;
     left.translate(-1, 0);
 
     // Scale by 2x.
-    TransformationMatrix scale;
+    AffineTransform scale;
     scale.scale(2.0);
     src->context()->concatCTM(scale);
 
     // Then translate up by one pixel (which will actually be 2 due to scaling).
-    TransformationMatrix up;
+    AffineTransform up;
     up.translate(0, -1);
     src->context()->concatCTM(up);
 
@@ -538,7 +535,7 @@ TEST(TransparencyWin, Scale)
 
     // Scale by 2x.
     src->context()->save();
-    TransformationMatrix scale;
+    AffineTransform scale;
     scale.scale(2.0);
     src->context()->concatCTM(scale);
 
@@ -599,7 +596,7 @@ TEST(TransparencyWin, ScaleTransparency)
 
     // Scale by 2x.
     src->context()->save();
-    TransformationMatrix scale;
+    AffineTransform scale;
     scale.scale(2.0);
     src->context()->concatCTM(scale);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list