⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 288522 in webkit


Ignore:
Timestamp:
Jan 24, 2022, 5:56:26 PM (5 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r288303. rdar://problem/87836127

[:has pseudo-class] Support :has(:not(foo))
​https://bugs.webkit.org/show_bug.cgi?id=235399

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/invalidation/has-with-not-expected.txt: Added.
  • web-platform-tests/css/selectors/invalidation/has-with-not.html: Added.

Source/WebCore:

This already works except for a filter bug.

Test: imported/w3c/web-platform-tests/css/selectors/invalidation/has-with-not.html

  • style/HasSelectorFilter.h: (WebCore::Style::HasSelectorFilter::reject const):

We shouldn't reject a selector if we have a null key.

git-svn-id: ​https://svn.webkit.org/repository/webkit/trunk@288303 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-613-branch
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog

    r288517 r288522  
     12022-01-24  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r288303. rdar://problem/87836127
     4
     5    [:has pseudo-class] Support :has(:not(foo))
     6    https://bugs.webkit.org/show_bug.cgi?id=235399
     7   
     8    Reviewed by Darin Adler.
     9   
     10    LayoutTests/imported/w3c:
     11   
     12    * web-platform-tests/css/selectors/invalidation/has-with-not-expected.txt: Added.
     13    * web-platform-tests/css/selectors/invalidation/has-with-not.html: Added.
     14   
     15    Source/WebCore:
     16   
     17    This already works except for a filter bug.
     18   
     19    Test: imported/w3c/web-platform-tests/css/selectors/invalidation/has-with-not.html
     20   
     21    * style/HasSelectorFilter.h:
     22    (WebCore::Style::HasSelectorFilter::reject const):
     23   
     24    We shouldn't reject a selector if we have a null key.
     25   
     26   
     27    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     28
     29    2022-01-20  Antti Koivisto  <antti@apple.com>
     30
     31            [:has pseudo-class] Support :has(:not(foo))
     32            https://bugs.webkit.org/show_bug.cgi?id=235399
     33
     34            Reviewed by Darin Adler.
     35
     36            * web-platform-tests/css/selectors/invalidation/has-with-not-expected.txt: Added.
     37            * web-platform-tests/css/selectors/invalidation/has-with-not.html: Added.
     38
    1392022-01-24  Alan Coon  <alancoon@apple.com>
    240
  • branches/safari-613-branch/Source/WebCore/ChangeLog

    r288521 r288522  
     12022-01-24  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r288303. rdar://problem/87836127
     4
     5    [:has pseudo-class] Support :has(:not(foo))
     6    https://bugs.webkit.org/show_bug.cgi?id=235399
     7   
     8    Reviewed by Darin Adler.
     9   
     10    LayoutTests/imported/w3c:
     11   
     12    * web-platform-tests/css/selectors/invalidation/has-with-not-expected.txt: Added.
     13    * web-platform-tests/css/selectors/invalidation/has-with-not.html: Added.
     14   
     15    Source/WebCore:
     16   
     17    This already works except for a filter bug.
     18   
     19    Test: imported/w3c/web-platform-tests/css/selectors/invalidation/has-with-not.html
     20   
     21    * style/HasSelectorFilter.h:
     22    (WebCore::Style::HasSelectorFilter::reject const):
     23   
     24    We shouldn't reject a selector if we have a null key.
     25   
     26   
     27    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     28
     29    2022-01-20  Antti Koivisto  <antti@apple.com>
     30
     31            [:has pseudo-class] Support :has(:not(foo))
     32            https://bugs.webkit.org/show_bug.cgi?id=235399
     33
     34            Reviewed by Darin Adler.
     35
     36            This already works except for a filter bug.
     37
     38            Test: imported/w3c/web-platform-tests/css/selectors/invalidation/has-with-not.html
     39
     40            * style/HasSelectorFilter.h:
     41            (WebCore::Style::HasSelectorFilter::reject const):
     42
     43            We shouldn't reject a selector if we have a null key.
     44
    1452022-01-24  Alan Coon  <alancoon@apple.com>
    246
  • branches/safari-613-branch/Source/WebCore/style/HasSelectorFilter.h

    r287153 r288522  
    4949
    5050    bool reject(const CSSSelector& hasSelector) const { return reject(makeKey(hasSelector)); }
    51     bool reject(Key key) const { return !m_filter.mayContain(key); }
    52 
     51    bool reject(Key key) const { return key && !m_filter.mayContain(key); }
    5352
    5453private:
Note: See TracChangeset for help on using the changeset viewer.