| Index: Source/core/css/CSSSelector.cpp
|
| diff --git a/Source/core/css/CSSSelector.cpp b/Source/core/css/CSSSelector.cpp
|
| index 901343b96cec615c663eb461dc23f542a204d604..a5723f0fea2225de06faea615c2f3ed4a04fa39e 100644
|
| --- a/Source/core/css/CSSSelector.cpp
|
| +++ b/Source/core/css/CSSSelector.cpp
|
| @@ -853,10 +853,8 @@ bool CSSSelector::isCompound() const
|
| return true;
|
| }
|
|
|
| -unsigned CSSSelector::computeLinkMatchType() const
|
| +void CSSSelector::updateLinkMatchType()
|
| {
|
| - unsigned linkMatchType = MatchAll;
|
| -
|
| // Determine if this selector will match a link in visited, unvisited or any state, or never.
|
| // :visited never matches other elements than the innermost link element.
|
| for (const CSSSelector* current = this; current; current = current->tagHistory()) {
|
| @@ -868,17 +866,17 @@ unsigned CSSSelector::computeLinkMatchType() const
|
| for (const CSSSelector* subSelector = current->selectorList()->first(); subSelector; subSelector = subSelector->tagHistory()) {
|
| PseudoType subType = subSelector->pseudoType();
|
| if (subType == PseudoVisited)
|
| - linkMatchType &= ~MatchVisited;
|
| + m_linkMatchType &= ~MatchVisited;
|
| else if (subType == PseudoLink)
|
| - linkMatchType &= ~MatchLink;
|
| + m_linkMatchType &= ~MatchLink;
|
| }
|
| }
|
| break;
|
| case PseudoLink:
|
| - linkMatchType &= ~MatchVisited;
|
| + m_linkMatchType &= ~MatchVisited;
|
| break;
|
| case PseudoVisited:
|
| - linkMatchType &= ~MatchLink;
|
| + m_linkMatchType &= ~MatchLink;
|
| break;
|
| default:
|
| // We don't support :link and :visited inside :-webkit-any.
|
| @@ -888,11 +886,10 @@ unsigned CSSSelector::computeLinkMatchType() const
|
| if (relation == SubSelector)
|
| continue;
|
| if (relation != Descendant && relation != Child)
|
| - return linkMatchType;
|
| - if (linkMatchType != MatchAll)
|
| - return linkMatchType;
|
| + return;
|
| + if (m_linkMatchType != MatchAll)
|
| + return;
|
| }
|
| - return linkMatchType;
|
| }
|
|
|
| void CSSSelector::setNth(int a, int b)
|
|
|