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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // affectedByActive | 224 // affectedByActive |
225 // affectedByDrag | 225 // affectedByDrag |
226 // isLink | 226 // isLink |
227 // isInherited flags | 227 // isInherited flags |
228 } | 228 } |
229 | 229 |
230 bool operator!=(const NonInheritedData& other) const { | 230 bool operator!=(const NonInheritedData& other) const { |
231 return !(*this == other); | 231 return !(*this == other); |
232 } | 232 } |
233 | 233 |
234 // This is set if we used viewport units when resolving a length. | 234 // These are set if we used viewport or rem units when resolving a length. |
235 // It is mutable so we can pass around const ComputedStyles to resolve | 235 unsigned m_hasViewportUnits : 1; |
236 // lengths. | 236 unsigned m_hasRemUnits : 1; |
237 mutable unsigned m_hasViewportUnits : 1; | |
238 | |
239 mutable unsigned m_hasRemUnits : 1; | |
240 | 237 |
241 // If you add more style bits here, you will also need to update | 238 // If you add more style bits here, you will also need to update |
242 // ComputedStyle::copyNonInheritedFromCached() 68 bits | 239 // ComputedStyle::copyNonInheritedFromCached() 68 bits |
243 } m_nonInheritedData; | 240 } m_nonInheritedData; |
244 | 241 |
245 // !END SYNC! | 242 // !END SYNC! |
246 | 243 |
247 private: | 244 private: |
248 // TODO(sashab): Move these private members to the bottom of ComputedStyle. | 245 // TODO(sashab): Move these private members to the bottom of ComputedStyle. |
249 ALWAYS_INLINE ComputedStyle(); | 246 ALWAYS_INLINE ComputedStyle(); |
(...skipping 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2341 // Callback selectors. | 2338 // Callback selectors. |
2342 const Vector<String>& callbackSelectors() const { | 2339 const Vector<String>& callbackSelectors() const { |
2343 return m_rareNonInheritedData->m_callbackSelectors; | 2340 return m_rareNonInheritedData->m_callbackSelectors; |
2344 } | 2341 } |
2345 void addCallbackSelector(const String& selector); | 2342 void addCallbackSelector(const String& selector); |
2346 | 2343 |
2347 // Non-property flags. | 2344 // Non-property flags. |
2348 bool hasViewportUnits() const { | 2345 bool hasViewportUnits() const { |
2349 return m_nonInheritedData.m_hasViewportUnits; | 2346 return m_nonInheritedData.m_hasViewportUnits; |
2350 } | 2347 } |
2351 void setHasViewportUnits(bool hasViewportUnits = true) const { | 2348 void setHasViewportUnits(bool hasViewportUnits = true) { |
2352 m_nonInheritedData.m_hasViewportUnits = hasViewportUnits; | 2349 m_nonInheritedData.m_hasViewportUnits = hasViewportUnits; |
2353 } | 2350 } |
2354 | 2351 |
2355 bool hasRemUnits() const { return m_nonInheritedData.m_hasRemUnits; } | 2352 bool hasRemUnits() const { return m_nonInheritedData.m_hasRemUnits; } |
2356 void setHasRemUnits() const { m_nonInheritedData.m_hasRemUnits = true; } | 2353 void setHasRemUnits() { m_nonInheritedData.m_hasRemUnits = true; } |
2357 | 2354 |
2358 bool emptyState() const { return m_emptyState; } | 2355 bool emptyState() const { return m_emptyState; } |
2359 void setEmptyState(bool b) { | 2356 void setEmptyState(bool b) { |
2360 setUnique(); | 2357 setUnique(); |
2361 m_emptyState = b; | 2358 m_emptyState = b; |
2362 } | 2359 } |
2363 | 2360 |
2364 bool hasInlineTransform() const { | 2361 bool hasInlineTransform() const { |
2365 return m_rareNonInheritedData->m_hasInlineTransform; | 2362 return m_rareNonInheritedData->m_hasInlineTransform; |
2366 } | 2363 } |
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3742 m_pseudoBits |= 1 << (pseudo - FirstPublicPseudoId); | 3739 m_pseudoBits |= 1 << (pseudo - FirstPublicPseudoId); |
3743 } | 3740 } |
3744 | 3741 |
3745 inline bool ComputedStyle::hasPseudoElementStyle() const { | 3742 inline bool ComputedStyle::hasPseudoElementStyle() const { |
3746 return m_pseudoBits & ElementPseudoIdMask; | 3743 return m_pseudoBits & ElementPseudoIdMask; |
3747 } | 3744 } |
3748 | 3745 |
3749 } // namespace blink | 3746 } // namespace blink |
3750 | 3747 |
3751 #endif // ComputedStyle_h | 3748 #endif // ComputedStyle_h |
OLD | NEW |