Bug 1293242 - Reftests.
MozReview-Commit-ID: ADZWFEgRNIM
new file mode 100644
--- /dev/null
+++ b/layout/reftests/xul/description-inside-overflowhidden-1-ref.xul
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<!-- Height not set in CSS, no scrollframe. -->
+<vbox style="max-width: 150px;">
+ <description style="width: 150px;"><span style="width: 149px;">Line 1</span> Line 2</description>
+</vbox>
+
+</window>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/xul/description-inside-overflowhidden-1.xul
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<!-- Height not set in CSS, the scrollframe should expand. -->
+<vbox style="max-width: 150px; overflow: hidden;">
+ <description style="width: 150px;"><span style="width: 149px;">Line 1</span> Line 2</description>
+</vbox>
+
+</window>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/xul/description-inside-overflowhidden-2-ref.xul
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<!-- Height set in CSS, the scrollframe should not expand. -->
+<vbox style="max-width: 150px; background: green; height: 7px; overflow: hidden;">
+ <!-- This does not wrap, so it does not trigger scrollframe expansion code. -->
+ <description style="width: 150px;" value="Line 1" />
+</vbox>
+
+</window>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/xul/description-inside-overflowhidden-2.xul
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<!-- Height set in CSS, the scrollframe should not expand. -->
+<vbox style="max-width: 150px; background: green; height: 7px; overflow: hidden;">
+ <!-- This wraps, so it triggers scrollframe expansion code. -->
+ <description style="width: 150px;"><span style="width: 149px;">Line 1</span> Line 2</description>
+</vbox>
+
+</window>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/xul/description-inside-overflowhidden-3-ref.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<!-- Height constrained indirectly, the scrollframe should not expand. -->
+<vbox style="height: 7px;">
+ <vbox flex="1" style="max-width: 150px; background: green; overflow: hidden;">
+ <!-- This does not wrap, so it does not trigger scrollframe expansion code. -->
+ <description style="width: 150px;" value="Line 1" />
+ </vbox>
+</vbox>
+
+</window>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/xul/description-inside-overflowhidden-3.xul
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<!-- Height constrained indirectly, the scrollframe should not expand. -->
+<vbox style="height: 7px;">
+ <vbox flex="1" style="max-width: 150px; background: green; overflow: hidden;">
+ <!-- This wraps, so it triggers scrollframe expansion code. -->
+ <description style="width: 150px;"><span style="width: 149px;">Line 1</span> Line 2</description>
+ </vbox>
+</vbox>
+
+</window>
--- a/layout/reftests/xul/reftest.list
+++ b/layout/reftests/xul/reftest.list
@@ -64,8 +64,13 @@ fuzzy-if(webrender,16,20) == object-posi
# Tests for rendering SVG images in a XUL <treecell>:
# XXXdholbert: These are marked as "random" right now, since they might not
# render the images they trying to test in time for the reftest snapshot, per
# bug 1218954.
skip == treecell-image-svg-1a.xul treecell-image-svg-1-ref.xul # bug 1218954
skip == treecell-image-svg-1b.xul treecell-image-svg-1-ref.xul # bug 1218954
== treechildren-padding-percent-1.xul treechildren-padding-percent-1-ref.xul
+
+# These tests verify the size of overflow: hidden elements with a wrapping block inside.
+== description-inside-overflowhidden-1.xul description-inside-overflowhidden-1-ref.xul
+== description-inside-overflowhidden-2.xul description-inside-overflowhidden-2-ref.xul
+== description-inside-overflowhidden-3.xul description-inside-overflowhidden-3-ref.xul
\ No newline at end of file