| 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 return true; | 56 return true; |
| 57 if (!top_right_.Width().IsZero()) | 57 if (!top_right_.Width().IsZero()) |
| 58 return true; | 58 return true; |
| 59 if (!bottom_left_.Width().IsZero()) | 59 if (!bottom_left_.Width().IsZero()) |
| 60 return true; | 60 return true; |
| 61 if (!bottom_right_.Width().IsZero()) | 61 if (!bottom_right_.Width().IsZero()) |
| 62 return true; | 62 return true; |
| 63 return false; | 63 return false; |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool HasBorderColorReferencingCurrentColor() const { |
| 67 return (left_.NonZero() && left_.GetColor().IsCurrentColor()) || |
| 68 (right_.NonZero() && right_.GetColor().IsCurrentColor()) || |
| 69 (top_.NonZero() && top_.GetColor().IsCurrentColor()) || |
| 70 (bottom_.NonZero() && bottom_.GetColor().IsCurrentColor()); |
| 71 } |
| 72 |
| 66 float BorderLeftWidth() const { | 73 float BorderLeftWidth() const { |
| 67 if (left_.Style() == kBorderStyleNone || | 74 if (left_.Style() == kBorderStyleNone || |
| 68 left_.Style() == kBorderStyleHidden) | 75 left_.Style() == kBorderStyleHidden) |
| 69 return 0; | 76 return 0; |
| 70 return left_.Width(); | 77 return left_.Width(); |
| 71 } | 78 } |
| 72 | 79 |
| 73 float BorderRightWidth() const { | 80 float BorderRightWidth() const { |
| 74 if (right_.Style() == kBorderStyleNone || | 81 if (right_.Style() == kBorderStyleNone || |
| 75 right_.Style() == kBorderStyleHidden) | 82 right_.Style() == kBorderStyleHidden) |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 148 |
| 142 LengthSize top_left_; | 149 LengthSize top_left_; |
| 143 LengthSize top_right_; | 150 LengthSize top_right_; |
| 144 LengthSize bottom_left_; | 151 LengthSize bottom_left_; |
| 145 LengthSize bottom_right_; | 152 LengthSize bottom_right_; |
| 146 }; | 153 }; |
| 147 | 154 |
| 148 } // namespace blink | 155 } // namespace blink |
| 149 | 156 |
| 150 #endif // BorderData_h | 157 #endif // BorderData_h |
| OLD | NEW |