| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> |
| 2 |
| 3 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 |
| 5 <head> |
| 6 |
| 7 <title>CSS Test: width - absolutely positioned non-replaced element with scrol
lbar and percentage height of inline replaced child</title> |
| 8 |
| 9 <!-- |
| 10 Credits should go to Erik Brown for originally reporting a related test |
| 11 --> |
| 12 |
| 13 <link rel="bookmark" href="https://bugzilla.mozilla.org/show_bug.cgi?id=128171
3" title="Bug 1281713: intrinsic width of parent with overflow-x:scroll not comp
uting correctly with child image with height:100%" /> |
| 14 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserB
ugsSection/css21testsuite/" /> |
| 15 <link rel="help" title="11.1.1 Overflow: the 'overflow' property" href="https:
//www.w3.org/TR/CSS21/visufx.html#overflow" /> |
| 16 <link rel="help" title="10.3.2 Inline, replaced elements" href="https://www.w3
.org/TR/CSS21/visudet.html#inline-replaced-width" /> |
| 17 <link rel="help" title="10.3.5 Floating, non-replaced elements" href="https://
www.w3.org/TR/CSS21/visudet.html#float-width" /> |
| 18 |
| 19 <meta name="DC.date.created" content="2016-06-23T09:54:03+11:00" scheme="W3CDT
F" /> |
| 20 <meta name="DC.date.modified" content="2016-07-06T09:54:03+11:00" scheme="W3CD
TF" /> |
| 21 |
| 22 <!-- |
| 23 Siblings of this test are: |
| 24 inline-block-non-replaced-width-005 |
| 25 float-non-replaced-width-013 |
| 26 --> |
| 27 |
| 28 <meta content="image scroll" name="flags" /> |
| 29 <meta content="This test checks interaction of percentage height of an inline
replaced element with its parent having scrollbars and with the parent's width d
etermined by 'shrink-to-fit' width algorithm. In this test, the image height sho
uld be 100px minus scrollbar height since space taken up by generated scrollbars
should be taken out of (subtracted from the dimensions of) the containing block
formed by the element with the scrollbars. Then the width of parent should be (
used image height == 100px minus scrollbar) * (intrinsic ratio == 5width:1height
)." name="assert" /> |
| 30 |
| 31 <style type="text/css"><![CDATA[ |
| 32 div |
| 33 { |
| 34 background-color: red; |
| 35 position: absolute; /* or display: inline-block; */ /* or float: left; *
/ |
| 36 height: 100px; |
| 37 overflow: scroll; |
| 38 } |
| 39 |
| 40 img |
| 41 { |
| 42 height: 100%; |
| 43 vertical-align: bottom; |
| 44 /* |
| 45 This 'vertical-align: bottom' declaration is not part of the test. |
| 46 We 'baseline-align' the image at the bottom of the line box so |
| 47 that the vertical scrollbar remains inactive. |
| 48 */ |
| 49 } |
| 50 ]]></style> |
| 51 |
| 52 </head> |
| 53 |
| 54 <body> |
| 55 |
| 56 <p>PREREQUISITE: User agent needs to support scrollbars as the scrolling mecha
nism. If it does not, then this test does not apply to such user agent.</p> |
| 57 |
| 58 <p>Test passes if there is a filled green rectangle with inactive scrollbars a
nd <strong>no red</strong>.</p> |
| 59 |
| 60 <div><img src="support/green-rectangle-50wideBy10tall.png" alt="Image download
support must be enabled" /></div> |
| 61 |
| 62 </body> |
| 63 </html> |
| OLD | NEW |