diff --git a/layout/reftests/svg/overflow-on-outer-svg-01-ref.svg b/layout/reftests/svg/overflow-on-outer-svg-01-ref.svg
new file mode 100644
index 00000000000..a3908ab1124
--- /dev/null
+++ b/layout/reftests/svg/overflow-on-outer-svg-01-ref.svg
@@ -0,0 +1,7 @@
+
+
diff --git a/layout/reftests/svg/overflow-on-outer-svg-01.svg b/layout/reftests/svg/overflow-on-outer-svg-01.svg
new file mode 100644
index 00000000000..f18b8595b07
--- /dev/null
+++ b/layout/reftests/svg/overflow-on-outer-svg-01.svg
@@ -0,0 +1,11 @@
+
+
diff --git a/layout/reftests/svg/overflow-on-outer-svg-02-ref.xhtml b/layout/reftests/svg/overflow-on-outer-svg-02-ref.xhtml
new file mode 100644
index 00000000000..96f8aa1250a
--- /dev/null
+++ b/layout/reftests/svg/overflow-on-outer-svg-02-ref.xhtml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/layout/reftests/svg/overflow-on-outer-svg-02a.xhtml b/layout/reftests/svg/overflow-on-outer-svg-02a.xhtml
new file mode 100644
index 00000000000..aadf9b54306
--- /dev/null
+++ b/layout/reftests/svg/overflow-on-outer-svg-02a.xhtml
@@ -0,0 +1,16 @@
+
+
+
+
+ Test that non-root outer-<svg> clips for overflow="auto"
+
+
+
+
+
diff --git a/layout/reftests/svg/overflow-on-outer-svg-02b.xhtml b/layout/reftests/svg/overflow-on-outer-svg-02b.xhtml
new file mode 100644
index 00000000000..48ae9dd5713
--- /dev/null
+++ b/layout/reftests/svg/overflow-on-outer-svg-02b.xhtml
@@ -0,0 +1,16 @@
+
+
+
+
+ Test that non-root outer-<svg> clips for overflow="scroll"
+
+
+
+
+
diff --git a/layout/reftests/svg/overflow-on-outer-svg-02c.xhtml b/layout/reftests/svg/overflow-on-outer-svg-02c.xhtml
new file mode 100644
index 00000000000..151f04c3049
--- /dev/null
+++ b/layout/reftests/svg/overflow-on-outer-svg-02c.xhtml
@@ -0,0 +1,16 @@
+
+
+
+
+ Test that non-root outer-<svg> clips for overflow="hidden"
+
+
+
+
+
diff --git a/layout/reftests/svg/overflow-on-outer-svg-02d.xhtml b/layout/reftests/svg/overflow-on-outer-svg-02d.xhtml
new file mode 100644
index 00000000000..02788d1e003
--- /dev/null
+++ b/layout/reftests/svg/overflow-on-outer-svg-02d.xhtml
@@ -0,0 +1,28 @@
+
+
+
+
+ Test that non-root outer-<svg> repaints correctly changing to overflow="hidden"
+
+
+
+
+
+
diff --git a/layout/reftests/svg/overflow-on-outer-svg-03-ref.xhtml b/layout/reftests/svg/overflow-on-outer-svg-03-ref.xhtml
new file mode 100644
index 00000000000..9b9a433d238
--- /dev/null
+++ b/layout/reftests/svg/overflow-on-outer-svg-03-ref.xhtml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/layout/reftests/svg/overflow-on-outer-svg-03a.xhtml b/layout/reftests/svg/overflow-on-outer-svg-03a.xhtml
new file mode 100644
index 00000000000..4eb948f1a6e
--- /dev/null
+++ b/layout/reftests/svg/overflow-on-outer-svg-03a.xhtml
@@ -0,0 +1,16 @@
+
+
+
+
+ Test that non-root outer-<svg> clips for overflow="auto"
+
+
+
+
+
diff --git a/layout/reftests/svg/overflow-on-outer-svg-03b.xhtml b/layout/reftests/svg/overflow-on-outer-svg-03b.xhtml
new file mode 100644
index 00000000000..3c41dd97a28
--- /dev/null
+++ b/layout/reftests/svg/overflow-on-outer-svg-03b.xhtml
@@ -0,0 +1,28 @@
+
+
+
+
+ Test that non-root outer-<svg> repaints correctly changing to overflow="visible"
+
+
+
+
+
+
diff --git a/layout/reftests/svg/reftest.list b/layout/reftests/svg/reftest.list
index 2e976e49d16..04b27651a28 100644
--- a/layout/reftests/svg/reftest.list
+++ b/layout/reftests/svg/reftest.list
@@ -216,6 +216,13 @@ skip-if(d2d) == opacity-and-gradient-02.svg opacity-and-gradient-02-ref.svg
== opacity-and-pattern-01.svg pass.svg
== opacity-and-transform-01.svg opacity-and-transform-01-ref.svg
== outer-svg-border-and-padding-01.svg outer-svg-border-and-padding-01-ref.svg
+== overflow-on-outer-svg-01.svg overflow-on-outer-svg-01-ref.svg
+== overflow-on-outer-svg-02a.xhtml overflow-on-outer-svg-02-ref.xhtml
+== overflow-on-outer-svg-02b.xhtml overflow-on-outer-svg-02-ref.xhtml
+== overflow-on-outer-svg-02c.xhtml overflow-on-outer-svg-02-ref.xhtml
+== overflow-on-outer-svg-02d.xhtml overflow-on-outer-svg-02-ref.xhtml
+== overflow-on-outer-svg-03a.xhtml overflow-on-outer-svg-03-ref.xhtml
+== overflow-on-outer-svg-03b.xhtml overflow-on-outer-svg-03-ref.xhtml
pref(svg.paint-order.enabled,true) == paint-order-01.svg paint-order-01-ref.svg
pref(svg.paint-order.enabled,true) == paint-order-02.svg paint-order-02-ref.svg
pref(svg.paint-order.enabled,true) == paint-order-03.svg paint-order-03-ref.svg
diff --git a/layout/svg/nsSVGOuterSVGFrame.cpp b/layout/svg/nsSVGOuterSVGFrame.cpp
index da312ce6118..3b2e4cda4bf 100644
--- a/layout/svg/nsSVGOuterSVGFrame.cpp
+++ b/layout/svg/nsSVGOuterSVGFrame.cpp
@@ -765,7 +765,13 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayBorderBackgroundOutline(aBuilder, aLists);
- DisplayListClipState::AutoClipContainingBlockDescendantsToContentBox clip(aBuilder, this);
+ // Per-spec, we always clip root-