Closed Bug 1413836 Opened 7 years ago Closed 3 years ago

Support ShadowRootInit.delegatesFocus

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: ben.tian, Assigned: sefeng)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(8 files)

Add ShadowRootInit.delegateFocus flag and support behavior in
https://www.w3.org/TR/shadow-dom/#focus
(In reply to Ben Tian [:btian] from comment #0)
> Add ShadowRootInit.delegateFocus flag and support behavior in
> https://www.w3.org/TR/shadow-dom/#focus

Example:
https://developers.google.com/web/fundamentals/web-components/shadowdom#focus
Priority: -- → P2
Given that webkit doesn't have this, this probably doesn't need to block our initial impl,
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/dom/Element.idl#L157.
Blocks: shadowdom
No longer blocks: shadowdom-dom
Component: DOM → DOM: Core & HTML

It's fixed in Webkit now...

Note that there's a typo which makes it hard to find this bug. It's delegatesFocus, not delegateFocus. (Maybe it was renamed after this bug was filed.)

Summary: Support ShadowRootInit.delegateFocus → Support ShadowRootInit.delegatesFocus
Assignee: nobody → sefeng

Depends on D123858

The autofocus attribute could run scripts while it's autofocusing
which may run the promise_tests, so that the focus() usage
in the tests could become nested focusing steps.

Depends on D123860

When none of the elements inside the shadow dom is focused, :focus
should be removed from the hosts.

Depends on D123862

Attachment #9238326 - Attachment description: Bug 1413836 - Avoid nested focus steps in focus-pseudo-matches-on-shadow-host.html r=smaug → WIP: Bug 1413836 - Avoid nested focus steps in focus-pseudo-matches-on-shadow-host.html r=smaug
Attachment #9238326 - Attachment description: WIP: Bug 1413836 - Avoid nested focus steps in focus-pseudo-matches-on-shadow-host.html r=smaug → Bug 1413836 - Avoid nested focus steps in focus-pseudo-matches-on-shadow-host.html r=smaug
Blocks: 1728864

When the FAIL text goes away, there could be some antialiased fringe left which
caused the test to fail. Use Ahem font to reduce likelihood of this
happening again.

Pushed by sefeng@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dc8d5d9533e4
Add delegatesFocus attribute to shadow dom r=smaug
https://hg.mozilla.org/integration/autoland/rev/19e3256ea07c
Enable WPT for delegatesFocus r=smaug
https://hg.mozilla.org/integration/autoland/rev/c1d1d4b5ab74
Add a test to ensure delegatesFocus works correctly with real click on nested shadow dom trees r=smaug
https://hg.mozilla.org/integration/autoland/rev/d829be6f2813
Avoid nested focus steps in focus-pseudo-matches-on-shadow-host.html r=smaug
https://hg.mozilla.org/integration/autoland/rev/979fef259e32
Implement the focusing steps for delegatesFocus r=smaug
https://hg.mozilla.org/integration/autoland/rev/ae89d15d28eb
Add a test to ensure :focus is removed from the hosts r=smaug
https://hg.mozilla.org/integration/autoland/rev/dc6a694146fd
Add a test to ensure :focus is applied to host when the focus is moved by <tab> r=smaug
https://hg.mozilla.org/integration/autoland/rev/53c86681259e
Use Ahem font to avoid antialiased fringe for focus-pseudo-on-shadow-host-2.html r=dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/30330 for changes under testing/web-platform/tests
Upstream PR was closed without merging
Backout by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9f7169baa181
Backed out 8 changesets for delegatesFocus related wpt failures. CLOSED TREE
Pushed by sefeng@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d9e72029c94e
Add delegatesFocus attribute to shadow dom r=smaug
https://hg.mozilla.org/integration/autoland/rev/2bb1aaa2f920
Enable WPT for delegatesFocus r=smaug
https://hg.mozilla.org/integration/autoland/rev/8f4e174e2f35
Add a test to ensure delegatesFocus works correctly with real click on nested shadow dom trees r=smaug
https://hg.mozilla.org/integration/autoland/rev/dfaef6859ed1
Avoid nested focus steps in focus-pseudo-matches-on-shadow-host.html r=smaug
https://hg.mozilla.org/integration/autoland/rev/942744e138f2
Implement the focusing steps for delegatesFocus r=smaug
https://hg.mozilla.org/integration/autoland/rev/60e18b225b15
Add a test to ensure :focus is removed from the hosts r=smaug
https://hg.mozilla.org/integration/autoland/rev/767cfea23c71
Add a test to ensure :focus is applied to host when the focus is moved by <tab> r=smaug
https://hg.mozilla.org/integration/autoland/rev/4ed1222e4288
Use Ahem font to avoid antialiased fringe for focus-pseudo-on-shadow-host-2.html r=dholbert
Blocks: 1589021
Blocks: 1695663
Upstream PR merged by moz-wptsync-bot
Flags: needinfo?(sefeng)
Regressions: 1735667

FF94 docs work for this can be tracked in https://github.com/mdn/content/issues/9364#issuecomment-941607490. This is essentially a release note and an update to BCD.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: