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

Changeset 245927 in webkit


Ignore:
Timestamp:
May 30, 2019, 5:30:20 PM (7 years ago)
Author:
Alan Coon
Message:

Cherry-pick r245664. rdar://problem/51264774

Subselectors not searched when determining property whitelist for selector
https://bugs.webkit.org/show_bug.cgi?id=198147
<rdar://problem/50405208>

Reviewed by Zalan Bujtas.

Source/WebCore:

This can cause marker elements get style they shouldn't.

Test: fast/lists/marker-style-subselector-whitelist.html

  • css/RuleSet.cpp: (WebCore::determinePropertyWhitelistType):

Check subselectors too.

LayoutTests:

  • fast/lists/marker-style-subselector-whitelist-expected.txt: Added.
  • fast/lists/marker-style-subselector-whitelist.html: Added.

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

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

Legend:

Unmodified
Added
Removed
  • branches/safari-607-branch/LayoutTests/ChangeLog

    r245925 r245927  
     12019-05-30  Kocsen Chung  <kocsen_chung@apple.com>
     2
     3        Cherry-pick r245664. rdar://problem/51264774
     4
     5    Subselectors not searched when determining property whitelist for selector
     6    https://bugs.webkit.org/show_bug.cgi?id=198147
     7    <rdar://problem/50405208>
     8   
     9    Reviewed by Zalan Bujtas.
     10   
     11    Source/WebCore:
     12   
     13    This can cause marker elements get style they shouldn't.
     14   
     15    Test: fast/lists/marker-style-subselector-whitelist.html
     16   
     17    * css/RuleSet.cpp:
     18    (WebCore::determinePropertyWhitelistType):
     19   
     20    Check subselectors too.
     21   
     22    LayoutTests:
     23   
     24    * fast/lists/marker-style-subselector-whitelist-expected.txt: Added.
     25    * fast/lists/marker-style-subselector-whitelist.html: Added.
     26   
     27   
     28   
     29    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     30
     31    2019-05-22  Antti Koivisto  <antti@apple.com>
     32
     33            Subselectors not searched when determining property whitelist for selector
     34            https://bugs.webkit.org/show_bug.cgi?id=198147
     35            <rdar://problem/50405208>
     36
     37            Reviewed by Zalan Bujtas.
     38
     39            * fast/lists/marker-style-subselector-whitelist-expected.txt: Added.
     40            * fast/lists/marker-style-subselector-whitelist.html: Added.
     41
    1422019-05-30  Kocsen Chung  <kocsen_chung@apple.com>
    243
  • branches/safari-607-branch/Source/WebCore/ChangeLog

    r245925 r245927  
     12019-05-30  Kocsen Chung  <kocsen_chung@apple.com>
     2
     3        Cherry-pick r245664. rdar://problem/51264774
     4
     5    Subselectors not searched when determining property whitelist for selector
     6    https://bugs.webkit.org/show_bug.cgi?id=198147
     7    <rdar://problem/50405208>
     8   
     9    Reviewed by Zalan Bujtas.
     10   
     11    Source/WebCore:
     12   
     13    This can cause marker elements get style they shouldn't.
     14   
     15    Test: fast/lists/marker-style-subselector-whitelist.html
     16   
     17    * css/RuleSet.cpp:
     18    (WebCore::determinePropertyWhitelistType):
     19   
     20    Check subselectors too.
     21   
     22    LayoutTests:
     23   
     24    * fast/lists/marker-style-subselector-whitelist-expected.txt: Added.
     25    * fast/lists/marker-style-subselector-whitelist.html: Added.
     26   
     27   
     28   
     29    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     30
     31    2019-05-22  Antti Koivisto  <antti@apple.com>
     32
     33            Subselectors not searched when determining property whitelist for selector
     34            https://bugs.webkit.org/show_bug.cgi?id=198147
     35            <rdar://problem/50405208>
     36
     37            Reviewed by Zalan Bujtas.
     38
     39            This can cause marker elements get style they shouldn't.
     40
     41            Test: fast/lists/marker-style-subselector-whitelist.html
     42
     43            * css/RuleSet.cpp:
     44            (WebCore::determinePropertyWhitelistType):
     45
     46            Check subselectors too.
     47
    1482019-05-30  Kocsen Chung  <kocsen_chung@apple.com>
    249
  • branches/safari-607-branch/Source/WebCore/css/RuleSet.cpp

    r235652 r245927  
    145145        if (component->match() == CSSSelector::PseudoElement && component->pseudoElementType() == CSSSelector::PseudoElementMarker)
    146146            return PropertyWhitelistMarker;
     147
     148        if (const auto* selectorList = selector->selectorList()) {
     149            for (const auto* subSelector = selectorList->first(); subSelector; subSelector = CSSSelectorList::next(subSelector)) {
     150                auto whitelistType = determinePropertyWhitelistType(subSelector);
     151                if (whitelistType != PropertyWhitelistNone)
     152                    return whitelistType;
     153            }
     154        }
    147155    }
    148156    return PropertyWhitelistNone;
Note: See TracChangeset for help on using the changeset viewer.