| 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 r
ights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 // to the existing flags to take advantage of packing as much as possibl
e. | 324 // to the existing flags to take advantage of packing as much as possibl
e. |
| 325 // TODO(sashab): Move these flags closer to inheritedData so that it's | 325 // TODO(sashab): Move these flags closer to inheritedData so that it's |
| 326 // clear which inherited properties have a flag stored and which don't. | 326 // clear which inherited properties have a flag stored and which don't. |
| 327 // Keep this list of fields in sync with: | 327 // Keep this list of fields in sync with: |
| 328 // - setBitDefaults() | 328 // - setBitDefaults() |
| 329 // - The ComputedStyle setter, which must take an extra boolean paramete
r and set this | 329 // - The ComputedStyle setter, which must take an extra boolean paramete
r and set this |
| 330 // - propagateIndependentInheritedProperties() in ComputedStyle.cpp | 330 // - propagateIndependentInheritedProperties() in ComputedStyle.cpp |
| 331 // - The compareEqual() methods in the corresponding class | 331 // - The compareEqual() methods in the corresponding class |
| 332 // InheritedFlags | 332 // InheritedFlags |
| 333 unsigned m_isPointerEventsInherited : 1; | 333 unsigned m_isPointerEventsInherited : 1; |
| 334 unsigned m_isVisibilityInherited : 1; | |
| 335 | 334 |
| 336 // If you add more style bits here, you will also need to update Compute
dStyle::copyNonInheritedFromCached() | 335 // If you add more style bits here, you will also need to update Compute
dStyle::copyNonInheritedFromCached() |
| 337 // 68 bits | 336 // 68 bits |
| 338 } m_nonInheritedData; | 337 } m_nonInheritedData; |
| 339 | 338 |
| 340 // !END SYNC! | 339 // !END SYNC! |
| 341 | 340 |
| 342 void setBitDefaults() | 341 void setBitDefaults() |
| 343 { | 342 { |
| 344 ComputedStyleBase::setBitDefaults(); | 343 ComputedStyleBase::setBitDefaults(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 m_nonInheritedData.m_hasViewportUnits = false; | 381 m_nonInheritedData.m_hasViewportUnits = false; |
| 383 m_nonInheritedData.m_affectedByFocus = false; | 382 m_nonInheritedData.m_affectedByFocus = false; |
| 384 m_nonInheritedData.m_affectedByHover = false; | 383 m_nonInheritedData.m_affectedByHover = false; |
| 385 m_nonInheritedData.m_affectedByActive = false; | 384 m_nonInheritedData.m_affectedByActive = false; |
| 386 m_nonInheritedData.m_affectedByDrag = false; | 385 m_nonInheritedData.m_affectedByDrag = false; |
| 387 m_nonInheritedData.m_isLink = false; | 386 m_nonInheritedData.m_isLink = false; |
| 388 m_nonInheritedData.m_hasRemUnits = false; | 387 m_nonInheritedData.m_hasRemUnits = false; |
| 389 | 388 |
| 390 // All independently inherited properties default to being inherited. | 389 // All independently inherited properties default to being inherited. |
| 391 m_nonInheritedData.m_isPointerEventsInherited = true; | 390 m_nonInheritedData.m_isPointerEventsInherited = true; |
| 392 m_nonInheritedData.m_isVisibilityInherited = true; | |
| 393 } | 391 } |
| 394 | 392 |
| 395 private: | 393 private: |
| 396 // TODO(sashab): Move these to the bottom of ComputedStyle. | 394 // TODO(sashab): Move these to the bottom of ComputedStyle. |
| 397 ALWAYS_INLINE ComputedStyle(); | 395 ALWAYS_INLINE ComputedStyle(); |
| 398 | 396 |
| 399 enum InitialStyleTag { | 397 enum InitialStyleTag { |
| 400 InitialStyle | 398 InitialStyle |
| 401 }; | 399 }; |
| 402 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag); | 400 ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag); |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1254 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(m_nonInh
eritedData.m_unicodeBidi); } | 1252 EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(m_nonInh
eritedData.m_unicodeBidi); } |
| 1255 void setUnicodeBidi(EUnicodeBidi b) { m_nonInheritedData.m_unicodeBidi = b;
} | 1253 void setUnicodeBidi(EUnicodeBidi b) { m_nonInheritedData.m_unicodeBidi = b;
} |
| 1256 | 1254 |
| 1257 // vertical-align | 1255 // vertical-align |
| 1258 static EVerticalAlign initialVerticalAlign() { return VerticalAlignBaseline;
} | 1256 static EVerticalAlign initialVerticalAlign() { return VerticalAlignBaseline;
} |
| 1259 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(m_
nonInheritedData.m_verticalAlign); } | 1257 EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(m_
nonInheritedData.m_verticalAlign); } |
| 1260 const Length& getVerticalAlignLength() const { return m_box->verticalAlign()
; } | 1258 const Length& getVerticalAlignLength() const { return m_box->verticalAlign()
; } |
| 1261 void setVerticalAlign(EVerticalAlign v) { m_nonInheritedData.m_verticalAlign
= v; } | 1259 void setVerticalAlign(EVerticalAlign v) { m_nonInheritedData.m_verticalAlign
= v; } |
| 1262 void setVerticalAlignLength(const Length& length) { setVerticalAlign(Vertica
lAlignLength); SET_VAR(m_box, m_verticalAlign, length); } | 1260 void setVerticalAlignLength(const Length& length) { setVerticalAlign(Vertica
lAlignLength); SET_VAR(m_box, m_verticalAlign, length); } |
| 1263 | 1261 |
| 1264 // visibility | |
| 1265 // TODO(sashab): Move this to ComputedStyleBase. | |
| 1266 void setVisibilityIsInherited(bool isInherited) { m_nonInheritedData.m_isVis
ibilityInherited = isInherited; } | |
| 1267 | |
| 1268 // will-change | 1262 // will-change |
| 1269 const Vector<CSSPropertyID>& willChangeProperties() const { return m_rareNon
InheritedData->m_willChange->m_properties; } | 1263 const Vector<CSSPropertyID>& willChangeProperties() const { return m_rareNon
InheritedData->m_willChange->m_properties; } |
| 1270 bool willChangeContents() const { return m_rareNonInheritedData->m_willChang
e->m_contents; } | 1264 bool willChangeContents() const { return m_rareNonInheritedData->m_willChang
e->m_contents; } |
| 1271 bool willChangeScrollPosition() const { return m_rareNonInheritedData->m_wil
lChange->m_scrollPosition; } | 1265 bool willChangeScrollPosition() const { return m_rareNonInheritedData->m_wil
lChange->m_scrollPosition; } |
| 1272 bool subtreeWillChangeContents() const { return m_rareInheritedData->m_subtr
eeWillChangeContents; } | 1266 bool subtreeWillChangeContents() const { return m_rareInheritedData->m_subtr
eeWillChangeContents; } |
| 1273 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_
NESTED_VAR(m_rareNonInheritedData, m_willChange, m_properties, properties); } | 1267 void setWillChangeProperties(const Vector<CSSPropertyID>& properties) { SET_
NESTED_VAR(m_rareNonInheritedData, m_willChange, m_properties, properties); } |
| 1274 void setWillChangeContents(bool b) { SET_NESTED_VAR(m_rareNonInheritedData,
m_willChange, m_contents, b); } | 1268 void setWillChangeContents(bool b) { SET_NESTED_VAR(m_rareNonInheritedData,
m_willChange, m_contents, b); } |
| 1275 void setWillChangeScrollPosition(bool b) { SET_NESTED_VAR(m_rareNonInherited
Data, m_willChange, m_scrollPosition, b); } | 1269 void setWillChangeScrollPosition(bool b) { SET_NESTED_VAR(m_rareNonInherited
Data, m_willChange, m_scrollPosition, b); } |
| 1276 void setSubtreeWillChangeContents(bool b) { SET_VAR(m_rareInheritedData, m_s
ubtreeWillChangeContents, b); } | 1270 void setSubtreeWillChangeContents(bool b) { SET_VAR(m_rareInheritedData, m_s
ubtreeWillChangeContents, b); } |
| 1277 | 1271 |
| (...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2619 } | 2613 } |
| 2620 | 2614 |
| 2621 inline bool ComputedStyle::hasPseudoElementStyle() const | 2615 inline bool ComputedStyle::hasPseudoElementStyle() const |
| 2622 { | 2616 { |
| 2623 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 2617 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 2624 } | 2618 } |
| 2625 | 2619 |
| 2626 } // namespace blink | 2620 } // namespace blink |
| 2627 | 2621 |
| 2628 #endif // ComputedStyle_h | 2622 #endif // ComputedStyle_h |
| OLD | NEW |