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 | 6 * Copyright (C) 2002, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
7 * reserved. | 7 * reserved. |
8 * Copyright (C) 2008 David Smith (catfish.man@gmail.com) | 8 * Copyright (C) 2008 David Smith (catfish.man@gmail.com) |
9 * Copyright (C) 2010 Google Inc. All rights reserved. | 9 * Copyright (C) 2010 Google Inc. All rights reserved. |
10 * | 10 * |
11 * This library is free software; you can redistribute it and/or | 11 * This library is free software; you can redistribute it and/or |
12 * modify it under the terms of the GNU Library General Public | 12 * modify it under the terms of the GNU Library General Public |
13 * License as published by the Free Software Foundation; either | 13 * License as published by the Free Software Foundation; either |
14 * version 2 of the License, or (at your option) any later version. | 14 * version 2 of the License, or (at your option) any later version. |
15 * | 15 * |
16 * This library is distributed in the hope that it will be useful, | 16 * This library is distributed in the hope that it will be useful, |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
19 * Library General Public License for more details. | 19 * Library General Public License for more details. |
20 * | 20 * |
21 * You should have received a copy of the GNU Library General Public License | 21 * You should have received a copy of the GNU Library General Public License |
22 * along with this library; see the file COPYING.LIB. If not, write to | 22 * along with this library; see the file COPYING.LIB. If not, write to |
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 * Boston, MA 02110-1301, USA. | 24 * Boston, MA 02110-1301, USA. |
25 */ | 25 */ |
26 | 26 |
27 #include "core/css/CSSSelector.h" | 27 #include "core/css/CSSSelector.h" |
28 | 28 |
| 29 #include <algorithm> |
| 30 #include <memory> |
29 #include "core/HTMLNames.h" | 31 #include "core/HTMLNames.h" |
30 #include "core/css/CSSMarkup.h" | 32 #include "core/css/CSSMarkup.h" |
31 #include "core/css/CSSSelectorList.h" | 33 #include "core/css/CSSSelectorList.h" |
32 #include "platform/RuntimeEnabledFeatures.h" | 34 #include "platform/RuntimeEnabledFeatures.h" |
33 #include "wtf/Assertions.h" | 35 #include "wtf/Assertions.h" |
34 #include "wtf/HashMap.h" | 36 #include "wtf/HashMap.h" |
35 #include "wtf/StdLibExtras.h" | 37 #include "wtf/StdLibExtras.h" |
36 #include "wtf/text/StringBuilder.h" | 38 #include "wtf/text/StringBuilder.h" |
37 #include <algorithm> | |
38 #include <memory> | |
39 | 39 |
40 #ifndef NDEBUG | 40 #ifndef NDEBUG |
41 #include <stdio.h> | 41 #include <stdio.h> |
42 #endif | 42 #endif |
43 | 43 |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
46 using namespace HTMLNames; | 46 using namespace HTMLNames; |
47 | 47 |
48 struct SameSizeAsCSSSelector { | 48 struct SameSizeAsCSSSelector { |
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 if (count < nthBValue()) | 1014 if (count < nthBValue()) |
1015 return false; | 1015 return false; |
1016 return (count - nthBValue()) % nthAValue() == 0; | 1016 return (count - nthBValue()) % nthAValue() == 0; |
1017 } | 1017 } |
1018 if (count > nthBValue()) | 1018 if (count > nthBValue()) |
1019 return false; | 1019 return false; |
1020 return (nthBValue() - count) % (-nthAValue()) == 0; | 1020 return (nthBValue() - count) % (-nthAValue()) == 0; |
1021 } | 1021 } |
1022 | 1022 |
1023 } // namespace blink | 1023 } // namespace blink |
OLD | NEW |