Bug #: 5361
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Oct 2005 06:55:21 +0000 (06:55 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Oct 2005 06:55:21 +0000 (06:55 +0000)
Submitted by: Julien Palmas <julien.palmas@gmail.com>
Reviewed by: eseidel
        Finally fix pattern "userspaceonuse" support.
        Several test cases already cover this.
        http://bugzilla.opendarwin.org/show_bug.cgi?id=5361

        * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
        (KRenderingPaintServerPatternQuartz::draw):
        * svg-tests/W3C-SVG-1.1/pservers-grad-03-b-expected.checksum:
        * svg-tests/W3C-SVG-1.1/pservers-grad-03-b-expected.png:
        * svg-tests/W3C-SVG-1.1/pservers-grad-06-b-expected.checksum:
        * svg-tests/W3C-SVG-1.1/pservers-grad-06-b-expected.png:
        * svg-tests/W3C-SVG-1.1/pservers-pattern-01-b-expected.checksum:
        * svg-tests/W3C-SVG-1.1/pservers-pattern-01-b-expected.png:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@10925 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/svg/W3C-SVG-1.1/pservers-grad-03-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/pservers-grad-03-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.png
LayoutTests/svg/W3C-SVG-1.1/pservers-pattern-01-b-expected.checksum
LayoutTests/svg/W3C-SVG-1.1/pservers-pattern-01-b-expected.png
WebCore/ChangeLog-2005-12-19
WebCore/kcanvas/device/quartz/KRenderingPaintServerQuartz.mm

index 40aad2392e65beaeeacec4e5ac4a8153927f659f..a4bdfaaeb38115b0f6342bf9beff167c9fe01920 100644 (file)
@@ -1 +1 @@
-358bda93d3f1c2c5ea3e999187b04f89
\ No newline at end of file
+cff4f2ac4cbdc6cd370d923afaf25869
\ No newline at end of file
index c19301b737906e3e4c664b7bcf79a30f8eaa938a..3dcd22d0d65c1165dad4dc847575af2a6a64ee48 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-03-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-03-b-expected.png differ
index 585f500a798ddc317e5c44d9ca862fb9ee726c5d..7c3bff2f95a632df8d696fef8d52cb29f03b5acc 100644 (file)
@@ -1 +1 @@
-6cc37ffa5a7f45214884ddb964543beb
\ No newline at end of file
+fbd555a75eb6d397b7ebd4ebedfde735
\ No newline at end of file
index d3d781e04c8a4f773ae0c535135e2a8b3ce2b333..e92524dd74748fc06e2e7aed37ccbc06af594a3c 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.png differ
index 79c2f2d4153b1cf65cd35479f88a1ec3b408205d..97dea2633259b23abd4042f08dc32eb04968c400 100644 (file)
@@ -1 +1 @@
-641fed97291a0d9538f39f23241cf614
\ No newline at end of file
+2ac7b504147a4c4c56375cba23ad8588
\ No newline at end of file
index 031bf151a40d23fd57a86db472f5b41f67b5975e..4162ccffa064aea704fffa736f1699200c30095c 100644 (file)
Binary files a/LayoutTests/svg/W3C-SVG-1.1/pservers-pattern-01-b-expected.png and b/LayoutTests/svg/W3C-SVG-1.1/pservers-pattern-01-b-expected.png differ
index 50be26e0b207dcc0918aab20b72b630d80b004fb..b7aac18a98ae9bb71191fe465688a2f0475d20e1 100644 (file)
@@ -1,3 +1,20 @@
+2005-10-23  Julien Palmas <julien.palmas@gmail.com>
+
+        Reviewed by eseidel.
+
+        Finally fix pattern "userspaceonuse" support.
+        Several test cases already cover this.
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=5361
+
+        * kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
+        (KRenderingPaintServerPatternQuartz::draw):
+        * svg-tests/W3C-SVG-1.1/pservers-grad-03-b-expected.checksum:
+        * svg-tests/W3C-SVG-1.1/pservers-grad-03-b-expected.png:
+        * svg-tests/W3C-SVG-1.1/pservers-grad-06-b-expected.checksum:
+        * svg-tests/W3C-SVG-1.1/pservers-grad-06-b-expected.png:
+        * svg-tests/W3C-SVG-1.1/pservers-pattern-01-b-expected.checksum:
+        * svg-tests/W3C-SVG-1.1/pservers-pattern-01-b-expected.png:
+
 2005-10-23  Julien Palmas <julien.palmas@gmail.com>
 
         Reviewed by eseidel.
index 759df83c89513138fa9f4dd29a7a138a3227e67d..96730d68a13dd887d3a04e5f9016c71dd675396e 100644 (file)
@@ -106,15 +106,10 @@ void KRenderingPaintServerPatternQuartz::draw(KRenderingDeviceContext *rendering
        // Patterns don't seem to resepect the CTM unless we make them...
        CGAffineTransform ctm = CGContextGetCTM(context);
        CGAffineTransform transform = CGAffineTransform(patternTransform().qmatrix());
-       CGSize phase = CGSizeMake(x(), y());
-       if (boundingBoxMode()) {
-               // get the object bbox
-               CGRect objectBBox = CGContextGetPathBoundingBox(context);
-               phase.width += objectBBox.origin.x;
-               phase.height += objectBBox.origin.y;
-       }
-       transform = CGAffineTransformTranslate(transform, phase.width, phase.height);
        transform = CGAffineTransformConcat(transform, ctm);
+    
+    CGSize phase = CGSizeMake(x(), y());
+    CGContextSetPatternPhase(context, phase);
                
        CGPatternCallbacks callbacks = {0, patternCallback, NULL};
        CGPatternRef pattern = CGPatternCreate (
@@ -131,19 +126,6 @@ void KRenderingPaintServerPatternQuartz::draw(KRenderingDeviceContext *rendering
        
        CGColorSpaceRef patternSpace = CGColorSpaceCreatePattern(NULL);
        
-       
-//     CGSize phase = CGSizeMake(x(), y());
-//     if (boundingBoxMode()) {
-//             // get the object bbox
-//             CGRect objectBBox = CGContextGetPathBoundingBox(context);
-//             phase.width += objectBBox.origin.x;
-//             phase.height += objectBBox.origin.y;
-//     }
-       //CGContextSetPatternPhase(context, phase);
-       CGContextSetPatternPhase(context, CGSizeZero); // FIXME: this might be right... might not.
-       
-       //NSLog(@"pattern phase: %f, %f transform: %@", phase.width, phase.height, CFStringFromCGAffineTransform(transform));
-       
        if ( (type & APPLY_TO_FILL) && style->isFilled() ) {
                CGContextSetFillColorSpace(context, patternSpace);
                CGContextSetFillPattern(context, pattern, &alpha);