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

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

Issue 646853007: Remove fallback matching ::cue* pseudo-element selectors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix inspector dependency Created 6 years, 2 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/RuleFeature.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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 case PseudoStart: 235 case PseudoStart:
236 case PseudoEnd: 236 case PseudoEnd:
237 case PseudoDoubleButton: 237 case PseudoDoubleButton:
238 case PseudoSingleButton: 238 case PseudoSingleButton:
239 case PseudoNoButton: 239 case PseudoNoButton:
240 case PseudoFirstPage: 240 case PseudoFirstPage:
241 case PseudoLeftPage: 241 case PseudoLeftPage:
242 case PseudoRightPage: 242 case PseudoRightPage:
243 case PseudoInRange: 243 case PseudoInRange:
244 case PseudoOutOfRange: 244 case PseudoOutOfRange:
245 case PseudoUserAgentCustomElement:
246 case PseudoWebKitCustomElement: 245 case PseudoWebKitCustomElement:
247 case PseudoCue: 246 case PseudoCue:
248 case PseudoFutureCue: 247 case PseudoFutureCue:
249 case PseudoPastCue: 248 case PseudoPastCue:
250 case PseudoUnresolved: 249 case PseudoUnresolved:
251 case PseudoContent: 250 case PseudoContent:
252 case PseudoHost: 251 case PseudoHost:
253 case PseudoHostContext: 252 case PseudoHostContext:
254 case PseudoShadow: 253 case PseudoShadow:
255 case PseudoFullScreen: 254 case PseudoFullScreen:
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 #endif 435 #endif
437 436
438 CSSSelector::PseudoType CSSSelector::parsePseudoType(const AtomicString& name, b ool hasArguments) 437 CSSSelector::PseudoType CSSSelector::parsePseudoType(const AtomicString& name, b ool hasArguments)
439 { 438 {
440 CSSSelector::PseudoType pseudoType = nameToPseudoType(name, hasArguments); 439 CSSSelector::PseudoType pseudoType = nameToPseudoType(name, hasArguments);
441 if (pseudoType != PseudoUnknown) 440 if (pseudoType != PseudoUnknown)
442 return pseudoType; 441 return pseudoType;
443 442
444 if (name.startsWith("-webkit-")) 443 if (name.startsWith("-webkit-"))
445 return PseudoWebKitCustomElement; 444 return PseudoWebKitCustomElement;
446 if (name.startsWith("cue"))
447 return PseudoUserAgentCustomElement;
448 445
449 return PseudoUnknown; 446 return PseudoUnknown;
450 } 447 }
451 448
452 void CSSSelector::extractPseudoType() const 449 void CSSSelector::extractPseudoType() const
453 { 450 {
454 if (m_match != PseudoClass && m_match != PseudoElement && m_match != PagePse udoClass) 451 if (m_match != PseudoClass && m_match != PseudoElement && m_match != PagePse udoClass)
455 return; 452 return;
456 453
457 m_pseudoType = parsePseudoType(value(), !argument().isNull() || selectorList ()); 454 m_pseudoType = parsePseudoType(value(), !argument().isNull() || selectorList ());
(...skipping 11 matching lines...) Expand all
469 compat = true; 466 compat = true;
470 case PseudoBackdrop: 467 case PseudoBackdrop:
471 case PseudoResizer: 468 case PseudoResizer:
472 case PseudoScrollbar: 469 case PseudoScrollbar:
473 case PseudoScrollbarCorner: 470 case PseudoScrollbarCorner:
474 case PseudoScrollbarButton: 471 case PseudoScrollbarButton:
475 case PseudoScrollbarThumb: 472 case PseudoScrollbarThumb:
476 case PseudoScrollbarTrack: 473 case PseudoScrollbarTrack:
477 case PseudoScrollbarTrackPiece: 474 case PseudoScrollbarTrackPiece:
478 case PseudoSelection: 475 case PseudoSelection:
479 case PseudoUserAgentCustomElement:
480 case PseudoWebKitCustomElement: 476 case PseudoWebKitCustomElement:
481 case PseudoContent: 477 case PseudoContent:
482 case PseudoShadow: 478 case PseudoShadow:
483 element = true; 479 element = true;
484 break; 480 break;
485 case PseudoUnknown: 481 case PseudoUnknown:
486 case PseudoEmpty: 482 case PseudoEmpty:
487 case PseudoFirstChild: 483 case PseudoFirstChild:
488 case PseudoFirstOfType: 484 case PseudoFirstOfType:
489 case PseudoLastChild: 485 case PseudoLastChild:
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 if (count < nthBValue()) 908 if (count < nthBValue())
913 return false; 909 return false;
914 return (count - nthBValue()) % nthAValue() == 0; 910 return (count - nthBValue()) % nthAValue() == 0;
915 } 911 }
916 if (count > nthBValue()) 912 if (count > nthBValue())
917 return false; 913 return false;
918 return (nthBValue() - count) % (-nthAValue()) == 0; 914 return (nthBValue() - count) % (-nthAValue()) == 0;
919 } 915 }
920 916
921 } // namespace blink 917 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSSelector.h ('k') | Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698