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

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

Issue 1165823005: Remove an outdated TODO about selector parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 case PseudoFullScreenAncestor: 265 case PseudoFullScreenAncestor:
266 case PseudoSpatialNavigationFocus: 266 case PseudoSpatialNavigationFocus:
267 case PseudoListBox: 267 case PseudoListBox:
268 return NOPSEUDO; 268 return NOPSEUDO;
269 } 269 }
270 270
271 ASSERT_NOT_REACHED(); 271 ASSERT_NOT_REACHED();
272 return NOPSEUDO; 272 return NOPSEUDO;
273 } 273 }
274 274
275 // TODO(timloh): Unify with CSSSelectorParser, which also compares pseudo names as strings
276
277 // Could be made smaller and faster by replacing pointer with an 275 // Could be made smaller and faster by replacing pointer with an
278 // 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
279 // that could not be maintained by hand. 277 // that could not be maintained by hand.
280 struct NameToPseudoStruct { 278 struct NameToPseudoStruct {
281 const char* string; 279 const char* string;
282 unsigned type:8; 280 unsigned type:8;
283 }; 281 };
284 282
285 // These tables should be kept sorted. 283 // These tables should be kept sorted.
286 const static NameToPseudoStruct pseudoTypeWithoutArgumentsMap[] = { 284 const static NameToPseudoStruct pseudoTypeWithoutArgumentsMap[] = {
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 if (count < nthBValue()) 927 if (count < nthBValue())
930 return false; 928 return false;
931 return (count - nthBValue()) % nthAValue() == 0; 929 return (count - nthBValue()) % nthAValue() == 0;
932 } 930 }
933 if (count > nthBValue()) 931 if (count > nthBValue())
934 return false; 932 return false;
935 return (nthBValue() - count) % (-nthAValue()) == 0; 933 return (nthBValue() - count) % (-nthAValue()) == 0;
936 } 934 }
937 935
938 } // namespace blink 936 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698