| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 268 unsigned m_explicitInheritance : 1; // Explicitly inherits a non-inherited |
| 269 // property | 269 // property |
| 270 unsigned m_variableReference : 1; // A non-inherited property references a | 270 unsigned m_variableReference : 1; // A non-inherited property references a |
| 271 // variable or @apply is used. | 271 // variable or @apply is used. |
| 272 unsigned m_unique : 1; // Style can not be shared. | 272 unsigned m_unique : 1; // Style can not be shared. |
| 273 | 273 |
| 274 unsigned m_emptyState : 1; | 274 unsigned m_emptyState : 1; |
| 275 | 275 |
| 276 unsigned m_affectedByFocus : 1; | |
| 277 unsigned m_affectedByHover : 1; | |
| 278 unsigned m_affectedByActive : 1; | |
| 279 unsigned m_affectedByDrag : 1; | |
| 280 | |
| 281 // 64 bits | 276 // 64 bits |
| 282 | 277 |
| 283 unsigned m_isLink : 1; | 278 unsigned m_isLink : 1; |
| 284 | 279 |
| 285 mutable unsigned m_hasRemUnits : 1; | 280 mutable unsigned m_hasRemUnits : 1; |
| 286 | 281 |
| 287 // If you add more style bits here, you will also need to update | 282 // If you add more style bits here, you will also need to update |
| 288 // ComputedStyle::copyNonInheritedFromCached() 68 bits | 283 // ComputedStyle::copyNonInheritedFromCached() 68 bits |
| 289 } m_nonInheritedData; | 284 } m_nonInheritedData; |
| 290 | 285 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 303 static_cast<unsigned>(initialDisplay()); | 298 static_cast<unsigned>(initialDisplay()); |
| 304 m_nonInheritedData.m_verticalAlign = | 299 m_nonInheritedData.m_verticalAlign = |
| 305 static_cast<unsigned>(initialVerticalAlign()); | 300 static_cast<unsigned>(initialVerticalAlign()); |
| 306 m_nonInheritedData.m_styleType = PseudoIdNone; | 301 m_nonInheritedData.m_styleType = PseudoIdNone; |
| 307 m_nonInheritedData.m_pseudoBits = 0; | 302 m_nonInheritedData.m_pseudoBits = 0; |
| 308 m_nonInheritedData.m_explicitInheritance = false; | 303 m_nonInheritedData.m_explicitInheritance = false; |
| 309 m_nonInheritedData.m_variableReference = false; | 304 m_nonInheritedData.m_variableReference = false; |
| 310 m_nonInheritedData.m_unique = false; | 305 m_nonInheritedData.m_unique = false; |
| 311 m_nonInheritedData.m_emptyState = false; | 306 m_nonInheritedData.m_emptyState = false; |
| 312 m_nonInheritedData.m_hasViewportUnits = false; | 307 m_nonInheritedData.m_hasViewportUnits = false; |
| 313 m_nonInheritedData.m_affectedByFocus = false; | |
| 314 m_nonInheritedData.m_affectedByHover = false; | |
| 315 m_nonInheritedData.m_affectedByActive = false; | |
| 316 m_nonInheritedData.m_affectedByDrag = false; | |
| 317 m_nonInheritedData.m_isLink = false; | 308 m_nonInheritedData.m_isLink = false; |
| 318 m_nonInheritedData.m_hasRemUnits = false; | 309 m_nonInheritedData.m_hasRemUnits = false; |
| 319 } | 310 } |
| 320 | 311 |
| 321 private: | 312 private: |
| 322 // TODO(sashab): Move these to the bottom of ComputedStyle. | 313 // TODO(sashab): Move these to the bottom of ComputedStyle. |
| 323 ALWAYS_INLINE ComputedStyle(); | 314 ALWAYS_INLINE ComputedStyle(); |
| 324 | 315 |
| 325 enum InitialStyleTag { InitialStyle }; | 316 enum InitialStyleTag { InitialStyle }; |
| 326 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag); | 317 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag); |
| (...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2450 bool hasViewportUnits() const { | 2441 bool hasViewportUnits() const { |
| 2451 return m_nonInheritedData.m_hasViewportUnits; | 2442 return m_nonInheritedData.m_hasViewportUnits; |
| 2452 } | 2443 } |
| 2453 void setHasViewportUnits(bool hasViewportUnits = true) const { | 2444 void setHasViewportUnits(bool hasViewportUnits = true) const { |
| 2454 m_nonInheritedData.m_hasViewportUnits = hasViewportUnits; | 2445 m_nonInheritedData.m_hasViewportUnits = hasViewportUnits; |
| 2455 } | 2446 } |
| 2456 | 2447 |
| 2457 bool hasRemUnits() const { return m_nonInheritedData.m_hasRemUnits; } | 2448 bool hasRemUnits() const { return m_nonInheritedData.m_hasRemUnits; } |
| 2458 void setHasRemUnits() const { m_nonInheritedData.m_hasRemUnits = true; } | 2449 void setHasRemUnits() const { m_nonInheritedData.m_hasRemUnits = true; } |
| 2459 | 2450 |
| 2460 bool affectedByFocus() const { return m_nonInheritedData.m_affectedByFocus; } | |
| 2461 void setAffectedByFocus() { m_nonInheritedData.m_affectedByFocus = true; } | |
| 2462 | |
| 2463 bool affectedByHover() const { return m_nonInheritedData.m_affectedByHover; } | |
| 2464 void setAffectedByHover() { m_nonInheritedData.m_affectedByHover = true; } | |
| 2465 | |
| 2466 bool affectedByActive() const { | |
| 2467 return m_nonInheritedData.m_affectedByActive; | |
| 2468 } | |
| 2469 void setAffectedByActive() { m_nonInheritedData.m_affectedByActive = true; } | |
| 2470 | |
| 2471 bool affectedByDrag() const { return m_nonInheritedData.m_affectedByDrag; } | |
| 2472 void setAffectedByDrag() { m_nonInheritedData.m_affectedByDrag = true; } | |
| 2473 | |
| 2474 bool emptyState() const { return m_nonInheritedData.m_emptyState; } | 2451 bool emptyState() const { return m_nonInheritedData.m_emptyState; } |
| 2475 void setEmptyState(bool b) { | 2452 void setEmptyState(bool b) { |
| 2476 setUnique(); | 2453 setUnique(); |
| 2477 m_nonInheritedData.m_emptyState = b; | 2454 m_nonInheritedData.m_emptyState = b; |
| 2478 } | 2455 } |
| 2479 | 2456 |
| 2480 bool hasInlineTransform() const { | 2457 bool hasInlineTransform() const { |
| 2481 return m_rareNonInheritedData->m_hasInlineTransform; | 2458 return m_rareNonInheritedData->m_hasInlineTransform; |
| 2482 } | 2459 } |
| 2483 void setHasInlineTransform(bool b) { | 2460 void setHasInlineTransform(bool b) { |
| (...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3847 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 3824 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
| 3848 } | 3825 } |
| 3849 | 3826 |
| 3850 inline bool ComputedStyle::hasPseudoElementStyle() const { | 3827 inline bool ComputedStyle::hasPseudoElementStyle() const { |
| 3851 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 3828 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 3852 } | 3829 } |
| 3853 | 3830 |
| 3854 } // namespace blink | 3831 } // namespace blink |
| 3855 | 3832 |
| 3856 #endif // ComputedStyle_h | 3833 #endif // ComputedStyle_h |
| OLD | NEW |