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

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

Issue 2777063007: Corrected specificity for :not for default @namespace. (Closed)
Patch Set: Created 3 years, 8 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-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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 return 0x010000; 102 return 0x010000;
103 case PseudoClass: 103 case PseudoClass:
104 switch (getPseudoType()) { 104 switch (getPseudoType()) {
105 case PseudoHost: 105 case PseudoHost:
106 case PseudoHostContext: 106 case PseudoHostContext:
107 // We dynamically compute the specificity of :host and :host-context 107 // We dynamically compute the specificity of :host and :host-context
108 // during matching. 108 // during matching.
109 return 0; 109 return 0;
110 case PseudoNot: 110 case PseudoNot:
111 ASSERT(selectorList()); 111 ASSERT(selectorList());
112 return selectorList()->first()->specificityForOneSelector(); 112 return selectorList()->first()->specificity();
113 // FIXME: PseudoAny should base the specificity on the sub-selectors. 113 // FIXME: PseudoAny should base the specificity on the sub-selectors.
114 // See http://lists.w3.org/Archives/Public/www-style/2010Sep/0530.html 114 // See http://lists.w3.org/Archives/Public/www-style/2010Sep/0530.html
115 case PseudoAny: 115 case PseudoAny:
116 default: 116 default:
117 break; 117 break;
118 } 118 }
119 return 0x000100; 119 return 0x000100;
120 case Class: 120 case Class:
121 case PseudoElement: 121 case PseudoElement:
122 case AttributeExact: 122 case AttributeExact:
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 if (count < nthBValue()) 1002 if (count < nthBValue())
1003 return false; 1003 return false;
1004 return (count - nthBValue()) % nthAValue() == 0; 1004 return (count - nthBValue()) % nthAValue() == 0;
1005 } 1005 }
1006 if (count > nthBValue()) 1006 if (count > nthBValue())
1007 return false; 1007 return false;
1008 return (nthBValue() - count) % (-nthAValue()) == 0; 1008 return (nthBValue() - count) % (-nthAValue()) == 0;
1009 } 1009 }
1010 1010
1011 } // namespace blink 1011 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698