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

zimmermann at webkit.org zimmermann at webkit.org
Fri Feb 26 22:15:58 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit def3841a8795e574d27ab9e8c5a8e7047f864f9f
Author: zimmermann at webkit.org <zimmermann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 9 16:08:18 2010 +0000

    2010-02-09  Nikolas Zimmermann  <nzimmermann at rim.com>
    
            Reviewed by Dirk Schulze.
    
            No scroll bars are displayed for standalone SVG image
            https://bugs.webkit.org/show_bug.cgi?id=11225
    
            Height and width defined for svg element are not honored
            https://bugs.webkit.org/show_bug.cgi?id=24033
    
            SVG file does not pan and has no scroll bars
            https://bugs.webkit.org/show_bug.cgi?id=24448
    
            Adapt to SVG 1.1 errata to change the overflow handling:
            Replace "svg { overflow: hidden }"  by "svg:not(:root) { overflow: hidden }" to allow standalone SVG documents to contain scrolllbars.
            Agreed by SVG WG to make this the default behaviour, already implemented by Opera & FireFox (partial support).
    
            Add new tests in svg/overflow covering all special SVG css overflow handling rules on inner/outer svg elements.
    
            Tests: svg/overflow/overflow-on-inner-svg-element-defaults.svg
                   svg/overflow/overflow-on-inner-svg-element.svg
                   svg/overflow/overflow-on-outermost-svg-element-defaults.svg
                   svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1.svg
                   svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2.svg
                   svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3.svg
                   svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto.xhtml
                   svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults.xhtml
                   svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden.xhtml
                   svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll.xhtml
                   svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible.xhtml
    
            * css/svg.css: Change default <svg> overflow rule to only apply to inner <svg> elements.
            * page/FrameView.cpp:
            (WebCore::FrameView::layout): Only apply overflow rules for non-standalone SVG documents.
            * rendering/RenderSVGRoot.cpp: Remove all calls to isOverflowHidden - it's always the case for the outermost SVG element, see spec + errata.
            (WebCore::RenderSVGRoot::paint): Always clip to initial viewport size.
            (WebCore::RenderSVGRoot::computeRectForRepaint): Ditto.
            (WebCore::RenderSVGRoot::nodeAtPoint): Simplify.
            * rendering/RenderSVGViewportContainer.cpp:
            (WebCore::RenderSVGViewportContainer::applyViewportClip): Use isOverflowHidden() instead of a manual oveflow query and clip in float precision.
            * rendering/SVGRenderSupport.cpp:
            (WebCore::SVGRenderBase::isOverflowHidden): Simplify implementation, assure the function is not called anymore for RenderSVGRoot objects.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54551 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6e60cca..cfbeda4 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,76 @@
+2010-02-09  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Dirk Schulze.
+
+        No scroll bars are displayed for standalone SVG image
+        https://bugs.webkit.org/show_bug.cgi?id=11225
+
+        Height and width defined for svg element are not honored
+        https://bugs.webkit.org/show_bug.cgi?id=24033
+
+        SVG file does not pan and has no scroll bars
+        https://bugs.webkit.org/show_bug.cgi?id=24448
+
+        Modify some tests to account that overflow is now properly handled. Add new results for several overflow tests.
+
+        * platform/mac/svg/custom/baseval-animval-equality-expected.txt:
+        * platform/mac/svg/custom/focus-ring-expected.txt:
+        * platform/mac/svg/custom/foreignObject-crash-on-hover-expected.txt:
+        * platform/mac/svg/custom/path-bad-data-expected.txt:
+        * platform/mac/svg/overflow: Added.
+        * platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.checksum: Added.
+        * platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.png: Added.
+        * platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.txt: Added.
+        * platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.checksum: Added.
+        * platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.png: Added.
+        * platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.txt: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.checksum: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.png: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.txt: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.checksum: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.png: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.txt: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.checksum: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.png: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.txt: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.checksum: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.png: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.txt: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.checksum: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.png: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.txt: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.checksum: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.png: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.txt: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.checksum: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.png: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.txt: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.checksum: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.png: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.txt: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.checksum: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.png: Added.
+        * platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.txt: Added.
+        * platform/mac/svg/text/text-gradient-positioning-expected.checksum:
+        * platform/mac/svg/text/text-gradient-positioning-expected.png:
+        * platform/mac/svg/text/text-gradient-positioning-expected.txt:
+        * svg/custom/focus-ring.svg: Shrink viewport size to avoid displaying scrollbars.
+        * svg/custom/foreignObject-crash-on-hover.xml: Ditto.
+        * svg/custom/path-bad-data.svg: Ditto.
+        * svg/overflow: Added.
+        * svg/overflow/overflow-on-inner-svg-element-defaults.svg: Added.
+        * svg/overflow/overflow-on-inner-svg-element.svg: Added.
+        * svg/overflow/overflow-on-outermost-svg-element-defaults.svg: Added.
+        * svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1.svg: Added.
+        * svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2.svg: Added.
+        * svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3.svg: Added.
+        * svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto.xhtml: Added.
+        * svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults.xhtml: Added.
+        * svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden.xhtml: Added.
+        * svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll.xhtml: Added.
+        * svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible.xhtml: Added.
+        * svg/text/text-gradient-positioning.svg: Shrink viewport size to avoid displaying scrollbars.
+
 2010-02-09  Yuzo Fujishima  <yuzo at google.com>
 
         Unreviewed.
diff --git a/LayoutTests/platform/mac/svg/custom/baseval-animval-equality-expected.txt b/LayoutTests/platform/mac/svg/custom/baseval-animval-equality-expected.txt
index 9ab25bf..eb980eb 100644
--- a/LayoutTests/platform/mac/svg/custom/baseval-animval-equality-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/baseval-animval-equality-expected.txt
@@ -2,39 +2,39 @@ layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 600x400
   RenderSVGRoot {svg} at (0,0) size 600x400
-    RenderForeignObject {foreignObject} at (0,0) size 800x198
-      RenderBlock {html} at (0,0) size 800x198
-        RenderBlock {div} at (0,0) size 800x198
-          RenderBlock (anonymous) at (0,0) size 800x18
+    RenderForeignObject {foreignObject} at (0,0) size 785x198
+      RenderBlock {html} at (0,0) size 785x198
+        RenderBlock {div} at (0,0) size 785x198
+          RenderBlock (anonymous) at (0,0) size 785x18
             RenderText {#text} at (0,0) size 560x18
               text run at (0,0) width 560: "This tests to make sure that baseVal and animVal are tied when animation is not enabled:"
-          RenderBlock {div} at (0,18) size 800x18
+          RenderBlock {div} at (0,18) size 785x18
             RenderText {#text} at (0,0) size 152x18
               text run at (0,0) width 152: "svg.x.baseVal.value = 0"
-          RenderBlock {div} at (0,36) size 800x18
+          RenderBlock {div} at (0,36) size 785x18
             RenderText {#text} at (0,0) size 155x18
               text run at (0,0) width 155: "svg.x.animVal.value = 0"
-          RenderBlock {div} at (0,54) size 800x18
+          RenderBlock {div} at (0,54) size 785x18
             RenderText {#text} at (0,0) size 205x18
               text run at (0,0) width 205: "setting svg.x.baseVal.value = 10"
-          RenderBlock {div} at (0,72) size 800x18
+          RenderBlock {div} at (0,72) size 785x18
             RenderText {#text} at (0,0) size 160x18
               text run at (0,0) width 160: "svg.x.baseVal.value = 10"
-          RenderBlock {div} at (0,90) size 800x18
+          RenderBlock {div} at (0,90) size 785x18
             RenderText {#text} at (0,0) size 163x18
               text run at (0,0) width 163: "svg.x.animVal.value = 10"
-          RenderBlock {div} at (0,108) size 800x18
+          RenderBlock {div} at (0,108) size 785x18
             RenderText {#text} at (0,0) size 122x18
               text run at (0,0) width 122: "SUCCESS (1 of 2)"
-          RenderBlock {div} at (0,126) size 800x18
+          RenderBlock {div} at (0,126) size 785x18
             RenderText {#text} at (0,0) size 200x18
               text run at (0,0) width 200: "setting svg.x.animVal.value = 5"
-          RenderBlock {div} at (0,144) size 800x18
+          RenderBlock {div} at (0,144) size 785x18
             RenderText {#text} at (0,0) size 152x18
               text run at (0,0) width 152: "svg.x.baseVal.value = 5"
-          RenderBlock {div} at (0,162) size 800x18
+          RenderBlock {div} at (0,162) size 785x18
             RenderText {#text} at (0,0) size 155x18
               text run at (0,0) width 155: "svg.x.animVal.value = 5"
-          RenderBlock {div} at (0,180) size 800x18
+          RenderBlock {div} at (0,180) size 785x18
             RenderText {#text} at (0,0) size 122x18
               text run at (0,0) width 122: "SUCCESS (2 of 2)"
diff --git a/LayoutTests/platform/mac/svg/custom/focus-ring-expected.txt b/LayoutTests/platform/mac/svg/custom/focus-ring-expected.txt
index c61d67b..518fa29 100644
--- a/LayoutTests/platform/mac/svg/custom/focus-ring-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/focus-ring-expected.txt
@@ -1,8 +1,8 @@
 KCanvasResource {id="clip" [type=CLIPPER] [clip data=[[winding=NON-ZERO] [path=M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z]]]}
-layer at (0,0) size 800x1000
+layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x1000
-  RenderSVGRoot {svg} at (0,0) size 800x1000
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (0,0) size 800x600
     RenderPath {circle} at (15,10) size 100x100 [fill={[type=SOLID] [color=#FFA500]}] [data="M115.00,60.00 L114.90,63.14 L114.61,66.27 L114.11,69.37 L113.43,72.43 L112.55,75.45 L111.49,78.41 L110.24,81.29 L108.82,84.09 L107.22,86.79 L105.45,89.39 L103.53,91.87 L101.45,94.23 L99.23,96.45 L96.87,98.53 L94.39,100.45 L91.79,102.22 L89.09,103.82 L86.29,105.24 L83.41,106.49 L80.45,107.55 L77.43,108.43 L74.37,109.11 L71.27,109.61 L68.14,109.90 L65.00,110.00 L61.86,109.90 L58.73,109.61 L55.63,109.11 L52.57,108.43 L49.55,107.55 L46.59,106.49 L43.71,105.24 L40.91,103.82 L38.21,102.22 L35.61,100.45 L33.13,98.53 L30.77,96.45 L28.55,94.23 L26.47,91.87 L24.55,89.39 L22.78,86.79 L21.18,84.09 L19.76,81.29 L18.51,78.41 L17.45,75.45 L16.57,72.43 L15.89,69.37 L15.39,66.27 L15.10,63.14 L15.00,60.00 L15.10,56.86 L15.39,53.73 L15.89,50.63 L16.57,47.57 L17.45,44.55 L18.51,41.59 L19.76,38.71 L21.18,35.91 L22.78,33.21 L24.55,30.61 L26.47,28.13 L28.55,25.77 L30.77,23.55 L33.13,21.47 L35.61,19.55 L38.21,17.78 L40.91,16.18 L43.71,14.76 L46.59,13.51 L49.55,12.45 L52.57,11.57 L55.63,10.89 L58.73,10.39 L61.86,10.10 L65.00,10.00 L68.14,10.10 L71.27,10.39 L74.37,10.89 L77.43,11.57 L80.45,12.45 L83.41,13.51 L86.29,14.76 L89.09,16.18 L91.79,17.78 L94.39,19.55 L96.87,21.47 L99.23,23.55 L101.45,25.77 L103.53,28.13 L105.45,30.61 L107.22,33.21 L108.82,35.91 L110.24,38.71 L111.49,41.59 L112.55,44.55 L113.43,47.57 L114.11,50.63 L114.61,53.73 L114.90,56.86 Z"]
     RenderPath {path} at (140,10) size 100x100 [fill={[type=SOLID] [color=#FFA500]}] [data="M140.00,10.00 L190.00,110.00 L240.00,60.00 L220.00,60.00 L200.00,30.00 Z"]
     RenderSVGContainer {g} at (270,10) size 100x100
diff --git a/LayoutTests/platform/mac/svg/custom/foreignObject-crash-on-hover-expected.txt b/LayoutTests/platform/mac/svg/custom/foreignObject-crash-on-hover-expected.txt
index b6c2c91..c21fa9b 100644
--- a/LayoutTests/platform/mac/svg/custom/foreignObject-crash-on-hover-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/foreignObject-crash-on-hover-expected.txt
@@ -1,7 +1,7 @@
-layer at (0,0) size 800x800
+layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 800x800
-  RenderSVGRoot {svg} at (0,0) size 800x800
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (0,0) size 800x600
     RenderSVGContainer {g} at (49,49) size 302x302 [transform={m=((1.00,0.00)(0.00,1.00)) t=(50.00,50.00)}]
       RenderPath {polygon} at (49,49) size 302x302 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#ADD8E6]}] [data="M0.00,0.00 L300.00,0.00 L300.00,300.00 L0.00,300.00 Z"]
       RenderForeignObject {foreignObject} at (0,0) size 280x280
diff --git a/LayoutTests/platform/mac/svg/custom/path-bad-data-expected.txt b/LayoutTests/platform/mac/svg/custom/path-bad-data-expected.txt
index 01dee7d..a1dd1e0 100644
--- a/LayoutTests/platform/mac/svg/custom/path-bad-data-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/path-bad-data-expected.txt
@@ -6,10 +6,10 @@ CONSOLE MESSAGE: line 13: Error: Problem parsing d="M 0 0 L 10 10% Z"
 CONSOLE MESSAGE: line 14: Error: Problem parsing d="M"
 CONSOLE MESSAGE: line 15: Error: Problem parsing d="M 0"
 CONSOLE MESSAGE: line 16: Error: Problem parsing d="M 0 0 0"
-layer at (0,0) size 800x755
+layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 755x755
-  RenderSVGRoot {svg} at (0,0) size 755x755
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (0,0) size 800x600
     RenderPath {path} at (0,0) size 200x200 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L200.00,0.00 L200.00,200.00 L0.00,200.00"]
     RenderPath {path} at (0,0) size 0x0 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#FF0000]}] [data=""]
     RenderPath {path} at (0,0) size 0x0 [stroke={[type=SOLID] [color=#FF0000]}] [fill={[type=SOLID] [color=#FF0000]}] [data=""]
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.checksum b/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.checksum
new file mode 100644
index 0000000..cb2b6c0
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.checksum
@@ -0,0 +1 @@
+b1c124a929834e98057ec9a6592a2fb0
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.png b/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.png
new file mode 100644
index 0000000..a57261e
Binary files /dev/null and b/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.txt b/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.txt
new file mode 100644
index 0000000..b6a613e
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-defaults-expected.txt
@@ -0,0 +1,6 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 500x500
+  RenderSVGRoot {svg} at (0,0) size 500x500
+    RenderSVGViewportContainer {svg} at (10,10) size 490x490
+      RenderPath {rect} at (10,10) size 490x490 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L4000.00,0.00 L4000.00,4000.00 L0.00,4000.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.checksum b/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.checksum
new file mode 100644
index 0000000..bb08239
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.checksum
@@ -0,0 +1 @@
+5b2fdd3405521e71be73f50391511d7f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.png b/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.png
new file mode 100644
index 0000000..30ce983
Binary files /dev/null and b/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.txt b/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.txt
new file mode 100644
index 0000000..6cc9828
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-inner-svg-element-expected.txt
@@ -0,0 +1,74 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 500x500
+  RenderSVGRoot {svg} at (0,0) size 500x500
+    RenderSVGViewportContainer {svg} at (50,50) size 100x100
+      RenderPath {rect} at (50,50) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+      RenderPath {rect} at (50,50) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
+    RenderSVGViewportContainer {svg} at (150,50) size 50x50
+      RenderPath {rect} at (150,50) size 25x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L25.00,0.00 L25.00,50.00 L0.00,50.00 Z"]
+      RenderPath {rect} at (175,50) size 25x50 [fill={[type=SOLID] [color=#008000]}] [data="M25.00,0.00 L50.00,0.00 L50.00,50.00 L25.00,50.00 Z"]
+    RenderSVGViewportContainer {svg} at (50,150) size 50x50
+      RenderPath {rect} at (50,150) size 25x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L25.00,0.00 L25.00,50.00 L0.00,50.00 Z"]
+      RenderPath {rect} at (75,150) size 25x50 [fill={[type=SOLID] [color=#008000]}] [data="M25.00,0.00 L50.00,0.00 L50.00,50.00 L25.00,50.00 Z"]
+    RenderSVGViewportContainer {svg} at (150,150) size 100x100
+      RenderPath {rect} at (150,150) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+      RenderPath {rect} at (150,150) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
+    RenderSVGContainer {g} at (250,250) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(200.00,200.00)}]
+      RenderSVGViewportContainer {svg} at (250,250) size 100x100
+        RenderPath {rect} at (250,250) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+        RenderPath {rect} at (250,250) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
+      RenderSVGViewportContainer {svg} at (350,250) size 50x50
+        RenderPath {rect} at (350,250) size 25x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L25.00,0.00 L25.00,50.00 L0.00,50.00 Z"]
+        RenderPath {rect} at (375,250) size 25x50 [fill={[type=SOLID] [color=#008000]}] [data="M25.00,0.00 L50.00,0.00 L50.00,50.00 L25.00,50.00 Z"]
+      RenderSVGViewportContainer {svg} at (250,350) size 50x50
+        RenderPath {rect} at (250,350) size 25x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L25.00,0.00 L25.00,50.00 L0.00,50.00 Z"]
+        RenderPath {rect} at (275,350) size 25x50 [fill={[type=SOLID] [color=#008000]}] [data="M25.00,0.00 L50.00,0.00 L50.00,50.00 L25.00,50.00 Z"]
+      RenderSVGViewportContainer {svg} at (350,350) size 100x100
+        RenderPath {rect} at (350,350) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+        RenderPath {rect} at (350,350) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGContainer {g} at (50,50) size 200x200
+        RenderSVGViewportContainer {svg} at (50,50) size 100x100
+          RenderPath {rect} at (50,50) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+          RenderPath {rect} at (50,50) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
+        RenderSVGViewportContainer {svg} at (150,50) size 50x50
+          RenderPath {rect} at (150,50) size 25x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L25.00,0.00 L25.00,50.00 L0.00,50.00 Z"]
+          RenderPath {rect} at (175,50) size 25x50 [fill={[type=SOLID] [color=#008000]}] [data="M25.00,0.00 L50.00,0.00 L50.00,50.00 L25.00,50.00 Z"]
+        RenderSVGViewportContainer {svg} at (50,150) size 50x50
+          RenderPath {rect} at (50,150) size 25x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L25.00,0.00 L25.00,50.00 L0.00,50.00 Z"]
+          RenderPath {rect} at (75,150) size 25x50 [fill={[type=SOLID] [color=#008000]}] [data="M25.00,0.00 L50.00,0.00 L50.00,50.00 L25.00,50.00 Z"]
+        RenderSVGViewportContainer {svg} at (150,150) size 100x100
+          RenderPath {rect} at (150,150) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+          RenderPath {rect} at (150,150) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
+    RenderSVGContainer {g} at (0,50) size 400x400 [transform={m=((0.00,1.00)(-1.00,0.00)) t=(450.00,0.00)}]
+      RenderSVGContainer {use} at (200,50) size 200x200
+        RenderSVGContainer {g} at (200,50) size 200x200
+          RenderSVGContainer {g} at (200,50) size 200x200
+            RenderSVGViewportContainer {svg} at (300,50) size 100x100
+              RenderPath {rect} at (300,50) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+              RenderPath {rect} at (350,50) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
+            RenderSVGViewportContainer {svg} at (350,150) size 50x50
+              RenderPath {rect} at (350,150) size 50x25 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L25.00,0.00 L25.00,50.00 L0.00,50.00 Z"]
+              RenderPath {rect} at (350,175) size 50x25 [fill={[type=SOLID] [color=#008000]}] [data="M25.00,0.00 L50.00,0.00 L50.00,50.00 L25.00,50.00 Z"]
+            RenderSVGViewportContainer {svg} at (250,50) size 50x50
+              RenderPath {rect} at (250,50) size 50x25 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L25.00,0.00 L25.00,50.00 L0.00,50.00 Z"]
+              RenderPath {rect} at (250,75) size 50x25 [fill={[type=SOLID] [color=#008000]}] [data="M25.00,0.00 L50.00,0.00 L50.00,50.00 L25.00,50.00 Z"]
+            RenderSVGViewportContainer {svg} at (200,150) size 100x100
+              RenderPath {rect} at (200,150) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+              RenderPath {rect} at (250,150) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
+      RenderSVGContainer {use} at (0,250) size 200x200
+        RenderSVGContainer {g} at (0,250) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(200.00,200.00)}]
+          RenderSVGContainer {g} at (0,250) size 200x200
+            RenderSVGViewportContainer {svg} at (100,250) size 100x100
+              RenderPath {rect} at (100,250) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+              RenderPath {rect} at (150,250) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
+            RenderSVGViewportContainer {svg} at (150,350) size 50x50
+              RenderPath {rect} at (150,350) size 50x25 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L25.00,0.00 L25.00,50.00 L0.00,50.00 Z"]
+              RenderPath {rect} at (150,375) size 50x25 [fill={[type=SOLID] [color=#008000]}] [data="M25.00,0.00 L50.00,0.00 L50.00,50.00 L25.00,50.00 Z"]
+            RenderSVGViewportContainer {svg} at (50,250) size 50x50
+              RenderPath {rect} at (50,250) size 50x25 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L25.00,0.00 L25.00,50.00 L0.00,50.00 Z"]
+              RenderPath {rect} at (50,275) size 50x25 [fill={[type=SOLID] [color=#008000]}] [data="M25.00,0.00 L50.00,0.00 L50.00,50.00 L25.00,50.00 Z"]
+            RenderSVGViewportContainer {svg} at (0,350) size 100x100
+              RenderPath {rect} at (0,350) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00 L100.00,0.00 L100.00,100.00 L0.00,100.00 Z"]
+              RenderPath {rect} at (50,350) size 50x50 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L50.00,0.00 L50.00,50.00 L0.00,50.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.checksum b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.checksum
new file mode 100644
index 0000000..276b860
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.checksum
@@ -0,0 +1 @@
+26b5b7028d250bbd555d2bc2caad331d
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.png b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.png
new file mode 100644
index 0000000..a32f048
Binary files /dev/null and b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.txt b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.txt
new file mode 100644
index 0000000..5460da2
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-defaults-expected.txt
@@ -0,0 +1,5 @@
+layer at (0,0) size 4000x4000
+  RenderView at (0,0) size 785x585
+layer at (0,0) size 4000x4000
+  RenderSVGRoot {svg} at (0,0) size 4000x4000
+    RenderPath {rect} at (0,0) size 4000x4000 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L4000.00,0.00 L4000.00,4000.00 L0.00,4000.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.checksum b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.checksum
new file mode 100644
index 0000000..276b860
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.checksum
@@ -0,0 +1 @@
+26b5b7028d250bbd555d2bc2caad331d
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.png b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.png
new file mode 100644
index 0000000..a32f048
Binary files /dev/null and b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.txt b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.txt
new file mode 100644
index 0000000..5460da2
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1-expected.txt
@@ -0,0 +1,5 @@
+layer at (0,0) size 4000x4000
+  RenderView at (0,0) size 785x585
+layer at (0,0) size 4000x4000
+  RenderSVGRoot {svg} at (0,0) size 4000x4000
+    RenderPath {rect} at (0,0) size 4000x4000 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L4000.00,0.00 L4000.00,4000.00 L0.00,4000.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.checksum b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.checksum
new file mode 100644
index 0000000..276b860
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.checksum
@@ -0,0 +1 @@
+26b5b7028d250bbd555d2bc2caad331d
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.png b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.png
new file mode 100644
index 0000000..a32f048
Binary files /dev/null and b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.txt b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.txt
new file mode 100644
index 0000000..5460da2
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2-expected.txt
@@ -0,0 +1,5 @@
+layer at (0,0) size 4000x4000
+  RenderView at (0,0) size 785x585
+layer at (0,0) size 4000x4000
+  RenderSVGRoot {svg} at (0,0) size 4000x4000
+    RenderPath {rect} at (0,0) size 4000x4000 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L4000.00,0.00 L4000.00,4000.00 L0.00,4000.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.checksum b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.checksum
new file mode 100644
index 0000000..276b860
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.checksum
@@ -0,0 +1 @@
+26b5b7028d250bbd555d2bc2caad331d
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.png b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.png
new file mode 100644
index 0000000..a32f048
Binary files /dev/null and b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.txt b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.txt
new file mode 100644
index 0000000..5460da2
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3-expected.txt
@@ -0,0 +1,5 @@
+layer at (0,0) size 4000x4000
+  RenderView at (0,0) size 785x585
+layer at (0,0) size 4000x4000
+  RenderSVGRoot {svg} at (0,0) size 4000x4000
+    RenderPath {rect} at (0,0) size 4000x4000 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L4000.00,0.00 L4000.00,4000.00 L0.00,4000.00 Z"]
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.checksum b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.checksum
new file mode 100644
index 0000000..4006e9f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.checksum
@@ -0,0 +1 @@
+9ec976d6b814382eb45e021fe5fa22c8
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.png b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.png
new file mode 100644
index 0000000..a3844f4
Binary files /dev/null and b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.txt b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.txt
new file mode 100644
index 0000000..84a3f10
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x404
+  RenderBlock {html} at (0,0) size 800x404
+    RenderInline {body} at (0,0) size 400x18
+      RenderText {#text} at (0,0) size 0x0
+      RenderSVGRoot {svg} at (0,0) size 400x400
+        RenderPath {rect} at (0,0) size 400x400 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L4000.00,0.00 L4000.00,4000.00 L0.00,4000.00 Z"]
+      RenderText {#text} at (0,0) size 0x0
+    RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.checksum b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.checksum
new file mode 100644
index 0000000..278603d
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.checksum
@@ -0,0 +1 @@
+04a77465ca8e8b0d1d4d1e60112d2bd5
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.png b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.png
new file mode 100644
index 0000000..0e92aae
Binary files /dev/null and b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.txt b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.txt
new file mode 100644
index 0000000..1a3060b
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x604
+  RenderView at (0,0) size 785x585
+layer at (0,0) size 800x604
+  RenderBlock {html} at (0,0) size 785x604
+    RenderInline {body} at (0,0) size 800x18
+      RenderText {#text} at (0,0) size 0x0
+      RenderSVGRoot {svg} at (0,0) size 800x600
+        RenderPath {rect} at (0,0) size 800x600 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L4000.00,0.00 L4000.00,4000.00 L0.00,4000.00 Z"]
+      RenderText {#text} at (0,0) size 0x0
+    RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.checksum b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.checksum
new file mode 100644
index 0000000..4006e9f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.checksum
@@ -0,0 +1 @@
+9ec976d6b814382eb45e021fe5fa22c8
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.png b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.png
new file mode 100644
index 0000000..a3844f4
Binary files /dev/null and b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.txt b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.txt
new file mode 100644
index 0000000..84a3f10
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x404
+  RenderBlock {html} at (0,0) size 800x404
+    RenderInline {body} at (0,0) size 400x18
+      RenderText {#text} at (0,0) size 0x0
+      RenderSVGRoot {svg} at (0,0) size 400x400
+        RenderPath {rect} at (0,0) size 400x400 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L4000.00,0.00 L4000.00,4000.00 L0.00,4000.00 Z"]
+      RenderText {#text} at (0,0) size 0x0
+    RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.checksum b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.checksum
new file mode 100644
index 0000000..4006e9f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.checksum
@@ -0,0 +1 @@
+9ec976d6b814382eb45e021fe5fa22c8
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.png b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.png
new file mode 100644
index 0000000..a3844f4
Binary files /dev/null and b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.txt b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.txt
new file mode 100644
index 0000000..84a3f10
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x404
+  RenderBlock {html} at (0,0) size 800x404
+    RenderInline {body} at (0,0) size 400x18
+      RenderText {#text} at (0,0) size 0x0
+      RenderSVGRoot {svg} at (0,0) size 400x400
+        RenderPath {rect} at (0,0) size 400x400 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L4000.00,0.00 L4000.00,4000.00 L0.00,4000.00 Z"]
+      RenderText {#text} at (0,0) size 0x0
+    RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.checksum b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.checksum
new file mode 100644
index 0000000..4006e9f
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.checksum
@@ -0,0 +1 @@
+9ec976d6b814382eb45e021fe5fa22c8
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.png b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.png
new file mode 100644
index 0000000..a3844f4
Binary files /dev/null and b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.txt b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.txt
new file mode 100644
index 0000000..84a3f10
--- /dev/null
+++ b/LayoutTests/platform/mac/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x404
+  RenderBlock {html} at (0,0) size 800x404
+    RenderInline {body} at (0,0) size 400x18
+      RenderText {#text} at (0,0) size 0x0
+      RenderSVGRoot {svg} at (0,0) size 400x400
+        RenderPath {rect} at (0,0) size 400x400 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00 L4000.00,0.00 L4000.00,4000.00 L0.00,4000.00 Z"]
+      RenderText {#text} at (0,0) size 0x0
+    RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.checksum b/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.checksum
index 2c14dba..454aaed 100644
--- a/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.checksum
+++ b/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.checksum
@@ -1 +1 @@
-5c0c51950ad3e846aec9734d2e36e766
\ No newline at end of file
+772fa354840f50d49bc6d9c715228fcb
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.png b/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.png
index f8822fe..3dfd780 100644
Binary files a/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.png and b/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.txt b/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.txt
index 84b965c..d65fa53 100644
--- a/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.txt
+++ b/LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.txt
@@ -1,18 +1,18 @@
 KRenderingPaintServer {id="gradient" [type=LINEAR-GRADIENT] [stops=[(0.00,#FF0000), (1.00,#FF0000)]] [bounding box mode=0] [transform={m=((1.23,0.00)(0.00,1.26)) t=(-38.87,-39.26)}] [start=(120.03,161.07)] [end=(497.52,184.77)]}
-layer at (0,0) size 850x600
+layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
-layer at (0,0) size 850x200
-  RenderSVGRoot {svg} at (0,0) size 850x200
+layer at (0,0) size 800x200
+  RenderSVGRoot {svg} at (0,0) size 800x200
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
       RenderSVGHiddenContainer {linearGradient} at (0,0) size 0x0
         RenderSVGGradientStop {stop} at (0,0) size 0x0
         RenderSVGGradientStop {stop} at (0,0) size 0x0
-    RenderSVGContainer {g} at (0,54) size 826x59
-      RenderSVGText {text} at (0,100) size 826x59 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,-46) size 826x59
-          chunk 1 text run 1 at (0.00,100.00) startOffset 0 endOffset 37 width 826.00: "This should be GREEN and appear once."
-    RenderSVGContainer {use} at (0,54) size 826x59
-      RenderSVGContainer {g} at (0,54) size 826x59
-        RenderSVGText {text} at (0,100) size 826x59 contains 1 chunk(s)
-          RenderSVGInlineText {#text} at (0,-46) size 826x59
-            chunk 1 text run 1 at (0.00,100.00) startOffset 0 endOffset 37 width 826.00: "This should be GREEN and appear once."
+    RenderSVGContainer {g} at (0,64) size 660x46
+      RenderSVGText {text} at (0,100) size 660x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,-36) size 660x46
+          chunk 1 text run 1 at (0.00,100.00) startOffset 0 endOffset 37 width 660.00: "This should be GREEN and appear once."
+    RenderSVGContainer {use} at (0,64) size 660x46
+      RenderSVGContainer {g} at (0,64) size 660x46
+        RenderSVGText {text} at (0,100) size 660x46 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,-36) size 660x46
+            chunk 1 text run 1 at (0.00,100.00) startOffset 0 endOffset 37 width 660.00: "This should be GREEN and appear once."
diff --git a/LayoutTests/svg/custom/focus-ring.svg b/LayoutTests/svg/custom/focus-ring.svg
index 53d9a81..345c37e 100644
--- a/LayoutTests/svg/custom/focus-ring.svg
+++ b/LayoutTests/svg/custom/focus-ring.svg
@@ -1,4 +1,4 @@
-<svg width="800" height="1000" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
   <style>
     .ring {
       outline: -webkit-focus-ring-color 5px auto;
diff --git a/LayoutTests/svg/custom/foreignObject-crash-on-hover.xml b/LayoutTests/svg/custom/foreignObject-crash-on-hover.xml
index 26b5f87..6fbfa66 100644
--- a/LayoutTests/svg/custom/foreignObject-crash-on-hover.xml
+++ b/LayoutTests/svg/custom/foreignObject-crash-on-hover.xml
@@ -4,7 +4,7 @@
 <svg xmlns="http://www.w3.org/2000/svg"
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xmlns:html="http://www.w3.org/1999/xhtml"
-     height="800" width="800">
+     height="600" width="800">
   <g transform="translate(50,50)">
     <polygon points="0,0 300,0 300,300 0,300" style="fill:lightblue; stroke:red;"/>
     <!-- switch -->
diff --git a/LayoutTests/svg/custom/path-bad-data.svg b/LayoutTests/svg/custom/path-bad-data.svg
index 0314faf..5fd3157 100644
--- a/LayoutTests/svg/custom/path-bad-data.svg
+++ b/LayoutTests/svg/custom/path-bad-data.svg
@@ -2,8 +2,8 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 <svg
-   width="200mm"
-   height="200mm"
+   width="800"
+   height="600"
    xmlns="http://www.w3.org/2000/svg">
    <path fill="green" d="M 0 0 L 200 0 L 200 200 L 0 200"/>
    <path fill="red" stroke="red" d="M 0 0 L 10 10 10"/>
diff --git a/LayoutTests/svg/overflow/overflow-on-inner-svg-element-defaults.svg b/LayoutTests/svg/overflow/overflow-on-inner-svg-element-defaults.svg
new file mode 100644
index 0000000..c88089a
--- /dev/null
+++ b/LayoutTests/svg/overflow/overflow-on-inner-svg-element-defaults.svg
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<!-- 
+ Verify default overflow rules for inner <svg> elements.
+ You should see no scrollbars on the inner <svg> element, and no scrollbars for the whole document as long as
+ the window size is larger or equal than 500x500 (800x600 is default for DRT -> no scrollbars should appear)
+
+ Spec reference:
+ When an outermost 'svg' element is embedded inline within a parent XML grammar which uses CSS layout [CSS2-LAYOUT]
+ or XSL formatting [XSL], if the 'overflow' property has the value hidden or scroll, then the user agent will
+ establish an initial clipping path equal to the bounds of the initial viewport; otherwise, the initial clipping
+ path is set according to the clipping rules as defined in [CSS2-overflow].
+-->
+<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
+    <svg x="10" y="10" width="480" height="480">
+        <rect width="4000" height="4000" fill="green"/>
+    </svg>
+</svg>
diff --git a/LayoutTests/svg/overflow/overflow-on-inner-svg-element.svg b/LayoutTests/svg/overflow/overflow-on-inner-svg-element.svg
new file mode 100644
index 0000000..2eaa27a
--- /dev/null
+++ b/LayoutTests/svg/overflow/overflow-on-inner-svg-element.svg
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<!-- 
+ Verify overflow handling for inner <svg> elements.
+ You should see 16 equally sized, equidistant green rectangles, and no scrollbars.
+
+ Spec reference:
+ For those elements to which the 'overflow' property can apply, if the 'overflow' property has the value hidden
+ or scroll, the effect is that a new clipping path in the shape of a rectangle is created. The result is equivalent
+ to defining a 'clipPath' element whose content is a 'rect' element which defines the equivalent rectangle, and then
+ specifying the <uri> of this 'clipPath' element on the 'clip-path' property for the given element.
+
+ Spec reference:
+ Within SVG content, the value auto is equivalent to the value visible.
+-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" height="500">
+    <svg x="50" y="50" width="50" height="50" style="overflow: hidden">
+        <rect width="100" height="100" fill="red"/>
+        <rect width="50" height="50" fill="green"/>
+    </svg>
+
+    <svg x="150" y="50" width="25" height="25" style="overflow: visible">
+        <rect width="25" height="50" fill="green"/>
+        <rect x="25" width="25" height="50" fill="green"/>
+    </svg>
+
+    <svg x="50" y="150" width="25" height="25" style="overflow: auto">
+        <rect width="25" height="50" fill="green"/>
+        <rect x="25" width="25" height="50" fill="green"/>
+    </svg>
+
+    <svg x="150" y="150" width="50" height="50" style="overflow: scroll">
+        <rect width="100" height="100" fill="red"/>
+        <rect width="50" height="50" fill="green"/>
+    </svg>
+
+    <g transform="translate(200,200)">
+        <svg x="50" y="50" width="50" height="50" style="overflow: hidden">
+            <rect width="100" height="100" fill="red"/>
+            <rect width="50" height="50" fill="green"/>
+        </svg>
+
+        <svg x="150" y="50" width="25" height="25" style="overflow: visible">
+            <rect width="25" height="50" fill="green"/>
+            <rect x="25" width="25" height="50" fill="green"/>
+        </svg>
+
+        <svg x="50" y="150" width="25" height="25" style="overflow: auto">
+            <rect width="25" height="50" fill="green"/>
+            <rect x="25" width="25" height="50" fill="green"/>
+        </svg>
+
+        <svg x="150" y="150" width="50" height="50" style="overflow: scroll">
+            <rect width="100" height="100" fill="red"/>
+            <rect width="50" height="50" fill="green"/>
+        </svg>
+    </g>
+
+    <defs>
+        <g id="testContent">
+            <svg x="50" y="50" width="50" height="50" style="overflow: hidden">
+                <rect width="100" height="100" fill="red"/>
+                <rect width="50" height="50" fill="green"/>
+            </svg>
+
+            <svg x="150" y="50" width="25" height="25" style="overflow: visible">
+                <rect width="25" height="50" fill="green"/>
+                <rect x="25" width="25" height="50" fill="green"/>
+            </svg>
+
+            <svg x="50" y="150" width="25" height="25" style="overflow: auto">
+                <rect width="25" height="50" fill="green"/>
+                <rect x="25" width="25" height="50" fill="green"/>
+            </svg>
+
+            <svg x="150" y="150" width="50" height="50" style="overflow: scroll">
+                <rect width="100" height="100" fill="red"/>
+                <rect width="50" height="50" fill="green"/>
+            </svg>
+        </g>
+    </defs>
+
+    <g transform="rotate(90 225 225)">
+        <use xlink:href="#testContent"/>
+        <use x="200" y="200" xlink:href="#testContent"/>
+    </g>
+
+</svg>
diff --git a/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-defaults.svg b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-defaults.svg
new file mode 100644
index 0000000..7610ee2
--- /dev/null
+++ b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-defaults.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<!-- 
+ Verify default overflow rules for the outermost <svg> element.
+ You should see scrollbars, as the content is larger then the viewport.
+
+ Spec reference:
+ When an outermost SVG 'svg' element is stand-alone or embedded inline within a parent XML grammar which
+ does not use CSS layout [CSS2-LAYOUT] or XSL formatting [XSL], the 'overflow' property on the outermost
+ 'svg' element is ignored for the purposes of visual rendering and the initial clipping path is set to
+ the bounds of the initial viewport.
+-->
+<svg xmlns="http://www.w3.org/2000/svg" width="4000" height="4000">
+    <rect width="4000" height="4000" fill="green"/>
+</svg>
diff --git a/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1.svg b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1.svg
new file mode 100644
index 0000000..bc668d0
--- /dev/null
+++ b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<!-- 
+ Verify that setting overflow on the outermost <svg> element does not affect rendering.
+ You should see scrollbars, as the content is larger then the viewport.
+
+ Spec reference:
+ When an outermost SVG 'svg' element is stand-alone or embedded inline within a parent XML grammar which
+ does not use CSS layout [CSS2-LAYOUT] or XSL formatting [XSL], the 'overflow' property on the outermost
+ 'svg' element is ignored for the purposes of visual rendering and the initial clipping path is set to
+ the bounds of the initial viewport.
+-->
+<svg xmlns="http://www.w3.org/2000/svg" width="4000" height="4000" style="overflow: hidden">
+    <rect width="4000" height="4000" fill="green"/>
+</svg>
diff --git a/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2.svg b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2.svg
new file mode 100644
index 0000000..e260df9
--- /dev/null
+++ b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<!-- 
+ Verify that setting overflow on the outermost <svg> element does not affect rendering.
+ You should see scrollbars, as the content is larger then the viewport.
+
+ Spec reference:
+ When an outermost SVG 'svg' element is stand-alone or embedded inline within a parent XML grammar which
+ does not use CSS layout [CSS2-LAYOUT] or XSL formatting [XSL], the 'overflow' property on the outermost
+ 'svg' element is ignored for the purposes of visual rendering and the initial clipping path is set to
+ the bounds of the initial viewport.
+-->
+<svg xmlns="http://www.w3.org/2000/svg" width="4000" height="4000" style="overflow: auto">
+    <rect width="4000" height="4000" fill="green"/>
+</svg>
diff --git a/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3.svg b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3.svg
new file mode 100644
index 0000000..05f2f62
--- /dev/null
+++ b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<!-- 
+ Verify that setting overflow on the outermost <svg> element does not affect rendering.
+ You should see scrollbars, as the content is larger then the viewport.
+
+ Spec reference:
+ When an outermost SVG 'svg' element is stand-alone or embedded inline within a parent XML grammar which
+ does not use CSS layout [CSS2-LAYOUT] or XSL formatting [XSL], the 'overflow' property on the outermost
+ 'svg' element is ignored for the purposes of visual rendering and the initial clipping path is set to
+ the bounds of the initial viewport.
+-->
+<svg xmlns="http://www.w3.org/2000/svg" width="4000" height="4000" style="overflow: scroll">
+    <rect width="4000" height="4000" fill="green"/>
+</svg>
diff --git a/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto.xhtml b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto.xhtml
new file mode 100644
index 0000000..863f81b
--- /dev/null
+++ b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto.xhtml
@@ -0,0 +1,17 @@
+<!-- 
+ Verify default overflow rules for the outermost <svg> element in non-standalone documents.
+ You should see a 400x400 green rectangle, not covering the whole screen size.
+
+ Spec reference:
+ When an outermost 'svg' element is embedded inline within a parent XML grammar which uses CSS layout [CSS2-LAYOUT]
+ or XSL formatting [XSL], if the 'overflow' property has the value hidden or scroll, then the user agent will establish
+ an initial clipping path equal to the bounds of the initial viewport; otherwise, the initial clipping path is set
+ according to the clipping rules as defined in [CSS2-overflow].
+-->
+<html>
+<body>
+<svg xmlns="http://www.w3.org/2000/svg" style="overflow: auto" width="400" height="400">
+    <rect width="4000" height="4000" fill="green"/>
+</svg>
+</body>
+</html>
diff --git a/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults.xhtml b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults.xhtml
new file mode 100644
index 0000000..fe4a995
--- /dev/null
+++ b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults.xhtml
@@ -0,0 +1,17 @@
+<!-- 
+ Verify default overflow rules for the outermost <svg> element in non-standalone documents.
+ You should not see any scrollbars.
+
+ Spec reference:
+ When an outermost 'svg' element is embedded inline within a parent XML grammar which uses CSS layout [CSS2-LAYOUT]
+ or XSL formatting [XSL], if the 'overflow' property has the value hidden or scroll, then the user agent will establish
+ an initial clipping path equal to the bounds of the initial viewport; otherwise, the initial clipping path is set
+ according to the clipping rules as defined in [CSS2-overflow].
+-->
+<html>
+<body>
+<svg xmlns="http://www.w3.org/2000/svg" width="800" height="600">
+    <rect width="4000" height="4000" fill="green"/>
+</svg>
+</body>
+</html>
diff --git a/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden.xhtml b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden.xhtml
new file mode 100644
index 0000000..7742937
--- /dev/null
+++ b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden.xhtml
@@ -0,0 +1,17 @@
+<!-- 
+ Verify default overflow rules for the outermost <svg> element in non-standalone documents.
+ You should see a 400x400 green rectangle, not covering the whole screen size.
+
+ Spec reference:
+ When an outermost 'svg' element is embedded inline within a parent XML grammar which uses CSS layout [CSS2-LAYOUT]
+ or XSL formatting [XSL], if the 'overflow' property has the value hidden or scroll, then the user agent will establish
+ an initial clipping path equal to the bounds of the initial viewport; otherwise, the initial clipping path is set
+ according to the clipping rules as defined in [CSS2-overflow].
+-->
+<html>
+<body>
+<svg xmlns="http://www.w3.org/2000/svg" style="overflow: hidden" width="400" height="400">
+    <rect width="4000" height="4000" fill="green"/>
+</svg>
+</body>
+</html>
diff --git a/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll.xhtml b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll.xhtml
new file mode 100644
index 0000000..cf79049
--- /dev/null
+++ b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll.xhtml
@@ -0,0 +1,17 @@
+<!-- 
+ Verify default overflow rules for the outermost <svg> element in non-standalone documents.
+ You should see a 400x400 green rectangle, not covering the whole screen size.
+
+ Spec reference:
+ When an outermost 'svg' element is embedded inline within a parent XML grammar which uses CSS layout [CSS2-LAYOUT]
+ or XSL formatting [XSL], if the 'overflow' property has the value hidden or scroll, then the user agent will establish
+ an initial clipping path equal to the bounds of the initial viewport; otherwise, the initial clipping path is set
+ according to the clipping rules as defined in [CSS2-overflow].
+-->
+<html>
+<body>
+<svg xmlns="http://www.w3.org/2000/svg" style="overflow: scroll" width="400" height="400">
+    <rect width="4000" height="4000" fill="green"/>
+</svg>
+</body>
+</html>
diff --git a/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible.xhtml b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible.xhtml
new file mode 100644
index 0000000..48524e5
--- /dev/null
+++ b/LayoutTests/svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible.xhtml
@@ -0,0 +1,17 @@
+<!-- 
+ Verify default overflow rules for the outermost <svg> element in non-standalone documents.
+ You should see a 400x400 green rectangle, not covering the whole screen size.
+
+ Spec reference:
+ When an outermost 'svg' element is embedded inline within a parent XML grammar which uses CSS layout [CSS2-LAYOUT]
+ or XSL formatting [XSL], if the 'overflow' property has the value hidden or scroll, then the user agent will establish
+ an initial clipping path equal to the bounds of the initial viewport; otherwise, the initial clipping path is set
+ according to the clipping rules as defined in [CSS2-overflow].
+-->
+<html>
+<body>
+<svg xmlns="http://www.w3.org/2000/svg" style="overflow: visible" width="400" height="400">
+    <rect width="4000" height="4000" fill="green"/>
+</svg>
+</body>
+</html>
diff --git a/LayoutTests/svg/text/text-gradient-positioning.svg b/LayoutTests/svg/text/text-gradient-positioning.svg
index 606e040..4fdb8ee 100644
--- a/LayoutTests/svg/text/text-gradient-positioning.svg
+++ b/LayoutTests/svg/text/text-gradient-positioning.svg
@@ -1,4 +1,4 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="850" height="200">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="800" height="200">
   <defs>
 	 <linearGradient gradientTransform="matrix(1.23267, 0, 0, 1.25718, -38.8716, -39.2565)" gradientUnits="userSpaceOnUse" id="gradient" x1="120.02892" x2="497.52158" y1="161.06746" y2="184.7655">
         <stop offset="0" stop-color="red"/>
@@ -6,7 +6,7 @@
      </linearGradient>
   </defs>
   <g fill="url(#gradient)">
-    <text id="text" y="100" font-size="50px">This should be GREEN and appear once.</text>
+    <text id="text" y="100" font-size="40px">This should be GREEN and appear once.</text>
   </g>
   <use xlink:href="#text" fill="green"/>
 </svg>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index bd431be..87a0b64 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,46 @@
+2010-02-09  Nikolas Zimmermann  <nzimmermann at rim.com>
+
+        Reviewed by Dirk Schulze.
+
+        No scroll bars are displayed for standalone SVG image
+        https://bugs.webkit.org/show_bug.cgi?id=11225
+
+        Height and width defined for svg element are not honored
+        https://bugs.webkit.org/show_bug.cgi?id=24033
+
+        SVG file does not pan and has no scroll bars
+        https://bugs.webkit.org/show_bug.cgi?id=24448
+
+        Adapt to SVG 1.1 errata to change the overflow handling:
+        Replace "svg { overflow: hidden }"  by "svg:not(:root) { overflow: hidden }" to allow standalone SVG documents to contain scrolllbars.
+        Agreed by SVG WG to make this the default behaviour, already implemented by Opera & FireFox (partial support).
+
+        Add new tests in svg/overflow covering all special SVG css overflow handling rules on inner/outer svg elements.
+
+        Tests: svg/overflow/overflow-on-inner-svg-element-defaults.svg
+               svg/overflow/overflow-on-inner-svg-element.svg
+               svg/overflow/overflow-on-outermost-svg-element-defaults.svg
+               svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1.svg
+               svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2.svg
+               svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3.svg
+               svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto.xhtml
+               svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults.xhtml
+               svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden.xhtml
+               svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll.xhtml
+               svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible.xhtml
+
+        * css/svg.css: Change default <svg> overflow rule to only apply to inner <svg> elements.
+        * page/FrameView.cpp: 
+        (WebCore::FrameView::layout): Only apply overflow rules for non-standalone SVG documents.
+        * rendering/RenderSVGRoot.cpp: Remove all calls to isOverflowHidden - it's always the case for the outermost SVG element, see spec + errata.
+        (WebCore::RenderSVGRoot::paint): Always clip to initial viewport size.
+        (WebCore::RenderSVGRoot::computeRectForRepaint): Ditto.
+        (WebCore::RenderSVGRoot::nodeAtPoint): Simplify.
+        * rendering/RenderSVGViewportContainer.cpp:
+        (WebCore::RenderSVGViewportContainer::applyViewportClip): Use isOverflowHidden() instead of a manual oveflow query and clip in float precision.
+        * rendering/SVGRenderSupport.cpp:
+        (WebCore::SVGRenderBase::isOverflowHidden): Simplify implementation, assure the function is not called anymore for RenderSVGRoot objects.
+
 2010-02-09  Kwang Yul Seo  <skyul at company100.net>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/css/svg.css b/WebCore/css/svg.css
index 322eda8..171c1c4 100644
--- a/WebCore/css/svg.css
+++ b/WebCore/css/svg.css
@@ -32,9 +32,18 @@
     which does not use CSS layout [CSS2-LAYOUT] or XSL formatting [XSL], the 'overflow' property on the 
     outermost 'svg' element is ignored for the purposes of visual rendering and the initial clipping path is set 
     to the bounds of the initial viewport.
+
+    When an outermost 'svg' element is embedded inline within a parent XML grammar which uses CSS layout
+    [CSS2-LAYOUT] or XSL formatting [XSL], if the 'overflow' property has the value hidden or scroll, then
+    the user agent will establish an initial clipping path equal to the bounds of the initial viewport; otherwise,
+    the initial clipping path is set according to the clipping rules as defined in [CSS2-overflow].
+
+    Opera/Firefox & WebKit agreed on NOT setting "overflow: hidden" for the outermost svg element - SVG 1.1 Errata
+    contains these changes as well as all future SVG specifications: see http://lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0347.html
 */
-svg:root {
-    overflow: hidden !important
+
+svg:not(:root), symbol, image, marker, pattern, foreignObject {
+    overflow: hidden
 }
 
 svg {
@@ -42,10 +51,6 @@ svg {
     height: 100%;
 }
 
-svg, symbol, marker, pattern {
-    overflow: hidden
-}
-
 text, foreignObject {
     display: block
 }
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 4de2a17..2bc4e63 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -618,9 +618,11 @@ void FrameView::layout(bool allowSubtree)
             if (documentElement->isSVGElement()) {
                 if (!m_firstLayout && (m_size.width() != layoutWidth() || m_size.height() != layoutHeight()))
                     rootRenderer->setChildNeedsLayout(true);
-            }
-#endif
+            } else
+                applyOverflowToViewport(rootRenderer, hMode, vMode);
+#else
             applyOverflowToViewport(rootRenderer, hMode, vMode);
+#endif
         }
 #ifdef INSTRUMENT_LAYOUT_SCHEDULING
         if (m_firstLayout && !document->ownerElement())
diff --git a/WebCore/rendering/RenderSVGRoot.cpp b/WebCore/rendering/RenderSVGRoot.cpp
index 75dd5dc..78499b1 100644
--- a/WebCore/rendering/RenderSVGRoot.cpp
+++ b/WebCore/rendering/RenderSVGRoot.cpp
@@ -140,10 +140,8 @@ void RenderSVGRoot::paint(PaintInfo& paintInfo, int parentX, int parentY)
     RenderObject::PaintInfo childPaintInfo(paintInfo);
     childPaintInfo.context->save();
 
-    // In SVG special rules need to be applied that differ from the CSS overflow handling,
-    // see comments in svg.css for spec references, explaining this behaviour
-    if (SVGRenderBase::isOverflowHidden(this))
-        childPaintInfo.context->clip(overflowClipRect(borderBoxOriginInContainer.x(), borderBoxOriginInContainer.y()));
+    // Apply initial viewport clip - not affected by overflow handling
+    childPaintInfo.context->clip(overflowClipRect(borderBoxOriginInContainer.x(), borderBoxOriginInContainer.y()));
 
     // Convert from container offsets (html renderers) to a relative transform (svg renderers).
     // Transform from our paint container's coordinate system to our local coords.
@@ -255,10 +253,8 @@ void RenderSVGRoot::computeRectForRepaint(RenderBoxModelObject* repaintContainer
     // and then call RenderBox's method to handle all the normal CSS Box model bits
     repaintRect = localToBorderBoxTransform().mapRect(repaintRect);
 
-    // In SVG special rules need to be applied that differ from the CSS overflow handling,
-    // see comments in svg.css for spec references, explaining this behaviour
-    if (SVGRenderBase::isOverflowHidden(this))
-        repaintRect.intersect(enclosingIntRect(FloatRect(FloatPoint(), m_viewportSize)));
+    // Apply initial viewport clip - not affected by overflow settings    
+    repaintRect.intersect(enclosingIntRect(FloatRect(FloatPoint(), m_viewportSize)));
 
     style()->svgStyle()->inflateForShadow(repaintRect);
     RenderBox::computeRectForRepaint(repaintContainer, repaintRect, fixed);
@@ -283,11 +279,9 @@ bool RenderSVGRoot::nodeAtPoint(const HitTestRequest& request, HitTestResult& re
     IntPoint pointInBorderBox = pointInParent - parentOriginToBorderBox();
 
     // Note: For now, we're ignoring hits to border and padding for <svg>
-    if (SVGRenderBase::isOverflowHidden(this)) {
-        IntPoint pointInContentBox = pointInBorderBox - borderOriginToContentBox();
-        if (!contentBoxRect().contains(pointInContentBox))
-            return false;
-    }
+    IntPoint pointInContentBox = pointInBorderBox - borderOriginToContentBox();
+    if (!contentBoxRect().contains(pointInContentBox))
+        return false;
 
     IntPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent);
 
diff --git a/WebCore/rendering/RenderSVGViewportContainer.cpp b/WebCore/rendering/RenderSVGViewportContainer.cpp
index f81ab48..441faa5 100644
--- a/WebCore/rendering/RenderSVGViewportContainer.cpp
+++ b/WebCore/rendering/RenderSVGViewportContainer.cpp
@@ -63,8 +63,8 @@ AffineTransform RenderSVGViewportContainer::markerContentTransformation(const Af
 
 void RenderSVGViewportContainer::applyViewportClip(PaintInfo& paintInfo)
 {
-    if (style()->overflowX() != OVISIBLE)
-        paintInfo.context->clip(enclosingIntRect(m_viewport)); // FIXME: Eventually we'll want float-precision clipping
+    if (SVGRenderBase::isOverflowHidden(this))
+        paintInfo.context->clip(m_viewport);
 }
 
 void RenderSVGViewportContainer::calcViewport()
diff --git a/WebCore/rendering/SVGRenderSupport.cpp b/WebCore/rendering/SVGRenderSupport.cpp
index 996ce81..ae003f3 100644
--- a/WebCore/rendering/SVGRenderSupport.cpp
+++ b/WebCore/rendering/SVGRenderSupport.cpp
@@ -260,13 +260,16 @@ void SVGRenderBase::layoutChildren(RenderObject* start, bool selfNeedsLayout)
 
 bool SVGRenderBase::isOverflowHidden(const RenderObject* object)
 {
-    if (object->style()->overflowX() == OHIDDEN) {
-        // SVG doesn't support independent x/y overflow
-        ASSERT(object->style()->overflowY() == OHIDDEN);
-        return true;
-    }
+    // SVG doesn't support independent x/y overflow
+    ASSERT(object->style()->overflowX() == object->style()->overflowY());
+
+    // OSCROLL is never set for SVG - see CSSStyleSelector::adjustRenderStyle
+    ASSERT(object->style()->overflowX() != OSCROLL);
+
+    // RenderSVGRoot should never query for overflow state - it should always clip itself to the initial viewport size.
+    ASSERT(!object->isRoot());
 
-    return false;
+    return object->style()->overflowX() == OHIDDEN;
 }
 
 FloatRect SVGRenderBase::filterBoundingBoxForRenderer(const RenderObject* object) const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list