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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 } m_nonInheritedData; | 310 } m_nonInheritedData; |
311 | 311 |
312 // !END SYNC! | 312 // !END SYNC! |
313 | 313 |
314 void setBitDefaults() { | 314 void setBitDefaults() { |
315 ComputedStyleBase::setBitDefaults(); | 315 ComputedStyleBase::setBitDefaults(); |
316 m_inheritedData.m_listStyleType = | 316 m_inheritedData.m_listStyleType = |
317 static_cast<unsigned>(initialListStyleType()); | 317 static_cast<unsigned>(initialListStyleType()); |
318 m_inheritedData.m_hasSimpleUnderline = false; | 318 m_inheritedData.m_hasSimpleUnderline = false; |
319 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor()); | 319 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor()); |
320 m_inheritedData.m_direction = initialDirection(); | 320 m_inheritedData.m_direction = static_cast<unsigned>(initialDirection()); |
321 m_inheritedData.m_rtlOrdering = static_cast<unsigned>(initialRTLOrdering()); | 321 m_inheritedData.m_rtlOrdering = static_cast<unsigned>(initialRTLOrdering()); |
322 m_inheritedData.m_insideLink = NotInsideLink; | 322 m_inheritedData.m_insideLink = NotInsideLink; |
323 m_inheritedData.m_writingMode = initialWritingMode(); | 323 m_inheritedData.m_writingMode = initialWritingMode(); |
324 | 324 |
325 m_nonInheritedData.m_effectiveDisplay = | 325 m_nonInheritedData.m_effectiveDisplay = |
326 m_nonInheritedData.m_originalDisplay = | 326 m_nonInheritedData.m_originalDisplay = |
327 static_cast<unsigned>(initialDisplay()); | 327 static_cast<unsigned>(initialDisplay()); |
328 m_nonInheritedData.m_overflowAnchor = | 328 m_nonInheritedData.m_overflowAnchor = |
329 static_cast<unsigned>(initialOverflowAnchor()); | 329 static_cast<unsigned>(initialOverflowAnchor()); |
330 m_nonInheritedData.m_overflowX = static_cast<unsigned>(initialOverflowX()); | 330 m_nonInheritedData.m_overflowX = static_cast<unsigned>(initialOverflowX()); |
(...skipping 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2016 // cursor | 2016 // cursor |
2017 static ECursor initialCursor() { return ECursor::Auto; } | 2017 static ECursor initialCursor() { return ECursor::Auto; } |
2018 ECursor cursor() const { | 2018 ECursor cursor() const { |
2019 return static_cast<ECursor>(m_inheritedData.m_cursorStyle); | 2019 return static_cast<ECursor>(m_inheritedData.m_cursorStyle); |
2020 } | 2020 } |
2021 void setCursor(ECursor c) { | 2021 void setCursor(ECursor c) { |
2022 m_inheritedData.m_cursorStyle = static_cast<unsigned>(c); | 2022 m_inheritedData.m_cursorStyle = static_cast<unsigned>(c); |
2023 } | 2023 } |
2024 | 2024 |
2025 // direction | 2025 // direction |
2026 static TextDirection initialDirection() { return LTR; } | 2026 static TextDirection initialDirection() { return TextDirection::Ltr; } |
2027 TextDirection direction() const { | 2027 TextDirection direction() const { |
2028 return static_cast<TextDirection>(m_inheritedData.m_direction); | 2028 return static_cast<TextDirection>(m_inheritedData.m_direction); |
2029 } | 2029 } |
2030 void setDirection(TextDirection v) { m_inheritedData.m_direction = v; } | 2030 void setDirection(TextDirection v) { |
| 2031 m_inheritedData.m_direction = static_cast<unsigned>(v); |
| 2032 } |
2031 | 2033 |
2032 // color | 2034 // color |
2033 static Color initialColor() { return Color::black; } | 2035 static Color initialColor() { return Color::black; } |
2034 void setColor(const Color&); | 2036 void setColor(const Color&); |
2035 | 2037 |
2036 // hyphens | 2038 // hyphens |
2037 static Hyphens initialHyphens() { return HyphensManual; } | 2039 static Hyphens initialHyphens() { return HyphensManual; } |
2038 Hyphens getHyphens() const { | 2040 Hyphens getHyphens() const { |
2039 return static_cast<Hyphens>(m_rareInheritedData->hyphens); | 2041 return static_cast<Hyphens>(m_rareInheritedData->hyphens); |
2040 } | 2042 } |
(...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3305 | 3307 |
3306 // Mix-blend-mode utility functions. | 3308 // Mix-blend-mode utility functions. |
3307 bool hasBlendMode() const { return blendMode() != WebBlendModeNormal; } | 3309 bool hasBlendMode() const { return blendMode() != WebBlendModeNormal; } |
3308 | 3310 |
3309 // Motion utility functions. | 3311 // Motion utility functions. |
3310 bool hasOffset() const { | 3312 bool hasOffset() const { |
3311 return (offsetPosition().x() != Length(Auto)) || offsetPath(); | 3313 return (offsetPosition().x() != Length(Auto)) || offsetPath(); |
3312 } | 3314 } |
3313 | 3315 |
3314 // Direction utility functions. | 3316 // Direction utility functions. |
3315 bool isLeftToRightDirection() const { return direction() == LTR; } | 3317 bool isLeftToRightDirection() const { |
| 3318 return direction() == TextDirection::Ltr; |
| 3319 } |
3316 | 3320 |
3317 // Perspective utility functions. | 3321 // Perspective utility functions. |
3318 bool hasPerspective() const { | 3322 bool hasPerspective() const { |
3319 return m_rareNonInheritedData->m_perspective > 0; | 3323 return m_rareNonInheritedData->m_perspective > 0; |
3320 } | 3324 } |
3321 | 3325 |
3322 // Page size utility functions. | 3326 // Page size utility functions. |
3323 void resetPageSizeType() { | 3327 void resetPageSizeType() { |
3324 SET_VAR(m_rareNonInheritedData, m_pageSizeType, PAGE_SIZE_AUTO); | 3328 SET_VAR(m_rareNonInheritedData, m_pageSizeType, PAGE_SIZE_AUTO); |
3325 } | 3329 } |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3985 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 3989 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
3986 } | 3990 } |
3987 | 3991 |
3988 inline bool ComputedStyle::hasPseudoElementStyle() const { | 3992 inline bool ComputedStyle::hasPseudoElementStyle() const { |
3989 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 3993 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
3990 } | 3994 } |
3991 | 3995 |
3992 } // namespace blink | 3996 } // namespace blink |
3993 | 3997 |
3994 #endif // ComputedStyle_h | 3998 #endif // ComputedStyle_h |
OLD | NEW |