Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to implement and ship: HTMLMarqueeElement

730 views
Skip to first unread message

Brian Grinstead

unread,
Oct 12, 2018, 1:56:19 PM10/12/18
to dev-platform
Summary: Motion is a key component of modern web design, and <marquee> is the premier... just kidding. Gecko currently ships <marquee> as an HTMLDivElement with the web-exposed properties attached via in-content XBL [0][1]. As part of the process of removing in-content XBL, I intend to implement and ship HTMLMarqueeElement.

This will allow us to expose properties on the element through WebIDL instead of through `<xbl:property exposeToUntrustedContent="true">`. This will lead to behavior changes with the current implementation (https://bugzilla.mozilla.org/show_bug.cgi?id=1425874#c10), although those changes will generally bring Firefox into compliance with the spec and with other implementations - many currently failing web platform tests should start passing [2][3].

The event handlers (onbounce, onfinish, onstart) will still be implemented in XBL for the time being - the actual XBL removal will happen in subsequent bugs.

There's an open question about how to treat the `loop` property. As outlined at https://bugzilla.mozilla.org/show_bug.cgi?id=1425874#c14, the spec defines a no-op when setting `loop` to a number that is <= 0 and not -1, which is similar to what our current implementation does. In this case Chrome, Safari, and Edge throw, so we may want to adapt this behavior.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1425874

Link to standard: https://html.spec.whatwg.org/multipage/obsolete.html#the-marquee-element

Platform coverage: All

Target Release: 65

Preference behind which this will be implemented: None

Is this feature enabled by default in sandboxed iframes? Yes

DevTools bug: None

Do other browser engines implement this?
- Chrome: since version 1
- Edge: yes
- IE: since version 2
- Safari: since version 1.2

web-platform-tests: https://github.com/web-platform-tests/wpt/tree/master/html/obsolete/requirements-for-implementations/the-marquee-element-0

Is this feature restricted to secure contexts? No

Brian

[0]: https://searchfox.org/mozilla-central/source/dom/html/HTMLDivElement.cpp
[1]: https://searchfox.org/mozilla-central/search?q=xbl-marquee.xml&path=
[2]: https://searchfox.org/mozilla-central/rev/28fe656de6a022d1fc01bbd3811023fca99cf223/testing/web-platform/meta/html/dom/interfaces.https.html.ini#628-746
[3]: https://searchfox.org/mozilla-central/rev/1ce4e8a5601da8e744ca6eda69e782318afab54d/testing/web-platform/meta/html/dom/reflection-obsolete.html.ini#8-2829

Boris Zbarsky

unread,
Oct 12, 2018, 2:03:14 PM10/12/18
to
On 10/12/18 1:56 PM, Brian Grinstead wrote:
> Summary: Motion is a key component of modern web design, and <marquee> is the premier...

Fire. The premier fire so we can have fire and motion [1].

Or maybe it's just a dumpster fire? ;)

The proposed change looks great to me.

-Boris

[1] https://www.joelonsoftware.com/2002/01/06/fire-and-motion/

Karl Dubost

unread,
Oct 14, 2018, 8:30:03 PM10/14/18
to Brian Grinstead, dev-platform


Le 13 oct. 2018 à 02:56, Brian Grinstead <bgrin...@mozilla.com> a écrit :
> Summary: […] I intend to implement and ship HTMLMarqueeElement.

Very cool. And a support on that, from a webcompat standpoint of view, because it seems a lot of Indian websites rely on it. The current implementation has "performance" issues compared to other browsers where the animation is a lot smoother.

> Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1425874

See https://bugzilla.mozilla.org/show_bug.cgi?id=306344


--
Karl Dubost, mozilla 💡 Webcompat
http://www.la-grange.net/karl/moz





Eric Shepherd (Sheppy)

unread,
Oct 15, 2018, 11:15:34 AM10/15/18
to Karl Dubost, bgrin...@mozilla.com, dev-platform
Happy to see this coming. I'm (honestly) sort of a fan of <marquee>, in a
twisted sort of way. A fun reminder of the whimsy of the early days of the
web, and amusing to use in certain types of examples.
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>


--

Eric Shepherd
Senior Technical Writer
Mozilla
Blog: http://www.bitstampede.com/
Twitter: http://twitter.com/sheppy
Check my Availability <https://freebusy.io/eshe...@mozilla.com>

Brian Grinstead

unread,
Oct 15, 2018, 12:43:25 PM10/15/18
to Karl Dubost, dev-platform
The next step for removing XBL in marquee will be to put the content inside of a UA Widget Shadow Root and then (ideally) drop the JS-implemented animation in favor of CSS animation. I expect that should be enough to fix https://bugzilla.mozilla.org/show_bug.cgi?id=306344.

Brian
0 new messages