| Index: Source/core/css/SelectorChecker.cpp
|
| diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
|
| index 386911cb44b2ca4c7b8ba5327fbac34f74d7e957..6837ffd40fc238ac08ccf3cf233893257dd76013 100644
|
| --- a/Source/core/css/SelectorChecker.cpp
|
| +++ b/Source/core/css/SelectorChecker.cpp
|
| @@ -413,15 +413,10 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib
|
| if (selector->m_match == CSSSelector::PseudoClass) {
|
| // Handle :not up front.
|
| if (selector->pseudoType() == CSSSelector::PseudoNot) {
|
| - const CSSSelectorList* selectorList = selector->selectorList();
|
| -
|
| - // FIXME: We probably should fix the parser and make it never produce :not rules with missing selector list.
|
| - if (!selectorList)
|
| - return false;
|
| -
|
| SelectorCheckingContext subContext(context);
|
| subContext.isSubSelector = true;
|
| - for (subContext.selector = selectorList->first(); subContext.selector; subContext.selector = subContext.selector->tagHistory()) {
|
| + ASSERT(selector->selectorList());
|
| + for (subContext.selector = selector->selectorList()->first(); subContext.selector; subContext.selector = subContext.selector->tagHistory()) {
|
| // :not cannot nest. I don't really know why this is a
|
| // restriction in CSS3, but it is, so let's honor it.
|
| // the parser enforces that this never occurs
|
| @@ -609,6 +604,7 @@ bool SelectorChecker::checkOne(const SelectorCheckingContext& context, const Sib
|
| SelectorCheckingContext subContext(context);
|
| subContext.isSubSelector = true;
|
| PseudoId ignoreDynamicPseudo = NOPSEUDO;
|
| + ASSERT(selector->selectorList());
|
| for (subContext.selector = selector->selectorList()->first(); subContext.selector; subContext.selector = CSSSelectorList::next(subContext.selector)) {
|
| if (match(subContext, ignoreDynamicPseudo, siblingTraversalStrategy) == SelectorMatches)
|
| return true;
|
| @@ -946,11 +942,8 @@ unsigned SelectorChecker::determineLinkMatchType(const CSSSelector* selector)
|
| case CSSSelector::PseudoNot:
|
| {
|
| // :not(:visited) is equivalent to :link. Parser enforces that :not can't nest.
|
| - const CSSSelectorList* selectorList = selector->selectorList();
|
| - if (!selectorList)
|
| - break;
|
| -
|
| - for (const CSSSelector* subSelector = selectorList->first(); subSelector; subSelector = subSelector->tagHistory()) {
|
| + ASSERT(selector->selectorList());
|
| + for (const CSSSelector* subSelector = selector->selectorList()->first(); subSelector; subSelector = subSelector->tagHistory()) {
|
| CSSSelector::PseudoType subType = subSelector->pseudoType();
|
| if (subType == CSSSelector::PseudoVisited)
|
| linkMatchType &= ~SelectorChecker::MatchVisited;
|
|
|