| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 258 |
| 259 // This is set if we used viewport units when resolving a length. | 259 // This is set if we used viewport units when resolving a length. |
| 260 // It is mutable so we can pass around const ComputedStyles to resolve | 260 // It is mutable so we can pass around const ComputedStyles to resolve |
| 261 // lengths. | 261 // lengths. |
| 262 mutable unsigned m_hasViewportUnits : 1; | 262 mutable unsigned m_hasViewportUnits : 1; |
| 263 | 263 |
| 264 // 32 bits | 264 // 32 bits |
| 265 | 265 |
| 266 unsigned m_styleType : 6; // PseudoId | 266 unsigned m_styleType : 6; // PseudoId |
| 267 unsigned m_pseudoBits : 8; | 267 unsigned m_pseudoBits : 8; |
| 268 unsigned m_explicitInheritance : 1; // Explicitly inherits a non-inherited | |
| 269 // property | |
| 270 | 268 |
| 271 unsigned m_emptyState : 1; | 269 unsigned m_emptyState : 1; |
| 272 | 270 |
| 273 // 64 bits | 271 // 64 bits |
| 274 | 272 |
| 275 unsigned m_isLink : 1; | 273 unsigned m_isLink : 1; |
| 276 | 274 |
| 277 mutable unsigned m_hasRemUnits : 1; | 275 mutable unsigned m_hasRemUnits : 1; |
| 278 | 276 |
| 279 // If you add more style bits here, you will also need to update | 277 // If you add more style bits here, you will also need to update |
| (...skipping 10 matching lines...) Expand all Loading... |
| 290 m_inheritedData.m_insideLink = | 288 m_inheritedData.m_insideLink = |
| 291 static_cast<unsigned>(EInsideLink::kNotInsideLink); | 289 static_cast<unsigned>(EInsideLink::kNotInsideLink); |
| 292 | 290 |
| 293 m_nonInheritedData.m_effectiveDisplay = | 291 m_nonInheritedData.m_effectiveDisplay = |
| 294 m_nonInheritedData.m_originalDisplay = | 292 m_nonInheritedData.m_originalDisplay = |
| 295 static_cast<unsigned>(initialDisplay()); | 293 static_cast<unsigned>(initialDisplay()); |
| 296 m_nonInheritedData.m_verticalAlign = | 294 m_nonInheritedData.m_verticalAlign = |
| 297 static_cast<unsigned>(initialVerticalAlign()); | 295 static_cast<unsigned>(initialVerticalAlign()); |
| 298 m_nonInheritedData.m_styleType = PseudoIdNone; | 296 m_nonInheritedData.m_styleType = PseudoIdNone; |
| 299 m_nonInheritedData.m_pseudoBits = 0; | 297 m_nonInheritedData.m_pseudoBits = 0; |
| 300 m_nonInheritedData.m_explicitInheritance = false; | |
| 301 m_nonInheritedData.m_emptyState = false; | 298 m_nonInheritedData.m_emptyState = false; |
| 302 m_nonInheritedData.m_hasViewportUnits = false; | 299 m_nonInheritedData.m_hasViewportUnits = false; |
| 303 m_nonInheritedData.m_isLink = false; | 300 m_nonInheritedData.m_isLink = false; |
| 304 m_nonInheritedData.m_hasRemUnits = false; | 301 m_nonInheritedData.m_hasRemUnits = false; |
| 305 } | 302 } |
| 306 | 303 |
| 307 private: | 304 private: |
| 308 // TODO(sashab): Move these to the bottom of ComputedStyle. | 305 // TODO(sashab): Move these to the bottom of ComputedStyle. |
| 309 ALWAYS_INLINE ComputedStyle(); | 306 ALWAYS_INLINE ComputedStyle(); |
| 310 | 307 |
| (...skipping 2148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2459 bool isLink() const { return m_nonInheritedData.m_isLink; } | 2456 bool isLink() const { return m_nonInheritedData.m_isLink; } |
| 2460 void setIsLink() { m_nonInheritedData.m_isLink = true; } | 2457 void setIsLink() { m_nonInheritedData.m_isLink = true; } |
| 2461 | 2458 |
| 2462 EInsideLink insideLink() const { | 2459 EInsideLink insideLink() const { |
| 2463 return static_cast<EInsideLink>(m_inheritedData.m_insideLink); | 2460 return static_cast<EInsideLink>(m_inheritedData.m_insideLink); |
| 2464 } | 2461 } |
| 2465 void setInsideLink(EInsideLink insideLink) { | 2462 void setInsideLink(EInsideLink insideLink) { |
| 2466 m_inheritedData.m_insideLink = static_cast<unsigned>(insideLink); | 2463 m_inheritedData.m_insideLink = static_cast<unsigned>(insideLink); |
| 2467 } | 2464 } |
| 2468 | 2465 |
| 2469 bool hasExplicitlyInheritedProperties() const { | |
| 2470 return m_nonInheritedData.m_explicitInheritance; | |
| 2471 } | |
| 2472 void setHasExplicitlyInheritedProperties() { | |
| 2473 m_nonInheritedData.m_explicitInheritance = true; | |
| 2474 } | |
| 2475 | |
| 2476 bool requiresAcceleratedCompositingForExternalReasons(bool b) { | 2466 bool requiresAcceleratedCompositingForExternalReasons(bool b) { |
| 2477 return m_rareNonInheritedData | 2467 return m_rareNonInheritedData |
| 2478 ->m_requiresAcceleratedCompositingForExternalReasons; | 2468 ->m_requiresAcceleratedCompositingForExternalReasons; |
| 2479 } | 2469 } |
| 2480 void setRequiresAcceleratedCompositingForExternalReasons(bool b) { | 2470 void setRequiresAcceleratedCompositingForExternalReasons(bool b) { |
| 2481 SET_VAR(m_rareNonInheritedData, | 2471 SET_VAR(m_rareNonInheritedData, |
| 2482 m_requiresAcceleratedCompositingForExternalReasons, b); | 2472 m_requiresAcceleratedCompositingForExternalReasons, b); |
| 2483 } | 2473 } |
| 2484 | 2474 |
| 2485 bool hasAuthorBackground() const { | 2475 bool hasAuthorBackground() const { |
| (...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3815 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 3805 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
| 3816 } | 3806 } |
| 3817 | 3807 |
| 3818 inline bool ComputedStyle::hasPseudoElementStyle() const { | 3808 inline bool ComputedStyle::hasPseudoElementStyle() const { |
| 3819 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 3809 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 3820 } | 3810 } |
| 3821 | 3811 |
| 3822 } // namespace blink | 3812 } // namespace blink |
| 3823 | 3813 |
| 3824 #endif // ComputedStyle_h | 3814 #endif // ComputedStyle_h |
| OLD | NEW |