OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) | 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "core/css/StyleRule.h" | 28 #include "core/css/StyleRule.h" |
29 #include "core/css/parser/CSSParser.h" | 29 #include "core/css/parser/CSSParser.h" |
30 #include "wtf/text/StringBuilder.h" | 30 #include "wtf/text/StringBuilder.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 using SelectorTextCache = | 34 using SelectorTextCache = |
35 PersistentHeapHashMap<WeakMember<const CSSStyleRule>, String>; | 35 PersistentHeapHashMap<WeakMember<const CSSStyleRule>, String>; |
36 | 36 |
37 static SelectorTextCache& selectorTextCache() { | 37 static SelectorTextCache& selectorTextCache() { |
| 38 ALLOW_UNSAFE_SINGLETON() |
38 DEFINE_STATIC_LOCAL(SelectorTextCache, cache, ()); | 39 DEFINE_STATIC_LOCAL(SelectorTextCache, cache, ()); |
39 return cache; | 40 return cache; |
40 } | 41 } |
41 | 42 |
42 CSSStyleRule::CSSStyleRule(StyleRule* styleRule, CSSStyleSheet* parent) | 43 CSSStyleRule::CSSStyleRule(StyleRule* styleRule, CSSStyleSheet* parent) |
43 : CSSRule(parent), m_styleRule(styleRule) {} | 44 : CSSRule(parent), m_styleRule(styleRule) {} |
44 | 45 |
45 CSSStyleRule::~CSSStyleRule() {} | 46 CSSStyleRule::~CSSStyleRule() {} |
46 | 47 |
47 CSSStyleDeclaration* CSSStyleRule::style() const { | 48 CSSStyleDeclaration* CSSStyleRule::style() const { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 CSSRule::trace(visitor); | 121 CSSRule::trace(visitor); |
121 } | 122 } |
122 | 123 |
123 DEFINE_TRACE_WRAPPERS(CSSStyleRule) { | 124 DEFINE_TRACE_WRAPPERS(CSSStyleRule) { |
124 visitor->traceWrappers(parentRule()); | 125 visitor->traceWrappers(parentRule()); |
125 visitor->traceWrappers(parentStyleSheet()); | 126 visitor->traceWrappers(parentStyleSheet()); |
126 CSSRule::traceWrappers(visitor); | 127 CSSRule::traceWrappers(visitor); |
127 } | 128 } |
128 | 129 |
129 } // namespace blink | 130 } // namespace blink |
OLD | NEW |