| 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 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 bool isVisible(bool checkStyle = true) const | 56 bool isVisible(bool checkStyle = true) const |
| 57 { | 57 { |
| 58 return nonZero(checkStyle) && !isTransparent() && (!checkStyle || m_styl
e != BHIDDEN); | 58 return nonZero(checkStyle) && !isTransparent() && (!checkStyle || m_styl
e != BHIDDEN); |
| 59 } | 59 } |
| 60 | 60 |
| 61 bool operator==(const BorderValue& o) const | 61 bool operator==(const BorderValue& o) const |
| 62 { | 62 { |
| 63 return m_width == o.m_width && m_style == o.m_style && m_color == o.m_co
lor && m_colorIsCurrentColor == o.m_colorIsCurrentColor; | 63 return m_width == o.m_width && m_style == o.m_style && m_color == o.m_co
lor && m_colorIsCurrentColor == o.m_colorIsCurrentColor; |
| 64 } | 64 } |
| 65 | 65 |
| 66 // The default width is 3px, but if the style is none we compute a value of
0 (in RenderStyle itself) |
| 67 bool visuallyEqual(const BorderValue& o) const |
| 68 { |
| 69 if (m_style == BNONE && o.m_style == BNONE) |
| 70 return true; |
| 71 if (m_style == BHIDDEN && o.m_style == BHIDDEN) |
| 72 return true; |
| 73 return *this == o; |
| 74 } |
| 75 |
| 66 bool operator!=(const BorderValue& o) const | 76 bool operator!=(const BorderValue& o) const |
| 67 { | 77 { |
| 68 return !(*this == o); | 78 return !(*this == o); |
| 69 } | 79 } |
| 70 | 80 |
| 71 void setColor(const StyleColor& color) | 81 void setColor(const StyleColor& color) |
| 72 { | 82 { |
| 73 m_color = color.resolve(Color()); | 83 m_color = color.resolve(Color()); |
| 74 m_colorIsCurrentColor = color.isCurrentColor(); | 84 m_colorIsCurrentColor = color.isCurrentColor(); |
| 75 } | 85 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 86 unsigned m_width : 26; | 96 unsigned m_width : 26; |
| 87 unsigned m_style : 4; // EBorderStyle | 97 unsigned m_style : 4; // EBorderStyle |
| 88 | 98 |
| 89 // This is only used by OutlineValue but moved here to keep the bits packed. | 99 // This is only used by OutlineValue but moved here to keep the bits packed. |
| 90 unsigned m_isAuto : 1; // OutlineIsAuto | 100 unsigned m_isAuto : 1; // OutlineIsAuto |
| 91 }; | 101 }; |
| 92 | 102 |
| 93 } // namespace WebCore | 103 } // namespace WebCore |
| 94 | 104 |
| 95 #endif // BorderValue_h | 105 #endif // BorderValue_h |
| OLD | NEW |