Look at style height in addition to the height attribute for vertical

marquees.  Bug 262708, r=doron, sr=jst


git-svn-id: svn://10.0.0.236/trunk@163574 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2004-10-12 03:21:13 +00:00
parent d2e4f132a9
commit 36f337d43f
2 changed files with 12 additions and 2 deletions

View File

@@ -204,7 +204,12 @@
if ((this.directionField == "up") || (this.directionField == "down"))
{
// "", 0 and empty height should default to 200px
var height = (this.getAttribute("height") != "0" && this.getAttribute("height")) || "200px";
var height =
(this.getAttribute("height") != "0" &&
this.getAttribute("height")) ||
(document.defaultView.getComputedStyle(this,"").height != "0px" &&
document.defaultView.getComputedStyle(this,"").height) ||
"200px";
// support % heights
if (/%/.test(height)) {

View File

@@ -204,7 +204,12 @@
if ((this.directionField == "up") || (this.directionField == "down"))
{
// "", 0 and empty height should default to 200px
var height = (this.getAttribute("height") != "0" && this.getAttribute("height")) || "200px";
var height =
(this.getAttribute("height") != "0" &&
this.getAttribute("height")) ||
(document.defaultView.getComputedStyle(this,"").height != "0px" &&
document.defaultView.getComputedStyle(this,"").height) ||
"200px";
// support % heights
if (/%/.test(height)) {