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

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

Issue 1765933003: style: Rename the PseudoId enum values to CamelCase and prefix them. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enum-clash-PseudoId: none Created 4 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
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 break; 164 break;
165 } 165 }
166 } 166 }
167 return s; 167 return s;
168 } 168 }
169 169
170 PseudoId CSSSelector::pseudoId(PseudoType type) 170 PseudoId CSSSelector::pseudoId(PseudoType type)
171 { 171 {
172 switch (type) { 172 switch (type) {
173 case PseudoFirstLine: 173 case PseudoFirstLine:
174 return FIRST_LINE; 174 return PseudoIdFirstLine;
175 case PseudoFirstLetter: 175 case PseudoFirstLetter:
176 return FIRST_LETTER; 176 return PseudoIdFirstLetter;
177 case PseudoSelection: 177 case PseudoSelection:
178 return SELECTION; 178 return PseudoIdSelection;
179 case PseudoBefore: 179 case PseudoBefore:
180 return BEFORE; 180 return PseudoIdBefore;
181 case PseudoAfter: 181 case PseudoAfter:
182 return AFTER; 182 return PseudoIdAfter;
183 case PseudoBackdrop: 183 case PseudoBackdrop:
184 return BACKDROP; 184 return PseudoIdBackdrop;
185 case PseudoScrollbar: 185 case PseudoScrollbar:
186 return SCROLLBAR; 186 return PseudoIdScrollbar;
187 case PseudoScrollbarButton: 187 case PseudoScrollbarButton:
188 return SCROLLBAR_BUTTON; 188 return PseudoIdScrollbarButton;
189 case PseudoScrollbarCorner: 189 case PseudoScrollbarCorner:
190 return SCROLLBAR_CORNER; 190 return PseudoIdScrollbarCorner;
191 case PseudoScrollbarThumb: 191 case PseudoScrollbarThumb:
192 return SCROLLBAR_THUMB; 192 return PseudoIdScrollbarThumb;
193 case PseudoScrollbarTrack: 193 case PseudoScrollbarTrack:
194 return SCROLLBAR_TRACK; 194 return PseudoIdScrollbarTrack;
195 case PseudoScrollbarTrackPiece: 195 case PseudoScrollbarTrackPiece:
196 return SCROLLBAR_TRACK_PIECE; 196 return PseudoIdScrollbarTrackPiece;
197 case PseudoResizer: 197 case PseudoResizer:
198 return RESIZER; 198 return PseudoIdResizer;
199 case PseudoUnknown: 199 case PseudoUnknown:
200 case PseudoEmpty: 200 case PseudoEmpty:
201 case PseudoFirstChild: 201 case PseudoFirstChild:
202 case PseudoFirstOfType: 202 case PseudoFirstOfType:
203 case PseudoLastChild: 203 case PseudoLastChild:
204 case PseudoLastOfType: 204 case PseudoLastOfType:
205 case PseudoOnlyChild: 205 case PseudoOnlyChild:
206 case PseudoOnlyOfType: 206 case PseudoOnlyOfType:
207 case PseudoNthChild: 207 case PseudoNthChild:
208 case PseudoNthOfType: 208 case PseudoNthOfType:
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 case PseudoUnresolved: 258 case PseudoUnresolved:
259 case PseudoContent: 259 case PseudoContent:
260 case PseudoHost: 260 case PseudoHost:
261 case PseudoHostContext: 261 case PseudoHostContext:
262 case PseudoShadow: 262 case PseudoShadow:
263 case PseudoFullScreen: 263 case PseudoFullScreen:
264 case PseudoFullScreenAncestor: 264 case PseudoFullScreenAncestor:
265 case PseudoSpatialNavigationFocus: 265 case PseudoSpatialNavigationFocus:
266 case PseudoListBox: 266 case PseudoListBox:
267 case PseudoSlotted: 267 case PseudoSlotted:
268 return NOPSEUDO; 268 return PseudoIdNone;
269 } 269 }
270 270
271 ASSERT_NOT_REACHED(); 271 ASSERT_NOT_REACHED();
272 return NOPSEUDO; 272 return PseudoIdNone;
273 } 273 }
274 274
275 // Could be made smaller and faster by replacing pointer with an 275 // Could be made smaller and faster by replacing pointer with an
276 // offset into a string buffer and making the bit fields smaller but 276 // offset into a string buffer and making the bit fields smaller but
277 // that could not be maintained by hand. 277 // that could not be maintained by hand.
278 struct NameToPseudoStruct { 278 struct NameToPseudoStruct {
279 const char* string; 279 const char* string;
280 unsigned type:8; 280 unsigned type:8;
281 }; 281 };
282 282
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 if (count < nthBValue()) 914 if (count < nthBValue())
915 return false; 915 return false;
916 return (count - nthBValue()) % nthAValue() == 0; 916 return (count - nthBValue()) % nthAValue() == 0;
917 } 917 }
918 if (count > nthBValue()) 918 if (count > nthBValue())
919 return false; 919 return false;
920 return (nthBValue() - count) % (-nthAValue()) == 0; 920 return (nthBValue() - count) % (-nthAValue()) == 0;
921 } 921 }
922 922
923 } // namespace blink 923 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698