Closed Bug 160162 Opened 22 years ago Closed 19 years ago

MARQUEE loop property not supported

Categories

(Core :: Layout, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: erik, Assigned: martijn.martijn)

References

Details

(Keywords: testcase)

Attachments

(5 files, 1 obsolete file)

The loop property/attribute for the MARQUEE XBL emulation is not supported.
-> doron (marquee in mozilla sucks)
Assignee: Matti → doron
wontfix, it isn't a 100% emulation
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WONTFIX
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.
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.
*** Bug 166857 has been marked as a duplicate of this bug. ***
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.
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).
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!
>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 → ---
Attached file Testcase
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
*** Bug 279052 has been marked as a duplicate of this bug. ***
*** Bug 310217 has been marked as a duplicate of this bug. ***
Component: General → Layout
Product: Mozilla Application Suite → Core
Attached file testcase2
Attached file testcase3
Attached patch patch1 (obsolete) — Splinter Review
Ok, this patch makes Mozilla behave almost like IE6.
It also fixes bug 315575.
Attachment #205978 - Flags: review?(doronr)
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+
Attached patch patch2Splinter Review
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)
(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
Closed: 22 years ago19 years ago
Resolution: --- → FIXED
I filed bug 324408 for the onstart, onfinish and onbounce events stuff.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: