| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 using namespace HTMLNames; | 44 using namespace HTMLNames; |
| 45 | 45 |
| 46 struct SameSizeAsCSSSelector { | 46 struct SameSizeAsCSSSelector { |
| 47 unsigned bitfields; | 47 unsigned bitfields; |
| 48 void *pointers[1]; | 48 void *pointers[1]; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 COMPILE_ASSERT(sizeof(CSSSelector) == sizeof(SameSizeAsCSSSelector), CSSSelector
ShouldStaySmall); | 51 static_assert(sizeof(CSSSelector) == sizeof(SameSizeAsCSSSelector), "CSSSelector
should stay small"); |
| 52 | 52 |
| 53 void CSSSelector::createRareData() | 53 void CSSSelector::createRareData() |
| 54 { | 54 { |
| 55 ASSERT(m_match != Tag); | 55 ASSERT(m_match != Tag); |
| 56 if (m_hasRareData) | 56 if (m_hasRareData) |
| 57 return; | 57 return; |
| 58 AtomicString value(m_data.m_value); | 58 AtomicString value(m_data.m_value); |
| 59 if (m_data.m_value) | 59 if (m_data.m_value) |
| 60 m_data.m_value->deref(); | 60 m_data.m_value->deref(); |
| 61 m_data.m_rareData = RareData::create(value).leakRef(); | 61 m_data.m_rareData = RareData::create(value).leakRef(); |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 if (count < nthBValue()) | 919 if (count < nthBValue()) |
| 920 return false; | 920 return false; |
| 921 return (count - nthBValue()) % nthAValue() == 0; | 921 return (count - nthBValue()) % nthAValue() == 0; |
| 922 } | 922 } |
| 923 if (count > nthBValue()) | 923 if (count > nthBValue()) |
| 924 return false; | 924 return false; |
| 925 return (nthBValue() - count) % (-nthAValue()) == 0; | 925 return (nthBValue() - count) % (-nthAValue()) == 0; |
| 926 } | 926 } |
| 927 | 927 |
| 928 } // namespace blink | 928 } // namespace blink |
| OLD | NEW |