AX: Add support for CSS4 :focus-within pseudo http://dev.w3.org/csswg/selectors-4/#focus-within-pseudo
<rdar://problem/19389705>
This would be a good addition for accessibility and full keyboard access.
Seems like it's equivalent to the recently-removed CSS4 subject selector. "!* *:focus" == "*:focus-within"
Created attachment 281810 [details] Patch
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?
> Is there anything sufficiently complicated here to test the SelectorChecker > path? Quoted wrong test but the question still applies.
Created attachment 281878 [details] Patch
Comment on attachment 281878 [details] Patch Clearing flags on attachment: 281878 Committed r202358: <http://trac.webkit.org/changeset/202358>
All reviewed patches have been landed. Closing bug.