OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. |
8 * All rights reserved. | 8 * All rights reserved. |
9 * (C) 2007 Eric Seidel (eric@webkit.org) | 9 * (C) 2007 Eric Seidel (eric@webkit.org) |
10 * | 10 * |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 namespace { | 153 namespace { |
154 | 154 |
155 // We need to retain the scroll customization callbacks until the element | 155 // We need to retain the scroll customization callbacks until the element |
156 // they're associated with is destroyed. It would be simplest if the callbacks | 156 // they're associated with is destroyed. It would be simplest if the callbacks |
157 // could be stored in ElementRareData, but we can't afford the space | 157 // could be stored in ElementRareData, but we can't afford the space |
158 // increase. Instead, keep the scroll customization callbacks here. The other | 158 // increase. Instead, keep the scroll customization callbacks here. The other |
159 // option would be to store these callbacks on the FrameHost or document, but | 159 // option would be to store these callbacks on the FrameHost or document, but |
160 // that necessitates a bunch more logic for transferring the callbacks between | 160 // that necessitates a bunch more logic for transferring the callbacks between |
161 // FrameHosts when elements are moved around. | 161 // FrameHosts when elements are moved around. |
162 ScrollCustomizationCallbacks& scrollCustomizationCallbacks() { | 162 ScrollCustomizationCallbacks& scrollCustomizationCallbacks() { |
| 163 ALLOW_UNSAFE_SINGLETON() |
163 DEFINE_STATIC_LOCAL(ScrollCustomizationCallbacks, | 164 DEFINE_STATIC_LOCAL(ScrollCustomizationCallbacks, |
164 scrollCustomizationCallbacks, | 165 scrollCustomizationCallbacks, |
165 (new ScrollCustomizationCallbacks)); | 166 (new ScrollCustomizationCallbacks)); |
166 return scrollCustomizationCallbacks; | 167 return scrollCustomizationCallbacks; |
167 } | 168 } |
168 | 169 |
169 } // namespace | 170 } // namespace |
170 | 171 |
171 using namespace HTMLNames; | 172 using namespace HTMLNames; |
172 using namespace XMLNames; | 173 using namespace XMLNames; |
(...skipping 3961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4134 } | 4135 } |
4135 | 4136 |
4136 DEFINE_TRACE_WRAPPERS(Element) { | 4137 DEFINE_TRACE_WRAPPERS(Element) { |
4137 if (hasRareData()) { | 4138 if (hasRareData()) { |
4138 visitor->traceWrappers(elementRareData()); | 4139 visitor->traceWrappers(elementRareData()); |
4139 } | 4140 } |
4140 ContainerNode::traceWrappers(visitor); | 4141 ContainerNode::traceWrappers(visitor); |
4141 } | 4142 } |
4142 | 4143 |
4143 } // namespace blink | 4144 } // namespace blink |
OLD | NEW |