mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Make marquee work again when direction is rtl, by working around changes to range of offsetLeft. b=336736 Patch by Daniel Holbert <dholbert@mozilla.com>. r=martijn sr=dbaron
This commit is contained in:
parent
50513d81cc
commit
39a48943d0
13
layout/reftests/bugs/336736-1-ref.html
Normal file
13
layout/reftests/bugs/336736-1-ref.html
Normal file
@ -0,0 +1,13 @@
|
||||
<html>
|
||||
<body>
|
||||
<!-- The "alternate" behavior is necessary for the
|
||||
marquee text to start out on the screen. -->
|
||||
<MARQUEE
|
||||
direction="right"
|
||||
scrollamount="0"
|
||||
behavior="alternate"
|
||||
>
|
||||
a
|
||||
</MARQUEE>
|
||||
</body>
|
||||
</html>
|
13
layout/reftests/bugs/336736-1.html
Normal file
13
layout/reftests/bugs/336736-1.html
Normal file
@ -0,0 +1,13 @@
|
||||
<html>
|
||||
<body dir="rtl">
|
||||
<!-- The "alternate" behavior is necessary for the
|
||||
marquee text to start out on the screen. -->
|
||||
<MARQUEE
|
||||
direction="right"
|
||||
scrollamount="0"
|
||||
behavior="alternate"
|
||||
>
|
||||
a
|
||||
</MARQUEE>
|
||||
</body>
|
||||
</html>
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user