| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 return (m_pointerEvents == other.m_pointerEvents) && | 213 return (m_pointerEvents == other.m_pointerEvents) && |
| 214 (m_whiteSpace == other.m_whiteSpace); | 214 (m_whiteSpace == other.m_whiteSpace); |
| 215 } | 215 } |
| 216 | 216 |
| 217 inline bool compareEqualNonIndependent(const InheritedData& other) const { | 217 inline bool compareEqualNonIndependent(const InheritedData& other) const { |
| 218 return (m_listStyleType == other.m_listStyleType) && | 218 return (m_listStyleType == other.m_listStyleType) && |
| 219 (m_textAlign == other.m_textAlign) && | 219 (m_textAlign == other.m_textAlign) && |
| 220 (m_hasSimpleUnderline == other.m_hasSimpleUnderline) && | 220 (m_hasSimpleUnderline == other.m_hasSimpleUnderline) && |
| 221 (m_cursorStyle == other.m_cursorStyle) && | 221 (m_cursorStyle == other.m_cursorStyle) && |
| 222 (m_direction == other.m_direction) && | 222 (m_direction == other.m_direction) && |
| 223 (m_borderCollapse == other.m_borderCollapse) && | |
| 224 (m_boxDirection == other.m_boxDirection) && | 223 (m_boxDirection == other.m_boxDirection) && |
| 225 (m_rtlOrdering == other.m_rtlOrdering) && | 224 (m_rtlOrdering == other.m_rtlOrdering) && |
| 226 (m_printColorAdjust == other.m_printColorAdjust) && | 225 (m_printColorAdjust == other.m_printColorAdjust) && |
| 227 (m_insideLink == other.m_insideLink) && | 226 (m_insideLink == other.m_insideLink) && |
| 228 (m_writingMode == other.m_writingMode); | 227 (m_writingMode == other.m_writingMode); |
| 229 } | 228 } |
| 230 | 229 |
| 231 unsigned m_listStyleType : 7; // EListStyleType | 230 unsigned m_listStyleType : 7; // EListStyleType |
| 232 unsigned m_textAlign : 4; // ETextAlign | 231 unsigned m_textAlign : 4; // ETextAlign |
| 233 unsigned m_hasSimpleUnderline : 1; // True if 'underline solid' is the only | 232 unsigned m_hasSimpleUnderline : 1; // True if 'underline solid' is the only |
| 234 // text decoration on this element. | 233 // text decoration on this element. |
| 235 unsigned m_cursorStyle : 6; // ECursor | 234 unsigned m_cursorStyle : 6; // ECursor |
| 236 unsigned m_direction : 1; // TextDirection | 235 unsigned m_direction : 1; // TextDirection |
| 237 unsigned m_whiteSpace : 3; // EWhiteSpace | 236 unsigned m_whiteSpace : 3; // EWhiteSpace |
| 238 unsigned m_borderCollapse : 1; // EBorderCollapse | |
| 239 unsigned m_boxDirection : 1; // EBoxDirection (CSS3 box_direction property, | 237 unsigned m_boxDirection : 1; // EBoxDirection (CSS3 box_direction property, |
| 240 // flexible box layout module) | 238 // flexible box layout module) |
| 241 // 32 bits | 239 // 32 bits |
| 242 | 240 |
| 243 // non CSS2 inherited | 241 // non CSS2 inherited |
| 244 unsigned m_rtlOrdering : 1; // EOrder | 242 unsigned m_rtlOrdering : 1; // EOrder |
| 245 unsigned m_printColorAdjust : 1; // PrintColorAdjust | 243 unsigned m_printColorAdjust : 1; // PrintColorAdjust |
| 246 unsigned m_pointerEvents : 4; // EPointerEvents | 244 unsigned m_pointerEvents : 4; // EPointerEvents |
| 247 unsigned m_insideLink : 2; // EInsideLink | 245 unsigned m_insideLink : 2; // EInsideLink |
| 248 | 246 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 356 |
| 359 void setBitDefaults() { | 357 void setBitDefaults() { |
| 360 ComputedStyleBase::setBitDefaults(); | 358 ComputedStyleBase::setBitDefaults(); |
| 361 m_inheritedData.m_listStyleType = | 359 m_inheritedData.m_listStyleType = |
| 362 static_cast<unsigned>(initialListStyleType()); | 360 static_cast<unsigned>(initialListStyleType()); |
| 363 m_inheritedData.m_textAlign = static_cast<unsigned>(initialTextAlign()); | 361 m_inheritedData.m_textAlign = static_cast<unsigned>(initialTextAlign()); |
| 364 m_inheritedData.m_hasSimpleUnderline = false; | 362 m_inheritedData.m_hasSimpleUnderline = false; |
| 365 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor()); | 363 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor()); |
| 366 m_inheritedData.m_direction = initialDirection(); | 364 m_inheritedData.m_direction = initialDirection(); |
| 367 m_inheritedData.m_whiteSpace = static_cast<unsigned>(initialWhiteSpace()); | 365 m_inheritedData.m_whiteSpace = static_cast<unsigned>(initialWhiteSpace()); |
| 368 m_inheritedData.m_borderCollapse = | |
| 369 static_cast<unsigned>(initialBorderCollapse()); | |
| 370 m_inheritedData.m_rtlOrdering = static_cast<unsigned>(initialRTLOrdering()); | 366 m_inheritedData.m_rtlOrdering = static_cast<unsigned>(initialRTLOrdering()); |
| 371 m_inheritedData.m_boxDirection = | 367 m_inheritedData.m_boxDirection = |
| 372 static_cast<unsigned>(initialBoxDirection()); | 368 static_cast<unsigned>(initialBoxDirection()); |
| 373 m_inheritedData.m_printColorAdjust = | 369 m_inheritedData.m_printColorAdjust = |
| 374 static_cast<unsigned>(initialPrintColorAdjust()); | 370 static_cast<unsigned>(initialPrintColorAdjust()); |
| 375 m_inheritedData.m_pointerEvents = | 371 m_inheritedData.m_pointerEvents = |
| 376 static_cast<unsigned>(initialPointerEvents()); | 372 static_cast<unsigned>(initialPointerEvents()); |
| 377 m_inheritedData.m_insideLink = NotInsideLink; | 373 m_inheritedData.m_insideLink = NotInsideLink; |
| 378 m_inheritedData.m_writingMode = initialWritingMode(); | 374 m_inheritedData.m_writingMode = initialWritingMode(); |
| 379 | 375 |
| (...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2045 // -webkit-mask-box-image-width | 2041 // -webkit-mask-box-image-width |
| 2046 const BorderImageLengthBox& maskBoxImageWidth() const { | 2042 const BorderImageLengthBox& maskBoxImageWidth() const { |
| 2047 return m_rareNonInheritedData->m_maskBoxImage.borderSlices(); | 2043 return m_rareNonInheritedData->m_maskBoxImage.borderSlices(); |
| 2048 } | 2044 } |
| 2049 void setMaskBoxImageWidth(const BorderImageLengthBox& slices) { | 2045 void setMaskBoxImageWidth(const BorderImageLengthBox& slices) { |
| 2050 m_rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); | 2046 m_rareNonInheritedData.access()->m_maskBoxImage.setBorderSlices(slices); |
| 2051 } | 2047 } |
| 2052 | 2048 |
| 2053 // Inherited properties. | 2049 // Inherited properties. |
| 2054 | 2050 |
| 2055 // border-collapse | |
| 2056 static EBorderCollapse initialBorderCollapse() { | |
| 2057 return EBorderCollapse::Separate; | |
| 2058 } | |
| 2059 EBorderCollapse borderCollapse() const { | |
| 2060 return static_cast<EBorderCollapse>(m_inheritedData.m_borderCollapse); | |
| 2061 } | |
| 2062 void setBorderCollapse(EBorderCollapse collapse) { | |
| 2063 m_inheritedData.m_borderCollapse = static_cast<unsigned>(collapse); | |
| 2064 } | |
| 2065 | |
| 2066 // Border-spacing properties. | 2051 // Border-spacing properties. |
| 2067 // -webkit-border-horizontal-spacing | 2052 // -webkit-border-horizontal-spacing |
| 2068 static short initialHorizontalBorderSpacing() { return 0; } | 2053 static short initialHorizontalBorderSpacing() { return 0; } |
| 2069 short horizontalBorderSpacing() const; | 2054 short horizontalBorderSpacing() const; |
| 2070 void setHorizontalBorderSpacing(short); | 2055 void setHorizontalBorderSpacing(short); |
| 2071 | 2056 |
| 2072 // -webkit-border-vertical-spacing | 2057 // -webkit-border-vertical-spacing |
| 2073 static short initialVerticalBorderSpacing() { return 0; } | 2058 static short initialVerticalBorderSpacing() { return 0; } |
| 2074 short verticalBorderSpacing() const; | 2059 short verticalBorderSpacing() const; |
| 2075 void setVerticalBorderSpacing(short); | 2060 void setVerticalBorderSpacing(short); |
| (...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4107 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 4092 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
| 4108 } | 4093 } |
| 4109 | 4094 |
| 4110 inline bool ComputedStyle::hasPseudoElementStyle() const { | 4095 inline bool ComputedStyle::hasPseudoElementStyle() const { |
| 4111 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 4096 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 4112 } | 4097 } |
| 4113 | 4098 |
| 4114 } // namespace blink | 4099 } // namespace blink |
| 4115 | 4100 |
| 4116 #endif // ComputedStyle_h | 4101 #endif // ComputedStyle_h |
| OLD | NEW |