Closed Bug 1618584 Opened 5 years ago Closed 4 years ago

Stop using XUL to implement the HTML marquee element

Categories

(Toolkit :: General, defect, P2)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox75 --- wontfix
firefox86 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: emilio)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

The frame tree for data:text/html,<marquee>x looks like this:

Block(marquee)
  XULScroll(div)
    Box(div)
      Box(div)
        TableWrapper(div)
          Table(div)
            TableRowGroup(div)
              TableRow(div)
                TableCell(div)
                  Block(div)
                    Block(div)
                      Text "x"
...

We should replace the XUL boxes (XULScroll and Box) with CSS boxes.

Alternatively, remove support for <marquee> altogether.

These XUL boxes comes from: https://searchfox.org/mozilla-central/source/toolkit/content/widgets/marquee.css#6,11
Changing those to a standard block results in the desired HTMLScroll/Block boxes.
However, that appears to break the scrolling behavior so I guess we need some adjustments to marquee.js too.

Component: Layout → General
Product: Core → Toolkit

FWIW the content is set at https://searchfox.org/mozilla-central/rev/b2ccce862ef38d0d150fcac2b597f7f20091a0c7/toolkit/content/widgets/marquee.js#404-430. I was expecting to simplify or change this markup in Bug 1425874 but it turned out to be tangential to the work needed to de-XBL it.

Ideally we'd remove the UA widget entirely and implement entirely in HTMLMarqueeElement using HTML and CSS animations (see https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/html_marquee_element.cc?l=61-77&rcl=d7e0211189498697ccc172476680adec021ded0d). But it's probably not worth the effort for this element.

Maybe the problem with the CSS change from Comment 1 won't be too hard to find by debugging marquee.js

And also to use more similar markup and setup between
horizontal/vertical marquee.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Attachment #9193431 - Attachment description: Bug 1618584 - Simplify marquee widget to not use XUL. r=bgrins → Bug 1618584 - Simplify marquee widget to not use XUL. r=bgrins,mats
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c3eb53d6395a Simplify marquee widget to not use XUL. r=bgrins,mats
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Regressions: 1692380
Regressions: 1851399
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: