| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 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 | |
| 271 // variable or @apply is used. | |
| 272 | 270 |
| 273 unsigned m_emptyState : 1; | 271 unsigned m_emptyState : 1; |
| 274 | 272 |
| 275 // 64 bits | 273 // 64 bits |
| 276 | 274 |
| 277 unsigned m_isLink : 1; | 275 unsigned m_isLink : 1; |
| 278 | 276 |
| 279 mutable unsigned m_hasRemUnits : 1; | 277 mutable unsigned m_hasRemUnits : 1; |
| 280 | 278 |
| 281 // If you add more style bits here, you will also need to update | 279 // If you add more style bits here, you will also need to update |
| (...skipping 11 matching lines...) Expand all Loading... |
| 293 static_cast<unsigned>(EInsideLink::kNotInsideLink); | 291 static_cast<unsigned>(EInsideLink::kNotInsideLink); |
| 294 | 292 |
| 295 m_nonInheritedData.m_effectiveDisplay = | 293 m_nonInheritedData.m_effectiveDisplay = |
| 296 m_nonInheritedData.m_originalDisplay = | 294 m_nonInheritedData.m_originalDisplay = |
| 297 static_cast<unsigned>(initialDisplay()); | 295 static_cast<unsigned>(initialDisplay()); |
| 298 m_nonInheritedData.m_verticalAlign = | 296 m_nonInheritedData.m_verticalAlign = |
| 299 static_cast<unsigned>(initialVerticalAlign()); | 297 static_cast<unsigned>(initialVerticalAlign()); |
| 300 m_nonInheritedData.m_styleType = PseudoIdNone; | 298 m_nonInheritedData.m_styleType = PseudoIdNone; |
| 301 m_nonInheritedData.m_pseudoBits = 0; | 299 m_nonInheritedData.m_pseudoBits = 0; |
| 302 m_nonInheritedData.m_explicitInheritance = false; | 300 m_nonInheritedData.m_explicitInheritance = false; |
| 303 m_nonInheritedData.m_variableReference = false; | |
| 304 m_nonInheritedData.m_emptyState = false; | 301 m_nonInheritedData.m_emptyState = false; |
| 305 m_nonInheritedData.m_hasViewportUnits = false; | 302 m_nonInheritedData.m_hasViewportUnits = false; |
| 306 m_nonInheritedData.m_isLink = false; | 303 m_nonInheritedData.m_isLink = false; |
| 307 m_nonInheritedData.m_hasRemUnits = false; | 304 m_nonInheritedData.m_hasRemUnits = false; |
| 308 } | 305 } |
| 309 | 306 |
| 310 private: | 307 private: |
| 311 // TODO(sashab): Move these to the bottom of ComputedStyle. | 308 // TODO(sashab): Move these to the bottom of ComputedStyle. |
| 312 ALWAYS_INLINE ComputedStyle(); | 309 ALWAYS_INLINE ComputedStyle(); |
| 313 | 310 |
| (...skipping 2089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2403 | 2400 |
| 2404 // Handles both inherited and non-inherited variables | 2401 // Handles both inherited and non-inherited variables |
| 2405 CSSVariableData* getVariable(const AtomicString&) const; | 2402 CSSVariableData* getVariable(const AtomicString&) const; |
| 2406 | 2403 |
| 2407 CSSVariableData* getVariable(const AtomicString&, | 2404 CSSVariableData* getVariable(const AtomicString&, |
| 2408 bool isInheritedProperty) const; | 2405 bool isInheritedProperty) const; |
| 2409 | 2406 |
| 2410 const CSSValue* getRegisteredVariable(const AtomicString&, | 2407 const CSSValue* getRegisteredVariable(const AtomicString&, |
| 2411 bool isInheritedProperty) const; | 2408 bool isInheritedProperty) const; |
| 2412 | 2409 |
| 2413 void setHasVariableReferenceFromNonInheritedProperty() { | |
| 2414 m_nonInheritedData.m_variableReference = true; | |
| 2415 } | |
| 2416 bool hasVariableReferenceFromNonInheritedProperty() const { | |
| 2417 return m_nonInheritedData.m_variableReference; | |
| 2418 } | |
| 2419 | |
| 2420 // Animations. | 2410 // Animations. |
| 2421 CSSAnimationData& accessAnimations(); | 2411 CSSAnimationData& accessAnimations(); |
| 2422 const CSSAnimationData* animations() const { | 2412 const CSSAnimationData* animations() const { |
| 2423 return m_rareNonInheritedData->m_animations.get(); | 2413 return m_rareNonInheritedData->m_animations.get(); |
| 2424 } | 2414 } |
| 2425 | 2415 |
| 2426 // Transitions. | 2416 // Transitions. |
| 2427 const CSSTransitionData* transitions() const { | 2417 const CSSTransitionData* transitions() const { |
| 2428 return m_rareNonInheritedData->m_transitions.get(); | 2418 return m_rareNonInheritedData->m_transitions.get(); |
| 2429 } | 2419 } |
| (...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3824 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 3814 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
| 3825 } | 3815 } |
| 3826 | 3816 |
| 3827 inline bool ComputedStyle::hasPseudoElementStyle() const { | 3817 inline bool ComputedStyle::hasPseudoElementStyle() const { |
| 3828 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 3818 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 3829 } | 3819 } |
| 3830 | 3820 |
| 3831 } // namespace blink | 3821 } // namespace blink |
| 3832 | 3822 |
| 3833 #endif // ComputedStyle_h | 3823 #endif // ComputedStyle_h |
| OLD | NEW |