MARQUEE loop property not supported

RESOLVED FIXED in mozilla1.9alpha1

Status

()

Core
Layout
--
minor
RESOLVED FIXED
15 years ago
9 years ago

People

(Reporter: Erik Arvidsson, Assigned: Martijn Wargers (dead))

Tracking

({testcase})

Trunk
mozilla1.9alpha1
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(5 attachments, 1 obsolete attachment)

(Reporter)

Description

15 years ago
The loop property/attribute for the MARQUEE XBL emulation is not supported.
-> doron (marquee in mozilla sucks)
Assignee: Matti → doron

Comment 2

15 years ago
wontfix, it isn't a 100% emulation
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → WONTFIX
(Reporter)

Comment 3

15 years ago
My own XBL emulation supports this. Feel free to reuse the code from that. See 
http://webfx.eae.net/dhtml/xblmarquee/xblmarquee.html

To me it is pretty odd that you reimplemented what I already had done and you 
did not even improve on the existing emulation. I know my version has bugs but 
at least it is a lot less buggy than the one you checked into the tree.

Comment 4

15 years ago
WONTFIX?
What is the point of supporting the Marquee tag if you aren't going to support 
it 100%? You now decided to support it because many sites use it. We all know 
its not a W3c standard, but what is the point of supporting a MS extension only 
to a certain level? If it is not 100% just remove it totally.

Comment 5

15 years ago
*** Bug 166857 has been marked as a duplicate of this bug. ***

Comment 6

15 years ago
I believe the LOOP attribute (and the related OnFinish event) should be
implemented in Mozilla's MARQUEE tag implementation. My usage of the feature,
and justification for it to be supported, is on a web site that uses a narrow
area to display system notification messages (like success or error messages on
a web application after submitting a form). My web app (unfortunately I cannot
share the URL because it is a confidential project) uses frames, one of which
hosts a sort of status bar implemented with a MARQUEE. After the message scrolls
all the way, it triggers the OnFinish message which causes the page to clean up.
A usage example is reported in Bug 166857.

Comment 7

15 years ago
be a real developer, use javascript for just one loop.  It really isn't that
hard to write a js marquee (I've written 3).

Comment 8

15 years ago
Well of course, but that's not the point. There are tons of web pages out there,
many of which have been implemented for a long time with IE's HTML specs in mind
(like MARQUEE), mine included. What I would like to see is Mozilla catching up
with the feature set offered by IE and to which the vast majority of web sites
already conform. I totally agree with José Jeria's opinion of "What is the point
of supporting the Marquee tag if you aren't going to support it 100%"

Please consider implementing the MARQUEE tag to 100% or removing the tag
altogether. I'm sure it's not that hard to implement what's missing. You even
have Erik Arvidsson's code to use.

Thanks!

Comment 9

15 years ago
>Please consider implementing the MARQUEE tag to 100% or removing the tag
>altogether. I'm sure it's not that hard to implement what's missing. You even
>have Erik Arvidsson's code to use.

first lemme remove css support, since its not 100%...

Netscape implemented marquee to fulfill a certain need, not to be fully
complaint. Indeed, we would have to allow IE4-style rules to work for that.

And Erik is free to provide a patch.
I have a patch for this if you want to add it...
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Created attachment 100150 [details] [diff] [review]
Patch rev. 1
Created attachment 100151 [details]
Testcase

Updated

15 years ago
Severity: normal → minor
Keywords: patch, testcase
Doesn't loop execute some code once its done? Don't see that in this patch
Product: Browser → Seamonkey
(Assignee)

Comment 14

13 years ago
*** Bug 279052 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 15

12 years ago
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/marquee.asp

onstart event:
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onstart.asp

onfinish event:
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onfinish.asp

onbounce event:
http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbounce.asp

These are the marquee specific events that I know of. Neither of them are
implemented in Mozilla.

Comment 16

12 years ago
*** Bug 310217 has been marked as a duplicate of this bug. ***

Updated

12 years ago
Component: General → Layout
Product: Mozilla Application Suite → Core
(Assignee)

Comment 17

12 years ago
Created attachment 203722 [details]
testcase2
(Assignee)

Comment 18

12 years ago
Created attachment 203723 [details]
testcase3
(Assignee)

Comment 19

12 years ago
Created attachment 205978 [details] [diff] [review]
patch1

Ok, this patch makes Mozilla behave almost like IE6.
It also fixes bug 315575.
Attachment #205978 - Flags: review?(doronr)
(Assignee)

Comment 20

12 years ago
The onstart, onfinish and onbounce events I would like to implement in a different bug, if you don't mind.
Blocks: 315575
Comment on attachment 205978 [details] [diff] [review]
patch1

File convention is that the <![CDATA is indented on the same level as the inner HTML.

> 
>+      <property name="loop">
>+        <getter>
>+        <![CDATA[
>+	        var val = parseInt(this.getAttribute('loop'));
>+	  
>+          if (val < -1 || isNaN(val))
>+	          return this._loop;
>+
>+	        return val;
>+	      ]]>

there is some weird indenting going on here.  Tabs perhaps?

> 
>+      <method name="_set_loop">
>+        <parameter name="aValue"/>
>+        <body>
>+        <![CDATA[
>+          if (!aValue || isNaN(aValue))
>+            return false;
>+
>+          if (aValue < -1)
>+            aValue = -1;
>+
>+          this._loop = aValue;
>+          return true;
>+        ]]>
>+        </body>
>+      </method>

Call it _setloop.  Same story about cdata indentation.

>@@ -318,24 +352,43 @@
> 
>                 // swap direction
>                 const swap = {left: "right", down: "up", up: "down", right: "left"};
>                 this._direction = swap[this._direction];
>                 this.newPosition = this.stopAt + (this.dirsign * this._scrollAmount);
>               break;
> 
>               case 'slide':
>-                if (this.newPosition == this.stopAt)
>-                  return;
>-                this.newPosition = this.stopAt;
>+                if (this._loop > 1) {
>+                  this.newPosition = this.startAt;
>+                }
>+                else {
>+ 	                if ((this._direction == "up") || (this._direction == "down"))
>+                    this.outerDiv.scrollTop = this.stopAt;
>+                  else
>+                    this.outerDiv.scrollLeft = this.stopAt;
>+                  this.stop();
>+                  return;                  
>+                }

weird indentation, tabs?

>               break;
> 
>               default:
>                 this.newPosition = this.startAt;
>             }
>+
>+            if (this._loop > 1)
>+ 	            this._loop--;
>+ 	          else if (this._loop == 1) {
>+ 	            if ((this._direction == "up") || (this._direction == "down"))
>+                this.outerDiv.scrollTop = this.stopAt;
>+              else
>+                this.outerDiv.scrollLeft = this.stopAt;
>+ 	            this.stop();
>+ 	            return;
>+ 	          }

weird indentation again.
Attachment #205978 - Flags: review?(doronr) → review+
(Assignee)

Comment 22

12 years ago
Created attachment 206198 [details] [diff] [review]
patch2

Yes, somehow tabs crept into the patch. This should fix it and the cdata indenting.
Attachment #205978 - Attachment is obsolete: true
Attachment #206198 - Flags: superreview?(jst)
(Assignee)

Comment 23

12 years ago
(In reply to comment #21)
> Call it _setloop.  Same story about cdata indentation.
I'd rather have it named _set_loop, since I change the _loop value, not the loop value. Also, that is consistent with the other methods, _set_behavior, _set_direction, etc.
Let me know if you agree/disagree.
Comment on attachment 206198 [details] [diff] [review]
patch2

sr=jst
Attachment #206198 - Flags: superreview?(jst) → superreview+
Assignee: doronr → martijn.martijn
Status: REOPENED → NEW
QA Contact: asa → layout
Target Milestone: --- → mozilla1.9alpha
mozilla/layout/style/xbl-marquee/xbl-marquee.xml; new revision: 1.22;
Status: NEW → RESOLVED
Last Resolved: 15 years ago12 years ago
Resolution: --- → FIXED
(Assignee)

Comment 26

12 years ago
I filed bug 324408 for the onstart, onfinish and onbounce events stuff.
Duplicate of this bug: 424275
You need to log in before you can comment on or make changes to this bug.