diff --git a/mozilla/layout/html/document/src/xbl-marquee/resources/content/xbl-marquee.xml b/mozilla/layout/html/document/src/xbl-marquee/resources/content/xbl-marquee.xml
index 69768d5f14b..540e9ae5d4b 100644
--- a/mozilla/layout/html/document/src/xbl-marquee/resources/content/xbl-marquee.xml
+++ b/mozilla/layout/html/document/src/xbl-marquee/resources/content/xbl-marquee.xml
@@ -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)) {
diff --git a/mozilla/layout/style/xbl-marquee/xbl-marquee.xml b/mozilla/layout/style/xbl-marquee/xbl-marquee.xml
index 69768d5f14b..540e9ae5d4b 100644
--- a/mozilla/layout/style/xbl-marquee/xbl-marquee.xml
+++ b/mozilla/layout/style/xbl-marquee/xbl-marquee.xml
@@ -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)) {