D
dhtml
I had a problem getting the computed style of a borderWidth in webkit.
It looks like a bug.
testGetComputedShorthandValues100px : function() {
var c1 = document.getElementById("c1"),
inp = "120em 110em 100em 90.1em";
c1.style.borderWidth = inp;
c1.style.borderStyle = "solid";
c1.style.fontSize = "100px";
var cs = getComputedStyle(c1, "");
// alert([cs.borderTopWidth, cs.borderRightWidth,
cs.borderLeftWidth, cs.borderBottomWidth]);
var out = dom.getStyle(c1, "borderWidth");
Assert.areEqual("12000px 11000px 10000px 9010px", out);
}
Safari 3.1 fails with "3808px 2808px 1808px 818px, (string)"
http://dhtmlkitchen.com/ape/test/tests/dom/style-f-test.htm
The html can be simplified to:
<body style="position: relative;margin:0;padding:0;"><div id="c1"></
div>l</body>
In Firefox, I get the expexted result. I don't understand webkit's
result. Is there a limit on font-size?
It looks like a bug.
testGetComputedShorthandValues100px : function() {
var c1 = document.getElementById("c1"),
inp = "120em 110em 100em 90.1em";
c1.style.borderWidth = inp;
c1.style.borderStyle = "solid";
c1.style.fontSize = "100px";
var cs = getComputedStyle(c1, "");
// alert([cs.borderTopWidth, cs.borderRightWidth,
cs.borderLeftWidth, cs.borderBottomWidth]);
var out = dom.getStyle(c1, "borderWidth");
Assert.areEqual("12000px 11000px 10000px 9010px", out);
}
Safari 3.1 fails with "3808px 2808px 1808px 818px, (string)"
http://dhtmlkitchen.com/ape/test/tests/dom/style-f-test.htm
The html can be simplified to:
<body style="position: relative;margin:0;padding:0;"><div id="c1"></
div>l</body>
In Firefox, I get the expexted result. I don't understand webkit's
result. Is there a limit on font-size?