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

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

Issue 1280423002: CSS4: Implement :placeholder-shown pseudo class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated testcase Created 5 years, 4 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 case PseudoHover: 217 case PseudoHover:
218 case PseudoDrag: 218 case PseudoDrag:
219 case PseudoFocus: 219 case PseudoFocus:
220 case PseudoActive: 220 case PseudoActive:
221 case PseudoChecked: 221 case PseudoChecked:
222 case PseudoEnabled: 222 case PseudoEnabled:
223 case PseudoFullPageMedia: 223 case PseudoFullPageMedia:
224 case PseudoDefault: 224 case PseudoDefault:
225 case PseudoDisabled: 225 case PseudoDisabled:
226 case PseudoOptional: 226 case PseudoOptional:
227 case PseudoPlaceholderShown:
227 case PseudoRequired: 228 case PseudoRequired:
228 case PseudoReadOnly: 229 case PseudoReadOnly:
229 case PseudoReadWrite: 230 case PseudoReadWrite:
230 case PseudoValid: 231 case PseudoValid:
231 case PseudoInvalid: 232 case PseudoInvalid:
232 case PseudoIndeterminate: 233 case PseudoIndeterminate:
233 case PseudoTarget: 234 case PseudoTarget:
234 case PseudoLang: 235 case PseudoLang:
235 case PseudoNot: 236 case PseudoNot:
236 case PseudoRoot: 237 case PseudoRoot:
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 {"last-child", CSSSelector::PseudoLastChild}, 331 {"last-child", CSSSelector::PseudoLastChild},
331 {"last-of-type", CSSSelector::PseudoLastOfType}, 332 {"last-of-type", CSSSelector::PseudoLastOfType},
332 {"left", CSSSelector::PseudoLeftPage}, 333 {"left", CSSSelector::PseudoLeftPage},
333 {"link", CSSSelector::PseudoLink}, 334 {"link", CSSSelector::PseudoLink},
334 {"no-button", CSSSelector::PseudoNoButton}, 335 {"no-button", CSSSelector::PseudoNoButton},
335 {"only-child", CSSSelector::PseudoOnlyChild}, 336 {"only-child", CSSSelector::PseudoOnlyChild},
336 {"only-of-type", CSSSelector::PseudoOnlyOfType}, 337 {"only-of-type", CSSSelector::PseudoOnlyOfType},
337 {"optional", CSSSelector::PseudoOptional}, 338 {"optional", CSSSelector::PseudoOptional},
338 {"out-of-range", CSSSelector::PseudoOutOfRange}, 339 {"out-of-range", CSSSelector::PseudoOutOfRange},
339 {"past", CSSSelector::PseudoPastCue}, 340 {"past", CSSSelector::PseudoPastCue},
341 {"placeholder-shown", CSSSelector::PseudoPlaceholderShown},
340 {"read-only", CSSSelector::PseudoReadOnly}, 342 {"read-only", CSSSelector::PseudoReadOnly},
341 {"read-write", CSSSelector::PseudoReadWrite}, 343 {"read-write", CSSSelector::PseudoReadWrite},
342 {"required", CSSSelector::PseudoRequired}, 344 {"required", CSSSelector::PseudoRequired},
343 {"right", CSSSelector::PseudoRightPage}, 345 {"right", CSSSelector::PseudoRightPage},
344 {"root", CSSSelector::PseudoRoot}, 346 {"root", CSSSelector::PseudoRoot},
345 {"scope", CSSSelector::PseudoScope}, 347 {"scope", CSSSelector::PseudoScope},
346 {"selection", CSSSelector::PseudoSelection}, 348 {"selection", CSSSelector::PseudoSelection},
347 {"shadow", CSSSelector::PseudoShadow}, 349 {"shadow", CSSSelector::PseudoShadow},
348 {"single-button", CSSSelector::PseudoSingleButton}, 350 {"single-button", CSSSelector::PseudoSingleButton},
349 {"start", CSSSelector::PseudoStart}, 351 {"start", CSSSelector::PseudoStart},
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 case PseudoListBox: 527 case PseudoListBox:
526 case PseudoNoButton: 528 case PseudoNoButton:
527 case PseudoNot: 529 case PseudoNot:
528 case PseudoNthChild: 530 case PseudoNthChild:
529 case PseudoNthLastChild: 531 case PseudoNthLastChild:
530 case PseudoNthLastOfType: 532 case PseudoNthLastOfType:
531 case PseudoNthOfType: 533 case PseudoNthOfType:
532 case PseudoOnlyChild: 534 case PseudoOnlyChild:
533 case PseudoOnlyOfType: 535 case PseudoOnlyOfType:
534 case PseudoOptional: 536 case PseudoOptional:
537 case PseudoPlaceholderShown:
535 case PseudoOutOfRange: 538 case PseudoOutOfRange:
536 case PseudoPastCue: 539 case PseudoPastCue:
537 case PseudoReadOnly: 540 case PseudoReadOnly:
538 case PseudoReadWrite: 541 case PseudoReadWrite:
539 case PseudoRequired: 542 case PseudoRequired:
540 case PseudoRoot: 543 case PseudoRoot:
541 case PseudoScope: 544 case PseudoScope:
542 case PseudoSingleButton: 545 case PseudoSingleButton:
543 case PseudoSpatialNavigationFocus: 546 case PseudoSpatialNavigationFocus:
544 case PseudoStart: 547 case PseudoStart:
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 if (count < nthBValue()) 927 if (count < nthBValue())
925 return false; 928 return false;
926 return (count - nthBValue()) % nthAValue() == 0; 929 return (count - nthBValue()) % nthAValue() == 0;
927 } 930 }
928 if (count > nthBValue()) 931 if (count > nthBValue())
929 return false; 932 return false;
930 return (nthBValue() - count) % (-nthAValue()) == 0; 933 return (nthBValue() - count) % (-nthAValue()) == 0;
931 } 934 }
932 935
933 } // namespace blink 936 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698