Closed Bug 1560556 Opened 5 years ago Closed 5 years ago

Use Shadow DOM and CSS Shadow parts for <dropmarker>

Categories

(Toolkit :: UI Widgets, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: bgrins, Assigned: bgrins)

References

Details

Attachments

(1 file, 1 obsolete file)

We originally used light DOM + connectedCallback for dropmarker because it's styled from document sheets:

But it's a really simple element with a single child that could be moved into a shadow root (created in constructor) and styled with shadow parts:

This would serve a good test case for using Shadow parts, and have the benefit of correctness for consumers that accidentally put a child inside of the node and made us skip adding the icon.

I do notice that it's used in the url bar XBL bindings as anonymous content (https://searchfox.org/mozilla-central/rev/da14c413ef663eb1ba246799e94a240f81c42488/browser/base/content/urlbarBindings.xml) so we might need to wait for Bug 1513337 / removing the legacy URL bar code if there's a bad interaction there.

Depends on: 1451400

Part matching doesn't currently work in xul.css. We may ultimately want to control these types of
styles from a sheet loaded by the shadow root anyway depending on how we want to handle nested roots,
so this is a version showing that.

Depends on: 1558393
Attachment #9073264 - Attachment is obsolete: true
Depends on: 1561325
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Pushed by bgrinstead@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/87e14a059e60
Use Shadow DOM and CSS Shadow parts for <dropmarker> r=dao
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Regressions: 1561748
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: