4 <script src=
"../../resources/js-test.js"></script>
6 function getComputedStyleForElement(element
, cssPropertyName
)
8 if (window
.getComputedStyle
) {
9 return window
.getComputedStyle(element
, '').getPropertyValue(cssPropertyName
);
15 return getComputedStyleForElement(document
.getElementById(id
), 'width');
19 description("For the following, the width of the containing inline-block box should be 94px [goverened by the min-width of the text (64px) plus the padding (30px)].");
21 shouldBe("getWidth('div1')", "'94px'");
22 shouldBe("getWidth('div2')", "'94px'");
23 shouldBe("getWidth('div3')", "'94px'");
25 document
.body
.removeChild(document
.getElementById('wrapper'));
27 isSuccessfullyParsed();
32 display: inline-block;
33 border:
1px solid black;
45 <body onload=
"test()">
46 <div>Test for Bugzilla bug:
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=99442"> 99442</a> Regression r130057: Improper preferred width calculation when an inline replaced object, wrapped in an inline flow, follows some text.
</div>
48 <div id=
"wrapper" style=
"width: 50px;">
49 <div class=
"test" id=
"div1">
50 <span>This is some text
</span><span><img src=
"resources/50x50.gif"/></span>
52 <div class=
"test" id=
"div2">
53 <span>This is some text
</span><span><img src=
"resources/50x50.gif"/></span><span>This is some text
</span>
55 <div class=
"test" id=
"div3">
56 <span>This is some text
</span><span><img src=
"resources/50x50.gif"/></span><span><img src=
"resources/50x50.gif"/></span><span><img src=
"resources/50x50.gif"/></span>
59 <p id=
"description"></p>
60 <div id=
"console"></div>