WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
166484
Add the support for ShadowRoot.delegateFocus
https://bugs.webkit.org/show_bug.cgi?id=166484
Summary
Add the support for ShadowRoot.delegateFocus
Damiaan Dufaux
Reported
2016-12-26 14:17:13 PST
Created
attachment 297772
[details]
A web page to reproduce the problem Overview: As specified in the shadow dom specification (
http://w3c.github.io/webcomponents/spec/shadow/#focus
): "A shadow host can delegate focus to its shadow root by assigning a boolean delegatesFocus flag to be true in ShadowRootInit dictionary". But this feature is not working. Steps to Reproduce: - open the attached file (delegateFocus.html) in the latest nightly build - click on the text "Hello world" Actual Results: nothing happens Expected Results: The input field should receive focus. Build date: December 20, 2016 5:14 PM GMT Platform: macOS Sierra 10.12.2 (16C67)
Attachments
A web page to reproduce the problem
(565 bytes, text/html)
2016-12-26 14:17 PST
,
Damiaan Dufaux
no flags
Details
WIP
(53.08 KB, patch)
2019-08-14 00:14 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Adds the support
(44.29 KB, patch)
2019-10-11 20:18 PDT
,
Ryosuke Niwa
koivisto
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-12-27 15:39:54 PST
<
rdar://problem/29816058
>
Ryosuke Niwa
Comment 2
2019-08-14 00:14:07 PDT
Created
attachment 376241
[details]
WIP
EWS Watchlist
Comment 3
2019-08-14 00:15:38 PDT
Attachment 376241
[details]
did not pass style-queue: ERROR: Source/WebCore/dom/Element.cpp:2837: 'newTarget' is incorrectly named. It should be named 'protectedThis'. [readability/naming/protected] [4] Total errors found: 1 in 30 files If any of these errors are false positives, please file a bug against check-webkit-style.
Ryosuke Niwa
Comment 4
2019-10-11 20:18:25 PDT
Created
attachment 380813
[details]
Adds the support
Antti Koivisto
Comment 5
2019-10-11 22:20:17 PDT
Comment on
attachment 380813
[details]
Adds the support View in context:
https://bugs.webkit.org/attachment.cgi?id=380813&action=review
> Source/WebCore/dom/ShadowRoot.cpp:59 > +ShadowRoot::ShadowRoot(Document& document, ShadowRootMode type, bool delegatesFocus)
Please use enum in the interface. The member can be bool.
> Source/WebCore/dom/ShadowRoot.h:45 > + enum class FocusDelegation { Yes, No };
You even have one, you are just not using it!
Ryosuke Niwa
Comment 6
2019-10-11 22:40:35 PDT
(In reply to Antti Koivisto from
comment #5
)
> Comment on
attachment 380813
[details]
> Adds the support > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=380813&action=review
> > > Source/WebCore/dom/ShadowRoot.cpp:59 > > +ShadowRoot::ShadowRoot(Document& document, ShadowRootMode type, bool delegatesFocus) > > Please use enum in the interface. The member can be bool.
Yeah, I guess I added enum after I had added this argument!
> > > Source/WebCore/dom/ShadowRoot.h:45 > > + enum class FocusDelegation { Yes, No }; > > You even have one, you are just not using it!
Will do. I also forgot to specify the width again (uint8_t) :( Will fix that.
Ryosuke Niwa
Comment 7
2019-10-11 23:09:06 PDT
Committed
r251043
: <
https://trac.webkit.org/changeset/251043
>
Ryosuke Niwa
Comment 8
2019-10-11 23:49:01 PDT
Landed the windows build fix in
https://trac.webkit.org/changeset/251044
.
Rakina Zata Amni
Comment 9
2019-10-27 17:04:55 PDT
FYI there's one new addition for the spec, to keep the focused element if it's a flat-tree descendant of the host:
https://github.com/whatwg/html/pull/5039
Ryosuke Niwa
Comment 10
2019-11-05 16:24:54 PST
(In reply to Rakina Zata Amni from
comment #9
)
> FYI there's one new addition for the spec, to keep the focused element if > it's a flat-tree descendant of the host: >
https://github.com/whatwg/html/pull/5039
This kind of already works in WebKit but fixing it fully in
https://bugs.webkit.org/show_bug.cgi?id=203869
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug