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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 | 457 |
458 setValue(value); | 458 setValue(value); |
459 setPseudoType(parsePseudoType(value, hasArguments)); | 459 setPseudoType(parsePseudoType(value, hasArguments)); |
460 | 460 |
461 switch (m_pseudoType) { | 461 switch (m_pseudoType) { |
462 case PseudoAfter: | 462 case PseudoAfter: |
463 case PseudoBefore: | 463 case PseudoBefore: |
464 case PseudoFirstLetter: | 464 case PseudoFirstLetter: |
465 case PseudoFirstLine: | 465 case PseudoFirstLine: |
466 // The spec says some pseudos allow both single and double colons like | 466 // The spec says some pseudos allow both single and double colons like |
467 // :before for backwards compatability. Single colon becomes PseudoClass
, | 467 // :before for backwards compatibility. Single colon becomes PseudoClass
, |
468 // but should be PseudoElement like double colon. | 468 // but should be PseudoElement like double colon. |
469 if (m_match == PseudoClass) | 469 if (m_match == PseudoClass) |
470 m_match = PseudoElement; | 470 m_match = PseudoElement; |
471 // fallthrough | 471 // fallthrough |
472 case PseudoBackdrop: | 472 case PseudoBackdrop: |
473 case PseudoCue: | 473 case PseudoCue: |
474 case PseudoResizer: | 474 case PseudoResizer: |
475 case PseudoScrollbar: | 475 case PseudoScrollbar: |
476 case PseudoScrollbarCorner: | 476 case PseudoScrollbarCorner: |
477 case PseudoScrollbarButton: | 477 case PseudoScrollbarButton: |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 if (count < nthBValue()) | 903 if (count < nthBValue()) |
904 return false; | 904 return false; |
905 return (count - nthBValue()) % nthAValue() == 0; | 905 return (count - nthBValue()) % nthAValue() == 0; |
906 } | 906 } |
907 if (count > nthBValue()) | 907 if (count > nthBValue()) |
908 return false; | 908 return false; |
909 return (nthBValue() - count) % (-nthAValue()) == 0; | 909 return (nthBValue() - count) % (-nthAValue()) == 0; |
910 } | 910 } |
911 | 911 |
912 } // namespace blink | 912 } // namespace blink |
OLD | NEW |