Closed Bug 201528 Opened 21 years ago Closed 19 years ago

browser ignores MARQUEE BEHAVIOR = "SLIDE"

Categories

(Core :: Layout, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: osu9400, Assigned: martijn.martijn)

References

()

Details

Attachments

(2 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030407
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030407

<marquee behavior="slide"> does not work as designed. Instead of sliding to the
left and stopping, the SLIDE command is ignored and the text continues to scroll
to the left.

For a reference only, check out any verison of IE.

Reproducible: Always

Steps to Reproduce:
1. create the HTML page and open it


Actual Results:  
The text continued to scroll across the screen, time after time.

Expected Results:  
The text should scroll across the screen (right to left) and stop when it hits
the left edge.

My HTML:


<font color="orange" face="verdana" size=4>Default:: <marquee>This text should
continuously slide to the left</marquee></font>
 
<font color="blue" face="verdana" size=4>Slide:: <marquee behavior="slide">This
text should slide to the left then STOP</marquee></font>
 
<font color="green" face="verdana" size=4>Alternate:: <marquee
behavior="alternate">This text should slide to the left then to the
right</marquee></font>
-> doron

Marquee is not standard, and Mozilla only has a partial implementation.  This
might be a wontfix
Assignee: harishd → doron
It may not be "standard" HTML", but it is widely used. Most people don't know 
the difference (and some don't care) what is standard and what is not.

Don't mark it as "WON'T FIX" you should at least leave it open so someone can 
work on it if they want. Marquee is two thirds complete, why prevent someone 
from finishing it?
Anyone who wants to do it, feel free.  I only implemented the most used commands.
Severity: normal → trivial
-> Layout
Assignee: doron → other
Status: UNCONFIRMED → NEW
Component: Parser → Layout
Ever confirmed: true
OS: Windows XP → All
QA Contact: dsirnapalli → ian
Priority: -- → P4
Target Milestone: --- → Future
Keywords: helpwanted
(In reply to comment #2)
> It may not be "standard" HTML", but it is widely used. Most people don't know 
> the difference (and some don't care) what is standard and what is not.
> 
> Don't mark it as "WON'T FIX" you should at least leave it open so someone can 
> work on it if they want. Marquee is two thirds complete, why prevent someone 
> from finishing it?

I agree, this should be fixed.
*** Bug 299169 has been marked as a duplicate of this bug. ***
Updating url, the previous didn't exist anymore.
Another url with a behavior="slide" marquee:
http://www.mountaindragon.com/html/marquee.htm
Attached patch patch1 (obsolete) — Splinter Review
This patch is contaminated with other stuff, but in principle this seems to
work just fine for me.
Attached file testcase
Attachment #199998 - Attachment is obsolete: true
Attached patch patch2 (obsolete) — Splinter Review
I also did some testing with:
https://bugzilla.mozilla.org/attachment.cgi?id=202035 (from bug 239919)
Dynamic changing behavior values isn't equal to IE6 with this patch. I could fix that, but I doubt the usefulness. I would need to add code for those cases and IE6's handling seems also quite buggy in particular cases, anyway.
Attachment #203174 - Flags: review?(doronr)
Comment on attachment 203174 [details] [diff] [review]
patch2

Would it not be better to also cancel the setTimeout once we finish the slide?
Attachment #203174 - Flags: review?(doronr) → review+
(In reply to comment #11)
> (From update of attachment 203174 [details] [diff] [review] [edit])
> Would it not be better to also cancel the setTimeout once we finish the slide?
You're right.

I'm afraid my previous patch from bug 239919, which was checked in, caused some regressions:
- https://bugzilla.mozilla.org/attachment.cgi?id=201562 (testcase4 from bug 314369)
- https://bugzilla.mozilla.org/attachment.cgi?id=202035 (testcase1 from bug 239919) : Press "set behavior=alternate" and then "direction=up", you'll notice that the marquee speed has increased.

I'll attach a patch that fixes these issues.
Attached patch patch3Splinter Review
This patch fixes this bug and the regressions I mentioned before.
A lot more of the code just needs to be in the DOMAttrModified handler.
The extra truespeed checks, I added in bug 239919, caused the first regression. I've removed those (since they are only useful for truespeed=0 and truespeed='' when dynamically changing truespeed values, so not important for now at least, imho).
Attachment #203174 - Attachment is obsolete: true
Attachment #203525 - Flags: review?(doronr)
The Microsoft example doesn't show up completely 'right', btw.
The top marquee gets partly hidden with the patch at the end.
But I think that's a different issue. It happens because of the use of margin inside of the marquee.
A new bug should be filed about that.
Attachment #203525 - Flags: review?(doronr) → review+
Attachment #203525 - Flags: superreview?(jst)
Comment on attachment 203525 [details] [diff] [review]
patch3

sr=jst
Attachment #203525 - Flags: superreview?(jst) → superreview+
Assignee: layout → martijn.martijn
Keywords: helpwanted
Hardware: PC → All
Target Milestone: Future → mozilla1.9alpha
mozilla/layout/style/xbl-marquee/xbl-marquee.xml; new revision: 1.21;
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
*** Bug 359507 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: