7 border-width:
5px
5px
10px
10px;
12 #container
> div
> div {
15 background-color: lightblue;
21 document
.getElementById("console").appendChild(document
.createTextNode(message
+ "\n"));
26 var childStyle
= div
.firstElementChild
.style
;
27 var cssText
= childStyle
.cssText
;
28 if (cssText
) cssText
+= " ";
29 log(cssText
+ "-> scrollWidth: " + div
.scrollWidth
);
34 if (window
.testRunner
)
35 testRunner
.dumpAsText();
37 var container
= document
.getElementById("container");
40 for (var d
= container
.firstElementChild
; d
; d
= d
.nextElementSibling
)
43 container
.style
.direction
= "rtl";
45 for (var d
= container
.firstElementChild
; d
; d
= d
.nextElementSibling
)
50 <body onload=
"test()">
52 Test the value of scrollWidth on blocks with visible overflow. These
55 <pre id=
"console"></pre>
62 <div style=
"margin-left: 9px;"></div>
66 <div style=
"margin-right: 9px;"></div>
70 <div style=
"margin-left: -27px;"></div>
74 <div style=
"position: relative;"></div>
78 <div style=
"position: relative; left: 9px;"></div>
82 <div style=
"position: relative; left: -9px;"></div>
86 <div style=
"position: relative; left: -27px;"></div>
90 <div style=
"position: absolute;"></div>