Closed Bug 163048 Opened 18 years ago Closed 17 years ago

Make <marquee> an optional extension

Categories

(SeaMonkey :: Build Config, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jonasj, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: helpwanted)

Attachments

(1 file)

<quote source="bug 161049 comment 31" author="dbaron">
> However, to the people who are "on strike", etc.:  please note that a *good*
> patch to make marquee an optional extension would, I think, be accepted.  The
> module owners have not rejected that approach.  They also haven't rejected the
> idea of a pref to disable marquee (bug 161109).  However, the optional extension
> idea hasn't even been filed as a bug, despite comments in bug 156979.
</quote>
See also bug 163050 :-)
Summary: Make marquee an optional extension → Make <marquee> an optional extension
if you want it, do it yourself.  Its open source you know (awaiting lots and
lots of bickering)
Assignee: doron → nobody
This is disgusting... The optional extension should be *DISABLED* by default in
Mozilla! If Netscape wants to use <marquee>, they can have it enabled by
default. Sorry if this is considered spam.

http://bugzilla.mozilla.org/show_bug.cgi?id=161049#c13
Adding CC.
I vote for CSS overflow:scroll emulation of marquee.
This is "hacked" XBL to disable annoying scrolling for <marquee> tag.
You can see scrollbar for content on <marquee> instead of automatic scrolling.

To install this XBL, do follows:
1. Unpack and back up old file xbl-marquee.xml from
./chrome/comm.jar/content/xbl-marquee/xbl-marquee.xml

2. Save this file with filename "xbl-marquee.xml".

3. Pack this file into comm.jar/content/xbl-marquee/

To uninstall, pack saved xbl-marquee.xml instead of this.

I don't remove main code, I only have it disabled. All disabled items are
commented with prefix "***".

If anybody tell me how to read user prefs in XBL, I can write XBL, which can
read user preferences and choose corresponding behavior.

Desired pref format might be:
user_pref("browser.marquee.behavior", "autoscroll" | "block" | "scrollbars" );

Waiting to your comments ;-)
Attachment #97516 - Attachment mime type: text/xml → text/plain
Attachment #97516 - Flags: needs-work+
var pref = Components.classes["@mozilla.org/preferences-service;1"]
                     .getService(Components.interfaces.nsIPrefService)
                     .getBranch("browser.");
pref.getCharPref("marquee.behavior"); to read the pref.

Reference: http://www.mozilla.org/quality/embed/plans/nsIPrefBranchTestPlan.html

Not cc'ed so email me on any comments.
Any marquee pref should be handled in terms of on/off in the interest of
simplicity. The scrollbar overflow is a cunning idea but it wouldn't work any
better than block in real life (and in isolated cases might be worse).

IMO the pref should be similar to browser.blink_allowed, but marquee instead of
blink. An alternate suggestion is browser.display.marquee. Both should be
boolean with a defult value of false. To make the people who shoved marquee down
our throats in the first place happy, we'll have to make UI for this pref (while
you're at it, make UI for bug 106462... pleeeeze?).
Depends on: 161109
Mike, unfortunately I have a fault to use your suggestion.

My code:
try {
  netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
  var prefObj = Components.classes["@mozilla.org/preferences-service;1"]
    .getService(Components.interfaces.nsIPrefService);
}
catch(e) {
  alert("Exception: " + e);
}
causes exception "enablePrivilege not granted".
Replying to comment 7

AFAIK <marquee> support was introduced mainly for Chinese users - see test pages at:
http://bugzilla.mozilla.org/show_bug.cgi?id=156979#c63

And if we'll parse <marquee> just as <div>, appearance of these pages will be
violently distorted. <marquee> has attributes WIDTH and HEIGHT, parsing as
simple <div> causes incorrect rendering width and height of <marquee> block and,
therefore, destroying page layout.

I tried to find method for displaying <marquee> which doesn't destroy appearance
and preserve usability.

But literally following W3C standards, we must render <marquee> as unknown tag,
i.e. simple ignore it and render even not as <div>, but as <span>.

As a result we have 4 alternatives to render <marquee>:
1. As inline element (conforms to standard, but completelly destroies page layout);
2. As <div> (better corresponds meaning of this tag, but causes layout problems);
3. With autoscrolling (exactly as MS Internet Explorer, preserves page layout,
but annoies users and causes usability problems);
4. With scrollbar (preserves page layout, saves usability and doesn't annoy).

I think, all 4 alternatives could be embodied in preferences, but it seems to me
that scrollbar might be a better choice.
It's okay by me if a page looks screwed up because that site uses bad HTML,
which is synonymous with nonstandard HTML. Thus, I'd say, if disabled, display
marquee by putting a big ugly red blotch on the page that says "marquee" with a
slash through it. Okay, I will now resume lurking.
I've tried those sites with a modified html.css displaying marquees as block,
and it really doesn't look bad. A scrollbar will still bust a pixel-perfect
layout unless we make the scrollbars razor-thin, and either way it's not going
to be as pretty as if the developer had done the page right to begin with. But I
don't see any benefit to a scrollbar.
Depends on: 177660
HELP WANTED! Remove the vile scrolling marquees, or fix bug 161109...

50 CC's or votes will make this or that bug eligible for bug 163993.
Keywords: helpwanted
Well, I think following the standards is a better approach than recognizing
<marquee> as special at all.  If browsers support <marquee>, that will only
encourage its use.  If you like <marquee> so much that you think it's worth
violating the standard, just go ask the W3C to include it in XHTML 2.0 (They'll
say no, and that should be the final word.).
No longer depends on: 177660
Depends on: 59701
Waiting for bug 59701 to be fixed.
marquee is here to stay. Opera and safari now support it as well.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.