Closed Bug 1556363 Opened 5 years ago Closed 3 years ago

Custom elements: implement disabled attribute for form-associated custom element

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: jdai, Assigned: edgar)

References

Details

Attachments

(3 files)

Assignee: jdai → nobody
Status: ASSIGNED → NEW

I think this should be covered by bug 1556351, need to check if there is any wpt for disable attribute.

Assignee: nobody → echen

(In reply to Edgar Chen [:edgar] from comment #1)

I think this should be covered by bug 1556351, need to check if there is any wpt for disable attribute.

Okay, bug 1556351 isn't enough, there are still two things we need to do,

  1. We should call UpdateDisabledState when the disabled attribute is changed on FACE.
  2. FACE should not append form data if it is disabled, other form elements do such check in SubmitNamesValues, like https://searchfox.org/mozilla-central/rev/b24799980a929597dcc553cb0854aa6c960c82b5/dom/html/HTMLButtonElement.cpp#302, but we could factor it out to https://searchfox.org/mozilla-central/rev/b24799980a929597dcc553cb0854aa6c960c82b5/dom/html/HTMLFormElement.cpp#1024-1027, then we don't need to handle the disabled state separately.
Blocks: 1556372
Attachment #9246886 - Attachment description: Bug 1556363 - Part 2: Support disabled attribute for form-associated custom element; → WIP: Bug 1556363 - Part 2: Support disabled attribute for form-associated custom element;

Depends on D129049

Attachment #9246886 - Attachment description: WIP: Bug 1556363 - Part 2: Support disabled attribute for form-associated custom element; → Bug 1556363 - Part 2: Support disabled attribute for form-associated custom element;
Attachment #9247165 - Attachment description: WIP: Bug 1556363 - Part 3: Implement formDisabledCallback; → Bug 1556363 - Part 3: Implement formDisabledCallback;
Attachment #9246885 - Attachment description: Bug 1556363 - Part 1: Check disabled state for submission in a common place; → Bug 1556363 - Part 1: Check disabled state for submission in a common place; r=smaug
Attachment #9246886 - Attachment description: Bug 1556363 - Part 2: Support disabled attribute for form-associated custom element; → Bug 1556363 - Part 2: Support disabled attribute for form-associated custom element; r=smaug
Attachment #9247165 - Attachment description: Bug 1556363 - Part 3: Implement formDisabledCallback; → Bug 1556363 - Part 3: Implement formDisabledCallback; r=smaug
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3364ef8828e7 Part 1: Check disabled state for submission in a common place; r=smaug https://hg.mozilla.org/integration/autoland/rev/30538dd493a8 Part 2: Support disabled attribute for form-associated custom element; r=smaug https://hg.mozilla.org/integration/autoland/rev/1f3ae22c13d0 Part 3: Implement formDisabledCallback; r=smaug
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: