Come up with a more consistent pattern for inheriting attributes for MozElement Custom Elements

RESOLVED FIXED in Firefox 67

Status

()

task
RESOLVED FIXED
4 months ago
21 days ago

People

(Reporter: bgrins, Assigned: bgrins)

Tracking

(Blocks 1 bug)

unspecified
mozilla67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(2 attachments)

Assignee

Description

4 months ago

Previous discussions about this can be seen in Bug 1502947 and Bug 1523429 and in the reviews of the patches there.

Current inheritAttribute helper: https://searchfox.org/mozilla-central/rev/cb7faaf6b4ad2528390186f1ce64618dea71031e/toolkit/content/customElements.js#63

Some examples of how we do this currently:

Having some kind of static map with type of <selector, <array<attribute>> would allow observedAttributes to be read by processing the map instead of having them declared separately. We'd have to sort out when to cache (and invalidate) the results of querySelector.

Attachment #9043709 - Attachment description: Bug 1527680 - WIP - Add helper for automatically inheriting attributes based on a map of selectors to attributes → Bug 1527680 - Add MozElement `inheritedAttributes` helper for automatically inheriting attributes based on a Map of selectors to attributes
Assignee

Updated

4 months ago
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Summary: Come up with a more consistent patter for inheriting attributes for MozElement Custom Elements → Come up with a more consistent pattern for inheriting attributes for MozElement Custom Elements
Assignee

Updated

4 months ago
Blocks: 1500626, 1519502
Assignee

Updated

4 months ago
Blocks: 1528268
Attachment #9043709 - Attachment description: Bug 1527680 - Add MozElement `inheritedAttributes` helper for automatically inheriting attributes based on a Map of selectors to attributes → Bug 1527680 - Add MozElement `inheritedAttributes` helper for automatically inheriting attributes based on a map of selectors to attributes

Comment 3

4 months ago
Pushed by bgrinstead@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/66082f22ae11
Add MozElement `inheritedAttributes` helper for automatically inheriting attributes based on a map of selectors to attributes r=paolo

Backed out for merge conflicts on toolkit/content/widgets/popupnotification.js!
Backout link: https://hg.mozilla.org/integration/autoland/rev/79d9076cbaa1c24ca96094e86706952951bb67f6

Flags: needinfo?(bgrinstead)
Assignee

Comment 5

4 months ago

(In reply to Cosmin Sabou [:CosminS] from comment #4)

Backed out for merge conflicts on toolkit/content/widgets/popupnotification.js!
Backout link: https://hg.mozilla.org/integration/autoland/rev/79d9076cbaa1c24ca96094e86706952951bb67f6

Rebased and relanded

Flags: needinfo?(bgrinstead)

Comment 6

4 months ago
Pushed by bgrinstead@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/27280189b6fa
Add MozElement `inheritedAttributes` helper for automatically inheriting attributes based on a map of selectors to attributes r=paolo

Comment 7

4 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Assignee

Updated

4 months ago
Blocks: 1534685

Updated

21 days ago
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.