| 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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 353 |
| 354 // !END SYNC! | 354 // !END SYNC! |
| 355 | 355 |
| 356 void setBitDefaults() { | 356 void setBitDefaults() { |
| 357 ComputedStyleBase::setBitDefaults(); | 357 ComputedStyleBase::setBitDefaults(); |
| 358 m_inheritedData.m_listStyleType = | 358 m_inheritedData.m_listStyleType = |
| 359 static_cast<unsigned>(initialListStyleType()); | 359 static_cast<unsigned>(initialListStyleType()); |
| 360 m_inheritedData.m_textAlign = static_cast<unsigned>(initialTextAlign()); | 360 m_inheritedData.m_textAlign = static_cast<unsigned>(initialTextAlign()); |
| 361 m_inheritedData.m_hasSimpleUnderline = false; | 361 m_inheritedData.m_hasSimpleUnderline = false; |
| 362 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor()); | 362 m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor()); |
| 363 m_inheritedData.m_direction = initialDirection(); | 363 m_inheritedData.m_direction = static_cast<unsigned>(initialDirection()); |
| 364 m_inheritedData.m_whiteSpace = static_cast<unsigned>(initialWhiteSpace()); | 364 m_inheritedData.m_whiteSpace = static_cast<unsigned>(initialWhiteSpace()); |
| 365 m_inheritedData.m_rtlOrdering = static_cast<unsigned>(initialRTLOrdering()); | 365 m_inheritedData.m_rtlOrdering = static_cast<unsigned>(initialRTLOrdering()); |
| 366 m_inheritedData.m_boxDirection = | 366 m_inheritedData.m_boxDirection = |
| 367 static_cast<unsigned>(initialBoxDirection()); | 367 static_cast<unsigned>(initialBoxDirection()); |
| 368 m_inheritedData.m_printColorAdjust = | 368 m_inheritedData.m_printColorAdjust = |
| 369 static_cast<unsigned>(initialPrintColorAdjust()); | 369 static_cast<unsigned>(initialPrintColorAdjust()); |
| 370 m_inheritedData.m_pointerEvents = | 370 m_inheritedData.m_pointerEvents = |
| 371 static_cast<unsigned>(initialPointerEvents()); | 371 static_cast<unsigned>(initialPointerEvents()); |
| 372 m_inheritedData.m_insideLink = NotInsideLink; | 372 m_inheritedData.m_insideLink = NotInsideLink; |
| 373 m_inheritedData.m_writingMode = initialWritingMode(); | 373 m_inheritedData.m_writingMode = initialWritingMode(); |
| (...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2054 // cursor | 2054 // cursor |
| 2055 static ECursor initialCursor() { return ECursor::Auto; } | 2055 static ECursor initialCursor() { return ECursor::Auto; } |
| 2056 ECursor cursor() const { | 2056 ECursor cursor() const { |
| 2057 return static_cast<ECursor>(m_inheritedData.m_cursorStyle); | 2057 return static_cast<ECursor>(m_inheritedData.m_cursorStyle); |
| 2058 } | 2058 } |
| 2059 void setCursor(ECursor c) { | 2059 void setCursor(ECursor c) { |
| 2060 m_inheritedData.m_cursorStyle = static_cast<unsigned>(c); | 2060 m_inheritedData.m_cursorStyle = static_cast<unsigned>(c); |
| 2061 } | 2061 } |
| 2062 | 2062 |
| 2063 // direction | 2063 // direction |
| 2064 static TextDirection initialDirection() { return LTR; } | 2064 static TextDirection initialDirection() { return TextDirection::Ltr; } |
| 2065 TextDirection direction() const { | 2065 TextDirection direction() const { |
| 2066 return static_cast<TextDirection>(m_inheritedData.m_direction); | 2066 return static_cast<TextDirection>(m_inheritedData.m_direction); |
| 2067 } | 2067 } |
| 2068 void setDirection(TextDirection v) { m_inheritedData.m_direction = v; } | 2068 void setDirection(TextDirection v) { |
| 2069 m_inheritedData.m_direction = static_cast<unsigned>(v); |
| 2070 } |
| 2069 | 2071 |
| 2070 // color | 2072 // color |
| 2071 static Color initialColor() { return Color::black; } | 2073 static Color initialColor() { return Color::black; } |
| 2072 void setColor(const Color&); | 2074 void setColor(const Color&); |
| 2073 | 2075 |
| 2074 // hyphens | 2076 // hyphens |
| 2075 static Hyphens initialHyphens() { return HyphensManual; } | 2077 static Hyphens initialHyphens() { return HyphensManual; } |
| 2076 Hyphens getHyphens() const { | 2078 Hyphens getHyphens() const { |
| 2077 return static_cast<Hyphens>(m_rareInheritedData->hyphens); | 2079 return static_cast<Hyphens>(m_rareInheritedData->hyphens); |
| 2078 } | 2080 } |
| (...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3402 | 3404 |
| 3403 // Mix-blend-mode utility functions. | 3405 // Mix-blend-mode utility functions. |
| 3404 bool hasBlendMode() const { return blendMode() != WebBlendModeNormal; } | 3406 bool hasBlendMode() const { return blendMode() != WebBlendModeNormal; } |
| 3405 | 3407 |
| 3406 // Motion utility functions. | 3408 // Motion utility functions. |
| 3407 bool hasOffset() const { | 3409 bool hasOffset() const { |
| 3408 return (offsetPosition().x() != Length(Auto)) || offsetPath(); | 3410 return (offsetPosition().x() != Length(Auto)) || offsetPath(); |
| 3409 } | 3411 } |
| 3410 | 3412 |
| 3411 // Direction utility functions. | 3413 // Direction utility functions. |
| 3412 bool isLeftToRightDirection() const { return direction() == LTR; } | 3414 bool isLeftToRightDirection() const { |
| 3415 return direction() == TextDirection::Ltr; |
| 3416 } |
| 3413 | 3417 |
| 3414 // Perspective utility functions. | 3418 // Perspective utility functions. |
| 3415 bool hasPerspective() const { | 3419 bool hasPerspective() const { |
| 3416 return m_rareNonInheritedData->m_perspective > 0; | 3420 return m_rareNonInheritedData->m_perspective > 0; |
| 3417 } | 3421 } |
| 3418 | 3422 |
| 3419 // Page size utility functions. | 3423 // Page size utility functions. |
| 3420 void resetPageSizeType() { | 3424 void resetPageSizeType() { |
| 3421 SET_VAR(m_rareNonInheritedData, m_pageSizeType, PAGE_SIZE_AUTO); | 3425 SET_VAR(m_rareNonInheritedData, m_pageSizeType, PAGE_SIZE_AUTO); |
| 3422 } | 3426 } |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4082 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 4086 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
| 4083 } | 4087 } |
| 4084 | 4088 |
| 4085 inline bool ComputedStyle::hasPseudoElementStyle() const { | 4089 inline bool ComputedStyle::hasPseudoElementStyle() const { |
| 4086 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 4090 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
| 4087 } | 4091 } |
| 4088 | 4092 |
| 4089 } // namespace blink | 4093 } // namespace blink |
| 4090 | 4094 |
| 4091 #endif // ComputedStyle_h | 4095 #endif // ComputedStyle_h |
| OLD | NEW |