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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 | 356 |
357 // If you add more style bits here, you will also need to update | 357 // If you add more style bits here, you will also need to update |
358 // ComputedStyle::copyNonInheritedFromCached() 68 bits | 358 // ComputedStyle::copyNonInheritedFromCached() 68 bits |
359 } m_nonInheritedData; | 359 } m_nonInheritedData; |
360 | 360 |
361 // !END SYNC! | 361 // !END SYNC! |
362 | 362 |
363 void setBitDefaults() { | 363 void setBitDefaults() { |
364 ComputedStyleBase::setBitDefaults(); | 364 ComputedStyleBase::setBitDefaults(); |
365 m_inheritedData.m_captionSide = static_cast<unsigned>(initialCaptionSide()); | 365 m_inheritedData.m_captionSide = static_cast<unsigned>(initialCaptionSide()); |
366 m_inheritedData.m_listStyleType = initialListStyleType(); | 366 m_inheritedData.m_listStyleType = |
| 367 static_cast<unsigned>(initialListStyleType()); |
367 m_inheritedData.m_listStylePosition = | 368 m_inheritedData.m_listStylePosition = |
368 static_cast<unsigned>(initialListStylePosition()); | 369 static_cast<unsigned>(initialListStylePosition()); |
369 m_inheritedData.m_textAlign = initialTextAlign(); | 370 m_inheritedData.m_textAlign = initialTextAlign(); |
370 m_inheritedData.m_textTransform = initialTextTransform(); | 371 m_inheritedData.m_textTransform = initialTextTransform(); |
371 m_inheritedData.m_textUnderline = false; | 372 m_inheritedData.m_textUnderline = false; |
372 m_inheritedData.m_cursorStyle = initialCursor(); | 373 m_inheritedData.m_cursorStyle = initialCursor(); |
373 m_inheritedData.m_direction = initialDirection(); | 374 m_inheritedData.m_direction = initialDirection(); |
374 m_inheritedData.m_whiteSpace = initialWhiteSpace(); | 375 m_inheritedData.m_whiteSpace = initialWhiteSpace(); |
375 m_inheritedData.m_borderCollapse = initialBorderCollapse(); | 376 m_inheritedData.m_borderCollapse = initialBorderCollapse(); |
376 m_inheritedData.m_rtlOrdering = initialRTLOrdering(); | 377 m_inheritedData.m_rtlOrdering = initialRTLOrdering(); |
(...skipping 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2119 SET_VAR(m_rareInheritedData, hyphenationString, h); | 2120 SET_VAR(m_rareInheritedData, hyphenationString, h); |
2120 } | 2121 } |
2121 | 2122 |
2122 // line-height | 2123 // line-height |
2123 static Length initialLineHeight() { return Length(-100.0, Percent); } | 2124 static Length initialLineHeight() { return Length(-100.0, Percent); } |
2124 Length lineHeight() const; | 2125 Length lineHeight() const; |
2125 void setLineHeight(const Length& specifiedLineHeight); | 2126 void setLineHeight(const Length& specifiedLineHeight); |
2126 | 2127 |
2127 // List style properties. | 2128 // List style properties. |
2128 // list-style-type | 2129 // list-style-type |
2129 static EListStyleType initialListStyleType() { return Disc; } | 2130 static EListStyleType initialListStyleType() { return EListStyleType::Disc; } |
2130 EListStyleType listStyleType() const { | 2131 EListStyleType listStyleType() const { |
2131 return static_cast<EListStyleType>(m_inheritedData.m_listStyleType); | 2132 return static_cast<EListStyleType>(m_inheritedData.m_listStyleType); |
2132 } | 2133 } |
2133 void setListStyleType(EListStyleType v) { | 2134 void setListStyleType(EListStyleType v) { |
2134 m_inheritedData.m_listStyleType = v; | 2135 m_inheritedData.m_listStyleType = static_cast<unsigned>(v); |
2135 } | 2136 } |
2136 | 2137 |
2137 // list-style-position | 2138 // list-style-position |
2138 static EListStylePosition initialListStylePosition() { | 2139 static EListStylePosition initialListStylePosition() { |
2139 return EListStylePosition::Outside; | 2140 return EListStylePosition::Outside; |
2140 } | 2141 } |
2141 EListStylePosition listStylePosition() const { | 2142 EListStylePosition listStylePosition() const { |
2142 return static_cast<EListStylePosition>(m_inheritedData.m_listStylePosition); | 2143 return static_cast<EListStylePosition>(m_inheritedData.m_listStylePosition); |
2143 } | 2144 } |
2144 void setListStylePosition(EListStylePosition v) { | 2145 void setListStylePosition(EListStylePosition v) { |
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4103 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 4104 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
4104 } | 4105 } |
4105 | 4106 |
4106 inline bool ComputedStyle::hasPseudoElementStyle() const { | 4107 inline bool ComputedStyle::hasPseudoElementStyle() const { |
4107 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 4108 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
4108 } | 4109 } |
4109 | 4110 |
4110 } // namespace blink | 4111 } // namespace blink |
4111 | 4112 |
4112 #endif // ComputedStyle_h | 4113 #endif // ComputedStyle_h |
OLD | NEW |