diff --git a/mozilla/layout/reftests/bugs/336736-1-ref.html b/mozilla/layout/reftests/bugs/336736-1-ref.html new file mode 100644 index 00000000000..e8fe89728f3 --- /dev/null +++ b/mozilla/layout/reftests/bugs/336736-1-ref.html @@ -0,0 +1,13 @@ + +
+ + + + diff --git a/mozilla/layout/reftests/bugs/336736-1.html b/mozilla/layout/reftests/bugs/336736-1.html new file mode 100644 index 00000000000..9a32fa3a1f5 --- /dev/null +++ b/mozilla/layout/reftests/bugs/336736-1.html @@ -0,0 +1,13 @@ + + + + + + diff --git a/mozilla/layout/reftests/bugs/reftest.list b/mozilla/layout/reftests/bugs/reftest.list index 7e20db357c9..b55b20a5ab3 100644 --- a/mozilla/layout/reftests/bugs/reftest.list +++ b/mozilla/layout/reftests/bugs/reftest.list @@ -121,6 +121,7 @@ random == 328829-1.xhtml 328829-1-ref.xhtml # bug 369046 (intermittent) == 335628-1.html 335628-1-ref.html != 335628-2.xul 335628-2-ref.xul == 336147-1.html 336147-1-ref.html +== 336736-1.html 336736-1-ref.html fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 339289-1.html 339289-1-ref.html # mac bug 382399 == 341043-1a.html 341043-1-ref.html != 341043-1b.html 341043-1-ref.html diff --git a/mozilla/layout/style/xbl-marquee/xbl-marquee.xml b/mozilla/layout/style/xbl-marquee/xbl-marquee.xml index 78a3d2f2b57..22cbb4f6441 100644 --- a/mozilla/layout/style/xbl-marquee/xbl-marquee.xml +++ b/mozilla/layout/style/xbl-marquee/xbl-marquee.xml @@ -434,6 +434,17 @@ corrvalue : (this.innerDiv.offsetWidth + this.startAt)); } + // RTL Support. If text direction is right-to-left and marquee + // axis is horizontal, then negate and swap stopAt and startAt. + var dir = document.defaultView.getComputedStyle(this, "").direction; + if (dir == "rtl") { + if (this._direction == "right" || this._direction == "left") { + var tmp = this.startAt; + this.startAt = -this.stopAt; + this.stopAt = -tmp; + } + } + if (aResetPosition) { this.newPosition = this.startAt; this._fireEvent("start", false, false);