Bug 456484. Kids of an inline-block that has overflow:'something other than visible' should not necessarily shrink-wrap. r+sr=roc
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 07 Oct 2008 14:53:22 -0400
changeset 20107 d28eb3aa049df458ea1c77fa6778624adcd36b1f
parent 20106 177b174c83e4bec7ff2deec35b5d827c716b7b6a
child 20108 305cbf365db22702c7c22fc5b4e6553acea1b139
push idunknown
push userunknown
push dateunknown
bugs456484
milestone1.9.1b2pre
Bug 456484. Kids of an inline-block that has overflow:'something other than visible' should not necessarily shrink-wrap. r+sr=roc
layout/reftests/bugs/456484-1-ref.html
layout/reftests/bugs/456484-1.html
layout/reftests/bugs/reftest.list
layout/style/ua.css
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/456484-1-ref.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+<title>Inside block shrinkwraps when outside inline-block has scrollframe</title>
+<style>
+div {
+  border: 1px solid black;
+}
+</style>
+</head>
+<body>
+
+<div style="display: inline-block; width: 500px; background-color: red;">
+<div style="background-color: lime;">
+div
+</div>
+</div>
+
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/456484-1.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+<title>Inside block shrinkwraps when outside inline-block has scrollframe</title>
+<style>
+div {
+  border: 1px solid black;
+}
+</style>
+</head>
+<body>
+
+<div style="display: inline-block; width: 500px; overflow: auto; background-color: red;">
+<div style="background-color: lime;">
+div
+</div>
+</div>
+
+</body>
+</html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -915,9 +915,9 @@ fails == 441259-2.html 441259-2-ref.html
 == 449171-1.html 449171-ref.html
 == 449519-1.html 449519-1-ref.html
 # == 449653-1.html 449653-1-ref.html # Disabled for now - it needs privileges
 == 450670-1.html 450670-1-ref.html
 == 451168-1.html 451168-1-ref.html
 == 454361.html about:blank
 == 455280-1.xhtml 455280-1-ref.xhtml
 fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 456147.xul 456147-ref.html # bug 456147, but not caused by it
-
+== 456484-1.html 456484-1-ref.html
--- a/layout/style/ua.css
+++ b/layout/style/ua.css
@@ -138,17 +138,19 @@
   position: static ! important;
   float: none ! important;
 }
 
 *|*::-moz-scrolled-content, *|*::-moz-scrolled-canvas,
 *|*::-moz-scrolled-page-sequence {
   /* e.g., text inputs, select boxes */
   padding: inherit;
-  display: inherit;
+  /* The display doesn't affect the kind of frame constructed here.  This just
+     affects auto-width sizing of the block we create. */
+  display: block;
   -moz-box-orient: inherit;
   /* make unicode-bidi inherit, otherwise it has no effect on text inputs and
      blocks with overflow: scroll; */
   unicode-bidi: inherit;
   -moz-column-count: inherit;
   -moz-column-width: inherit;
   -moz-column-gap: inherit;
   /* Do not change these. nsCSSFrameConstructor depends on them to create a good