WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
140144
AX: Add support for CSS4 :focus-within pseudo
https://bugs.webkit.org/show_bug.cgi?id=140144
Summary
AX: Add support for CSS4 :focus-within pseudo
James Craig
Reported
2015-01-06 13:29:38 PST
AX: Add support for CSS4 :focus-within pseudo
http://dev.w3.org/csswg/selectors-4/#focus-within-pseudo
Attachments
Patch
(49.24 KB, patch)
2016-06-21 20:21 PDT
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Patch
(67.82 KB, patch)
2016-06-22 15:31 PDT
,
Benjamin Poulain
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-01-06 13:29:54 PST
<
rdar://problem/19389705
>
James Craig
Comment 2
2015-01-06 13:32:41 PST
This would be a good addition for accessibility and full keyboard access.
James Craig
Comment 3
2015-01-06 13:35:26 PST
Seems like it's equivalent to the recently-removed CSS4 subject selector. "!* *:focus" == "*:focus-within"
Benjamin Poulain
Comment 4
2016-06-21 20:21:15 PDT
Created
attachment 281810
[details]
Patch
Antti Koivisto
Comment 5
2016-06-22 14:04:49 PDT
Comment on
attachment 281810
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=281810&action=review
> Source/WebCore/dom/ContainerNode.cpp:108 > - if (!child.renderer() && !child.isNamedFlowContentNode() && !childIsHTMLSlotElement) > + bool isElement = is<Element>(child); > + if (!child.renderer() && !childIsHTMLSlotElement > + && !(isElement && downcast<Element>(child).isNamedFlowContentElement()))
It would have been nicer to do the NamedFlow bit freeing dance separately.
> Source/WebCore/dom/Element.h:761 > +inline void Element::setHasFocusWithin(bool flag) > +{ > + setFlag(flag, HasFocusWithin); > + if (styleAffectedByFocusWithin()) > + setNeedsStyleRecalc(); > +}
Would it be sufficient to invalidate only when the flag value changes?
> LayoutTests/fast/css/css-selector-text.html:313 > +testSelectorRoundTrip("a[b]:default"); > +testSelectorRoundTrip("a.b:default"); > +testSelectorRoundTrip("a#b:default"); > +testSelectorRoundTrip("a[b].c#d:default");
Is there anything sufficiently complicated here to test the SelectorChecker path?
Antti Koivisto
Comment 6
2016-06-22 14:07:13 PDT
> Is there anything sufficiently complicated here to test the SelectorChecker > path?
Quoted wrong test but the question still applies.
Benjamin Poulain
Comment 7
2016-06-22 15:31:06 PDT
Created
attachment 281878
[details]
Patch
WebKit Commit Bot
Comment 8
2016-06-22 16:35:39 PDT
Comment on
attachment 281878
[details]
Patch Clearing flags on attachment: 281878 Committed
r202358
: <
http://trac.webkit.org/changeset/202358
>
WebKit Commit Bot
Comment 9
2016-06-22 16:35:43 PDT
All reviewed patches have been landed. Closing bug.
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