OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
6 * rights reserved. | 6 * rights reserved. |
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 193 |
194 DataRef<SVGComputedStyle> svg_style_; | 194 DataRef<SVGComputedStyle> svg_style_; |
195 | 195 |
196 private: | 196 private: |
197 // TODO(sashab): Move these private members to the bottom of ComputedStyle. | 197 // TODO(sashab): Move these private members to the bottom of ComputedStyle. |
198 ALWAYS_INLINE ComputedStyle(); | 198 ALWAYS_INLINE ComputedStyle(); |
199 ALWAYS_INLINE ComputedStyle(const ComputedStyle&); | 199 ALWAYS_INLINE ComputedStyle(const ComputedStyle&); |
200 | 200 |
201 static PassRefPtr<ComputedStyle> CreateInitialStyle(); | 201 static PassRefPtr<ComputedStyle> CreateInitialStyle(); |
202 // TODO(shend): Remove this. Initial style should not be mutable. | 202 // TODO(shend): Remove this. Initial style should not be mutable. |
203 static inline ComputedStyle& MutableInitialStyle() { | 203 static ComputedStyle& MutableInitialStyle(); |
204 LEAK_SANITIZER_DISABLED_SCOPE; | |
205 DEFINE_STATIC_REF(ComputedStyle, initial_style, | |
206 (ComputedStyle::CreateInitialStyle())); | |
207 return *initial_style; | |
208 } | |
209 | 204 |
210 public: | 205 public: |
211 static PassRefPtr<ComputedStyle> Create(); | 206 static PassRefPtr<ComputedStyle> Create(); |
212 static PassRefPtr<ComputedStyle> CreateAnonymousStyleWithDisplay( | 207 static PassRefPtr<ComputedStyle> CreateAnonymousStyleWithDisplay( |
213 const ComputedStyle& parent_style, | 208 const ComputedStyle& parent_style, |
214 EDisplay); | 209 EDisplay); |
215 static PassRefPtr<ComputedStyle> Clone(const ComputedStyle&); | 210 static PassRefPtr<ComputedStyle> Clone(const ComputedStyle&); |
216 static const ComputedStyle& InitialStyle() { return MutableInitialStyle(); } | 211 static const ComputedStyle& InitialStyle() { return MutableInitialStyle(); } |
217 static void InvalidateInitialStyle(); | 212 static void InvalidateInitialStyle(); |
218 | 213 |
(...skipping 3552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3771 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); | 3766 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); |
3772 } | 3767 } |
3773 | 3768 |
3774 inline bool ComputedStyle::HasPseudoElementStyle() const { | 3769 inline bool ComputedStyle::HasPseudoElementStyle() const { |
3775 return PseudoBitsInternal() & kElementPseudoIdMask; | 3770 return PseudoBitsInternal() & kElementPseudoIdMask; |
3776 } | 3771 } |
3777 | 3772 |
3778 } // namespace blink | 3773 } // namespace blink |
3779 | 3774 |
3780 #endif // ComputedStyle_h | 3775 #endif // ComputedStyle_h |
OLD | NEW |