| 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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 return m_surround->border.bottomRight(); | 635 return m_surround->border.bottomRight(); |
| 636 } | 636 } |
| 637 void setBorderBottomRightRadius(const LengthSize& s) { | 637 void setBorderBottomRightRadius(const LengthSize& s) { |
| 638 SET_VAR(m_surround, border.m_bottomRight, s); | 638 SET_VAR(m_surround, border.m_bottomRight, s); |
| 639 } | 639 } |
| 640 | 640 |
| 641 // Offset properties. | 641 // Offset properties. |
| 642 static Length initialOffset() { return Length(); } | 642 static Length initialOffset() { return Length(); } |
| 643 | 643 |
| 644 // left | 644 // left |
| 645 const Length& left() const { return m_surround->offset.left(); } | 645 const Length& left() const { return m_surround->m_left; } |
| 646 void setLeft(const Length& v) { SET_VAR(m_surround, offset.m_left, v); } | 646 void setLeft(const Length& v) { SET_VAR(m_surround, m_left, v); } |
| 647 | 647 |
| 648 // right | 648 // right |
| 649 const Length& right() const { return m_surround->offset.right(); } | 649 const Length& right() const { return m_surround->m_right; } |
| 650 void setRight(const Length& v) { SET_VAR(m_surround, offset.m_right, v); } | 650 void setRight(const Length& v) { SET_VAR(m_surround, m_right, v); } |
| 651 | 651 |
| 652 // top | 652 // top |
| 653 const Length& top() const { return m_surround->offset.top(); } | 653 const Length& top() const { return m_surround->m_top; } |
| 654 void setTop(const Length& v) { SET_VAR(m_surround, offset.m_top, v); } | 654 void setTop(const Length& v) { SET_VAR(m_surround, m_top, v); } |
| 655 | 655 |
| 656 // bottom | 656 // bottom |
| 657 const Length& bottom() const { return m_surround->offset.bottom(); } | 657 const Length& bottom() const { return m_surround->m_bottom; } |
| 658 void setBottom(const Length& v) { SET_VAR(m_surround, offset.m_bottom, v); } | 658 void setBottom(const Length& v) { SET_VAR(m_surround, m_bottom, v); } |
| 659 | 659 |
| 660 // box-shadow (aka -webkit-box-shadow) | 660 // box-shadow (aka -webkit-box-shadow) |
| 661 static ShadowList* initialBoxShadow() { return 0; } | 661 static ShadowList* initialBoxShadow() { return 0; } |
| 662 ShadowList* boxShadow() const { | 662 ShadowList* boxShadow() const { |
| 663 return m_rareNonInheritedData->m_boxShadow.get(); | 663 return m_rareNonInheritedData->m_boxShadow.get(); |
| 664 } | 664 } |
| 665 void setBoxShadow(PassRefPtr<ShadowList>); | 665 void setBoxShadow(PassRefPtr<ShadowList>); |
| 666 | 666 |
| 667 // box-sizing (aka -webkit-box-sizing) | 667 // box-sizing (aka -webkit-box-sizing) |
| 668 static EBoxSizing initialBoxSizing() { return EBoxSizing::kContentBox; } | 668 static EBoxSizing initialBoxSizing() { return EBoxSizing::kContentBox; } |
| (...skipping 2391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3060 | 3060 |
| 3061 // Clip utility functions. | 3061 // Clip utility functions. |
| 3062 const Length& clipLeft() const { return m_visual->clip.left(); } | 3062 const Length& clipLeft() const { return m_visual->clip.left(); } |
| 3063 const Length& clipRight() const { return m_visual->clip.right(); } | 3063 const Length& clipRight() const { return m_visual->clip.right(); } |
| 3064 const Length& clipTop() const { return m_visual->clip.top(); } | 3064 const Length& clipTop() const { return m_visual->clip.top(); } |
| 3065 const Length& clipBottom() const { return m_visual->clip.bottom(); } | 3065 const Length& clipBottom() const { return m_visual->clip.bottom(); } |
| 3066 | 3066 |
| 3067 // Offset utility functions. | 3067 // Offset utility functions. |
| 3068 // Accessors for positioned object edges that take into account writing mode. | 3068 // Accessors for positioned object edges that take into account writing mode. |
| 3069 const Length& logicalLeft() const { | 3069 const Length& logicalLeft() const { |
| 3070 return m_surround->offset.logicalLeft(getWritingMode()); | 3070 return LengthBox::logicalLeft(getWritingMode(), left(), top()); |
| 3071 } | 3071 } |
| 3072 const Length& logicalRight() const { | 3072 const Length& logicalRight() const { |
| 3073 return m_surround->offset.logicalRight(getWritingMode()); | 3073 return LengthBox::logicalRight(getWritingMode(), right(), bottom()); |
| 3074 } | 3074 } |
| 3075 const Length& logicalTop() const { | 3075 const Length& logicalTop() const { |
| 3076 return m_surround->offset.before(getWritingMode()); | 3076 return LengthBox::before(getWritingMode(), top(), left(), right()); |
| 3077 } | 3077 } |
| 3078 const Length& logicalBottom() const { | 3078 const Length& logicalBottom() const { |
| 3079 return m_surround->offset.after(getWritingMode()); | 3079 return LengthBox::after(getWritingMode(), bottom(), left(), right()); |
| 3080 } |
| 3081 bool offsetEqual(const ComputedStyle& other) const { |
| 3082 return left() == other.left() && right() == other.right() && |
| 3083 top() == other.top() && bottom() == other.bottom(); |
| 3080 } | 3084 } |
| 3081 | 3085 |
| 3082 // Whether or not a positioned element requires normal flow x/y to be computed | 3086 // Whether or not a positioned element requires normal flow x/y to be computed |
| 3083 // to determine its position. | 3087 // to determine its position. |
| 3084 bool hasAutoLeftAndRight() const { | 3088 bool hasAutoLeftAndRight() const { |
| 3085 return left().isAuto() && right().isAuto(); | 3089 return left().isAuto() && right().isAuto(); |
| 3086 } | 3090 } |
| 3087 bool hasAutoTopAndBottom() const { | 3091 bool hasAutoTopAndBottom() const { |
| 3088 return top().isAuto() && bottom().isAuto(); | 3092 return top().isAuto() && bottom().isAuto(); |
| 3089 } | 3093 } |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3723 m_pseudoBits |= 1 << (pseudo - FirstPublicPseudoId); | 3727 m_pseudoBits |= 1 << (pseudo - FirstPublicPseudoId); |
| 3724 } | 3728 } |
| 3725 | 3729 |
| 3726 inline bool ComputedStyle::hasPseudoElementStyle() const { | 3730 inline bool ComputedStyle::hasPseudoElementStyle() const { |
| 3727 return m_pseudoBits & ElementPseudoIdMask; | 3731 return m_pseudoBits & ElementPseudoIdMask; |
| 3728 } | 3732 } |
| 3729 | 3733 |
| 3730 } // namespace blink | 3734 } // namespace blink |
| 3731 | 3735 |
| 3732 #endif // ComputedStyle_h | 3736 #endif // ComputedStyle_h |
| OLD | NEW |