Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: Source/WebCore/css/CSSStyleSelector.cpp

Issue 8365028: Merge 97745 - REGRESSION(r97248): :visited as descendant selector broken (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after
2167 applyProperty(current.id(), current.value()); 2167 applyProperty(current.id(), current.value());
2168 } 2168 }
2169 } 2169 }
2170 2170
2171 template <bool applyFirst> 2171 template <bool applyFirst>
2172 void CSSStyleSelector::applyDeclarations(bool isImportant, int startIndex, int e ndIndex) 2172 void CSSStyleSelector::applyDeclarations(bool isImportant, int startIndex, int e ndIndex)
2173 { 2173 {
2174 if (startIndex == -1) 2174 if (startIndex == -1)
2175 return; 2175 return;
2176 2176
2177 if (m_element && m_element->isLink()) { 2177 if (m_style->insideLink() != NotInsideLink) {
2178 for (int i = startIndex; i <= endIndex; ++i) { 2178 for (int i = startIndex; i <= endIndex; ++i) {
2179 CSSMutableStyleDeclaration* styleDeclaration = m_matchedDecls[i].sty leDeclaration; 2179 CSSMutableStyleDeclaration* styleDeclaration = m_matchedDecls[i].sty leDeclaration;
2180 unsigned linkMatchType = m_matchedDecls[i].linkMatchType; 2180 unsigned linkMatchType = m_matchedDecls[i].linkMatchType;
2181 // FIXME: It would be nicer to pass these as arguments but that requ ires changes in many places. 2181 // FIXME: It would be nicer to pass these as arguments but that requ ires changes in many places.
2182 m_applyPropertyToRegularStyle = linkMatchType & SelectorChecker::Mat chLink; 2182 m_applyPropertyToRegularStyle = linkMatchType & SelectorChecker::Mat chLink;
2183 m_applyPropertyToVisitedLinkStyle = linkMatchType & SelectorChecker: :MatchVisited; 2183 m_applyPropertyToVisitedLinkStyle = linkMatchType & SelectorChecker: :MatchVisited;
2184 2184
2185 applyDeclaration<applyFirst>(styleDeclaration, isImportant); 2185 applyDeclaration<applyFirst>(styleDeclaration, isImportant);
2186 } 2186 }
2187 m_applyPropertyToRegularStyle = true; 2187 m_applyPropertyToRegularStyle = true;
(...skipping 3313 matching lines...) Expand 10 before | Expand all | Expand 10 after
5501 } 5501 }
5502 default: 5502 default:
5503 ASSERT_NOT_REACHED(); 5503 ASSERT_NOT_REACHED();
5504 } 5504 }
5505 } 5505 }
5506 5506
5507 m_pendingImageProperties.clear(); 5507 m_pendingImageProperties.clear();
5508 } 5508 }
5509 5509
5510 } // namespace WebCore 5510 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/platform/mac/fast/selectors/visited-descendant-expected.txt ('k') | Source/WebCore/css/SelectorChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698