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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSSelector.cpp

Issue 2496123002: Matching part for >>> (shadow-piercing descendant combinator). (Closed)
Patch Set: Update comment as Rune suggested. Created 4 years, 1 month 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-2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * 1999 Waldo Bastian (bastian@kde.org) 3 * 1999 Waldo Bastian (bastian@kde.org)
4 * 2001 Andreas Schlapbach (schlpbch@iam.unibe.ch) 4 * 2001 Andreas Schlapbach (schlpbch@iam.unibe.ch)
5 * 2001-2003 Dirk Mueller (mueller@kde.org) 5 * 2001-2003 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 6 * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
7 * reserved. 7 * reserved.
8 * Copyright (C) 2008 David Smith (catfish.man@gmail.com) 8 * Copyright (C) 2008 David Smith (catfish.man@gmail.com)
9 * Copyright (C) 2010 Google Inc. All rights reserved. 9 * Copyright (C) 2010 Google Inc. All rights reserved.
10 * 10 *
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 [](const CSSSelector& selector) -> bool { 964 [](const CSSSelector& selector) -> bool {
965 return selector.getPseudoType() == CSSSelector::PseudoSlotted; 965 return selector.getPseudoType() == CSSSelector::PseudoSlotted;
966 }, 966 },
967 *this); 967 *this);
968 } 968 }
969 969
970 bool CSSSelector::hasDeepCombinatorOrShadowPseudo() const { 970 bool CSSSelector::hasDeepCombinatorOrShadowPseudo() const {
971 return forEachTagHistory( 971 return forEachTagHistory(
972 [](const CSSSelector& selector) -> bool { 972 [](const CSSSelector& selector) -> bool {
973 return selector.relation() == CSSSelector::ShadowDeep || 973 return selector.relation() == CSSSelector::ShadowDeep ||
974 selector.relation() == CSSSelector::ShadowPiercingDescendant ||
974 selector.getPseudoType() == CSSSelector::PseudoShadow; 975 selector.getPseudoType() == CSSSelector::PseudoShadow;
975 }, 976 },
976 *this); 977 *this);
977 } 978 }
978 979
979 bool CSSSelector::needsUpdatedDistribution() const { 980 bool CSSSelector::needsUpdatedDistribution() const {
980 return forEachTagHistory( 981 return forEachTagHistory(
981 [](const CSSSelector& selector) -> bool { 982 [](const CSSSelector& selector) -> bool {
982 return selector.relationIsAffectedByPseudoContent() || 983 return selector.relationIsAffectedByPseudoContent() ||
983 selector.getPseudoType() == CSSSelector::PseudoSlotted || 984 selector.getPseudoType() == CSSSelector::PseudoSlotted ||
(...skipping 19 matching lines...) Expand all
1003 if (count < nthBValue()) 1004 if (count < nthBValue())
1004 return false; 1005 return false;
1005 return (count - nthBValue()) % nthAValue() == 0; 1006 return (count - nthBValue()) % nthAValue() == 0;
1006 } 1007 }
1007 if (count > nthBValue()) 1008 if (count > nthBValue())
1008 return false; 1009 return false;
1009 return (nthBValue() - count) % (-nthAValue()) == 0; 1010 return (nthBValue() - count) % (-nthAValue()) == 0;
1010 } 1011 }
1011 1012
1012 } // namespace blink 1013 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698