Changeset 56187 in webkit


Ignore:
Timestamp:
Mar 18, 2010 1:37:47 PM (14 years ago)
Author:
hyatt@apple.com
Message:

https://bugs.webkit.org/show_bug.cgi?id=36275

Reviewed by Simon Fraser.

Make sure :not does not allow pseudo-elements inside it. (Hooray for another pointless
restriction on :not.)

Added fast/css/invalid-not-with-pseudo-element.html

  • css/CSSGrammar.y:
  • css/CSSSelector.h:

(WebCore::CSSSelector::matchesPseudoElement):

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r56186 r56187  
     12010-03-18  David Hyatt  <hyatt@apple.com>
     2
     3        Reviewed by Simon Fraser.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=36275
     6
     7        Make sure :not does not allow pseudo-elements inside it. (Hooray for another pointless
     8        restriction on :not.)
     9
     10        Added fast/css/invalid-not-with-pseudo-element.html
     11
     12        * css/CSSGrammar.y:
     13        * css/CSSSelector.h:
     14        (WebCore::CSSSelector::matchesPseudoElement):
     15
    1162010-03-18  Dan Bernstein  <mitz@apple.com>
    217
  • trunk/WebCore/css/CSSGrammar.y

    r53448 r56187  
    11661166    // used by :not
    11671167    | ':' NOTFUNCTION maybe_space simple_selector maybe_space ')' {
    1168         if (!$4 || $4->simpleSelector() || $4->tagHistory())
     1168        if (!$4 || $4->simpleSelector() || $4->tagHistory() || $4->matchesPseudoElement())
    11691169            $$ = 0;
    11701170        else {
  • trunk/WebCore/css/CSSSelector.h

    r52432 r56187  
    213213        bool matchNth(int count);
    214214
     215        bool matchesPseudoElement() const
     216        {
     217            if (m_pseudoType == PseudoUnknown)
     218                extractPseudoType();
     219            return m_match == PseudoElement;
     220        }
     221
    215222        Relation relation() const { return static_cast<Relation>(m_relation); }
    216223
Note: See TracChangeset for help on using the changeset viewer.