| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |