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

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

Issue 183803016: Rename ^ and ^^ combinator to /shadow-all/ and /shadow-deep/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSSelector.h ('k') | Source/core/css/CSSSelectorList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 reserv ed. 6 * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2008 David Smith (catfish.man@gmail.com) 7 * Copyright (C) 2008 David Smith (catfish.man@gmail.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 if (const CSSSelector* tagHistory = cs->tagHistory()) { 753 if (const CSSSelector* tagHistory = cs->tagHistory()) {
754 switch (cs->relation()) { 754 switch (cs->relation()) {
755 case CSSSelector::Descendant: 755 case CSSSelector::Descendant:
756 if (cs->relationIsAffectedByPseudoContent() && tagHistory->pseudoTyp e() != CSSSelector::PseudoContent) 756 if (cs->relationIsAffectedByPseudoContent() && tagHistory->pseudoTyp e() != CSSSelector::PseudoContent)
757 return tagHistory->selectorText("::-webkit-distributed(" + str.t oString() + rightSide + ")"); 757 return tagHistory->selectorText("::-webkit-distributed(" + str.t oString() + rightSide + ")");
758 return tagHistory->selectorText(" " + str.toString() + rightSide); 758 return tagHistory->selectorText(" " + str.toString() + rightSide);
759 case CSSSelector::Child: 759 case CSSSelector::Child:
760 if (cs->relationIsAffectedByPseudoContent() && tagHistory->pseudoTyp e() != CSSSelector::PseudoContent) 760 if (cs->relationIsAffectedByPseudoContent() && tagHistory->pseudoTyp e() != CSSSelector::PseudoContent)
761 return tagHistory->selectorText("::-webkit-distributed(> " + str .toString() + rightSide + ")"); 761 return tagHistory->selectorText("::-webkit-distributed(> " + str .toString() + rightSide + ")");
762 return tagHistory->selectorText(" > " + str.toString() + rightSide); 762 return tagHistory->selectorText(" > " + str.toString() + rightSide);
763 case CSSSelector::ChildTree: 763 case CSSSelector::ShadowAll:
764 return tagHistory->selectorText(" ^ " + str.toString() + rightSide); 764 return tagHistory->selectorText(" /shadow-all/ " + str.toString() + rightSide);
765 case CSSSelector::DescendantTree: 765 case CSSSelector::ShadowDeep:
766 return tagHistory->selectorText(" ^^ " + str.toString() + rightSide) ; 766 return tagHistory->selectorText(" /shadow-deep/ " + str.toString() + rightSide);
767 case CSSSelector::DirectAdjacent: 767 case CSSSelector::DirectAdjacent:
768 return tagHistory->selectorText(" + " + str.toString() + rightSide); 768 return tagHistory->selectorText(" + " + str.toString() + rightSide);
769 case CSSSelector::IndirectAdjacent: 769 case CSSSelector::IndirectAdjacent:
770 return tagHistory->selectorText(" ~ " + str.toString() + rightSide); 770 return tagHistory->selectorText(" ~ " + str.toString() + rightSide);
771 case CSSSelector::SubSelector: 771 case CSSSelector::SubSelector:
772 ASSERT_NOT_REACHED(); 772 ASSERT_NOT_REACHED();
773 case CSSSelector::ShadowPseudo: 773 case CSSSelector::ShadowPseudo:
774 return tagHistory->selectorText(str.toString() + rightSide); 774 return tagHistory->selectorText(str.toString() + rightSide);
775 } 775 }
776 } 776 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 return false; 945 return false;
946 return (count - m_b) % m_a == 0; 946 return (count - m_b) % m_a == 0;
947 } else { 947 } else {
948 if (count > m_b) 948 if (count > m_b)
949 return false; 949 return false;
950 return (m_b - count) % (-m_a) == 0; 950 return (m_b - count) % (-m_a) == 0;
951 } 951 }
952 } 952 }
953 953
954 } // namespace WebCore 954 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSSelector.h ('k') | Source/core/css/CSSSelectorList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698