| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 ASSERT(m_match != Tag); | 52 ASSERT(m_match != Tag); |
| 53 if (m_hasRareData) | 53 if (m_hasRareData) |
| 54 return; | 54 return; |
| 55 AtomicString value(m_data.m_value); | 55 AtomicString value(m_data.m_value); |
| 56 if (m_data.m_value) | 56 if (m_data.m_value) |
| 57 m_data.m_value->deref(); | 57 m_data.m_value->deref(); |
| 58 m_data.m_rareData = RareData::create(value).leakRef(); | 58 m_data.m_rareData = RareData::create(value).leakRef(); |
| 59 m_hasRareData = true; | 59 m_hasRareData = true; |
| 60 } | 60 } |
| 61 | 61 |
| 62 PseudoId CSSSelector::pseudoId(PseudoType type) | |
| 63 { | |
| 64 switch (type) { | |
| 65 case PseudoUnknown: | |
| 66 case PseudoHover: | |
| 67 case PseudoFocus: | |
| 68 case PseudoActive: | |
| 69 case PseudoLang: | |
| 70 case PseudoUserAgentCustomElement: | |
| 71 case PseudoHost: | |
| 72 return NOPSEUDO; | |
| 73 case PseudoNotParsed: | |
| 74 ASSERT_NOT_REACHED(); | |
| 75 return NOPSEUDO; | |
| 76 } | |
| 77 | |
| 78 ASSERT_NOT_REACHED(); | |
| 79 return NOPSEUDO; | |
| 80 } | |
| 81 | |
| 82 // Could be made smaller and faster by replacing pointer with an | 62 // Could be made smaller and faster by replacing pointer with an |
| 83 // offset into a string buffer and making the bit fields smaller but | 63 // offset into a string buffer and making the bit fields smaller but |
| 84 // that could not be maintained by hand. | 64 // that could not be maintained by hand. |
| 85 struct NameToPseudoStruct { | 65 struct NameToPseudoStruct { |
| 86 const char* string; | 66 const char* string; |
| 87 unsigned type:8; | 67 unsigned type:8; |
| 88 }; | 68 }; |
| 89 | 69 |
| 90 // This table should be kept sorted. | 70 // This table should be kept sorted. |
| 91 const static NameToPseudoStruct pseudoTypeMap[] = { | 71 const static NameToPseudoStruct pseudoTypeMap[] = { |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 , m_attribute(anyName) | 328 , m_attribute(anyName) |
| 349 , m_argument(nullAtom) | 329 , m_argument(nullAtom) |
| 350 { | 330 { |
| 351 } | 331 } |
| 352 | 332 |
| 353 CSSSelector::RareData::~RareData() | 333 CSSSelector::RareData::~RareData() |
| 354 { | 334 { |
| 355 } | 335 } |
| 356 | 336 |
| 357 } // namespace blink | 337 } // namespace blink |
| OLD | NEW |