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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 static_cast<unsigned>(initialVerticalAlign()); | 295 static_cast<unsigned>(initialVerticalAlign()); |
296 m_nonInheritedData.m_styleType = PseudoIdNone; | 296 m_nonInheritedData.m_styleType = PseudoIdNone; |
297 m_nonInheritedData.m_pseudoBits = 0; | 297 m_nonInheritedData.m_pseudoBits = 0; |
298 m_nonInheritedData.m_emptyState = false; | 298 m_nonInheritedData.m_emptyState = false; |
299 m_nonInheritedData.m_hasViewportUnits = false; | 299 m_nonInheritedData.m_hasViewportUnits = false; |
300 m_nonInheritedData.m_isLink = false; | 300 m_nonInheritedData.m_isLink = false; |
301 m_nonInheritedData.m_hasRemUnits = false; | 301 m_nonInheritedData.m_hasRemUnits = false; |
302 } | 302 } |
303 | 303 |
304 private: | 304 private: |
305 // TODO(sashab): Move these to the bottom of ComputedStyle. | 305 // TODO(sashab): Move these private members to the bottom of ComputedStyle. |
306 ALWAYS_INLINE ComputedStyle(); | |
307 | |
308 enum InitialStyleTag { InitialStyle }; | 306 enum InitialStyleTag { InitialStyle }; |
309 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag); | 307 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag); |
310 ALWAYS_INLINE ComputedStyle(const ComputedStyle&); | 308 ALWAYS_INLINE ComputedStyle(const ComputedStyle&); |
311 | 309 |
312 static PassRefPtr<ComputedStyle> createInitialStyle(); | 310 static PassRefPtr<ComputedStyle> createInitialStyle(); |
| 311 // TODO(shend): Remove this. Initial style should not be mutable. |
313 static inline ComputedStyle& mutableInitialStyle() { | 312 static inline ComputedStyle& mutableInitialStyle() { |
314 LEAK_SANITIZER_DISABLED_SCOPE; | 313 LEAK_SANITIZER_DISABLED_SCOPE; |
315 DEFINE_STATIC_REF(ComputedStyle, s_initialStyle, | 314 DEFINE_STATIC_REF(ComputedStyle, s_initialStyle, |
316 (ComputedStyle::createInitialStyle())); | 315 (ComputedStyle::createInitialStyle())); |
317 return *s_initialStyle; | 316 return *s_initialStyle; |
318 } | 317 } |
319 | 318 |
320 public: | 319 public: |
321 static PassRefPtr<ComputedStyle> create(); | 320 static PassRefPtr<ComputedStyle> create(); |
322 static PassRefPtr<ComputedStyle> createAnonymousStyleWithDisplay( | 321 static PassRefPtr<ComputedStyle> createAnonymousStyleWithDisplay( |
(...skipping 3481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3804 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - FirstPublicPseudoId); | 3803 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - FirstPublicPseudoId); |
3805 } | 3804 } |
3806 | 3805 |
3807 inline bool ComputedStyle::hasPseudoElementStyle() const { | 3806 inline bool ComputedStyle::hasPseudoElementStyle() const { |
3808 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 3807 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
3809 } | 3808 } |
3810 | 3809 |
3811 } // namespace blink | 3810 } // namespace blink |
3812 | 3811 |
3813 #endif // ComputedStyle_h | 3812 #endif // ComputedStyle_h |
OLD | NEW |