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

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

Issue 187573002: Revert "Reverting custom pseudo element". (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 if (name.isNull()) 476 if (name.isNull())
477 return PseudoUnknown; 477 return PseudoUnknown;
478 HashMap<StringImpl*, CSSSelector::PseudoType>* nameToPseudoType = nameToPseu doTypeMap(); 478 HashMap<StringImpl*, CSSSelector::PseudoType>* nameToPseudoType = nameToPseu doTypeMap();
479 HashMap<StringImpl*, CSSSelector::PseudoType>::iterator slot = nameToPseudoT ype->find(name.impl()); 479 HashMap<StringImpl*, CSSSelector::PseudoType>::iterator slot = nameToPseudoT ype->find(name.impl());
480 480
481 if (slot != nameToPseudoType->end()) 481 if (slot != nameToPseudoType->end())
482 return slot->value; 482 return slot->value;
483 483
484 if (name.startsWith("-webkit-")) 484 if (name.startsWith("-webkit-"))
485 return PseudoWebKitCustomElement; 485 return PseudoWebKitCustomElement;
486 if (name.startsWith("cue")) 486 if (name.startsWith("x-") || name.startsWith("cue"))
487 return PseudoUserAgentCustomElement; 487 return PseudoUserAgentCustomElement;
488 488
489 return PseudoUnknown; 489 return PseudoUnknown;
490 } 490 }
491 491
492 void CSSSelector::extractPseudoType() const 492 void CSSSelector::extractPseudoType() const
493 { 493 {
494 if (m_match != PseudoClass && m_match != PseudoElement && m_match != PagePse udoClass) 494 if (m_match != PseudoClass && m_match != PseudoElement && m_match != PagePse udoClass)
495 return; 495 return;
496 496
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 return false; 945 return false;
946 return (count - m_b) % m_a == 0; 946 return (count - m_b) % m_a == 0;
947 } else { 947 } else {
948 if (count > m_b) 948 if (count > m_b)
949 return false; 949 return false;
950 return (m_b - count) % (-m_a) == 0; 950 return (m_b - count) % (-m_a) == 0;
951 } 951 }
952 } 952 }
953 953
954 } // namespace WebCore 954 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/shadow/styling-pseudo-attribute-in-shadow-expected.html ('k') | Source/core/css/SelectorChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698