| 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, 2013 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserv
ed. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 void copyRepeatFrom(const NinePieceImage& other) | 107 void copyRepeatFrom(const NinePieceImage& other) |
| 108 { | 108 { |
| 109 m_data.access()->horizontalRule = other.m_data->horizontalRule; | 109 m_data.access()->horizontalRule = other.m_data->horizontalRule; |
| 110 m_data.access()->verticalRule = other.m_data->verticalRule; | 110 m_data.access()->verticalRule = other.m_data->verticalRule; |
| 111 } | 111 } |
| 112 | 112 |
| 113 void setMaskDefaults() | 113 void setMaskDefaults() |
| 114 { | 114 { |
| 115 m_data.access()->imageSlices = LengthBox(0); | 115 m_data.access()->imageSlices = LengthBox(0); |
| 116 m_data.access()->fill = true; | 116 m_data.access()->fill = true; |
| 117 m_data.access()->borderSlices = BorderImageLengthBox(); | 117 m_data.access()->borderSlices = BorderImageLengthBox(Length(Auto)); |
| 118 } | 118 } |
| 119 | 119 |
| 120 static LayoutUnit computeOutset(const BorderImageLength& outsetSide, LayoutU
nit borderSide) | 120 static LayoutUnit computeOutset(const BorderImageLength& outsetSide, LayoutU
nit borderSide) |
| 121 { | 121 { |
| 122 if (outsetSide.isNumber()) | 122 if (outsetSide.isNumber()) |
| 123 return outsetSide.number() * borderSide; | 123 return outsetSide.number() * borderSide; |
| 124 return outsetSide.length().value(); | 124 return outsetSide.length().value(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 private: | 127 private: |
| 128 DataRef<NinePieceImageData> m_data; | 128 DataRef<NinePieceImageData> m_data; |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 } // namespace WebCore | 131 } // namespace WebCore |
| 132 | 132 |
| 133 #endif // NinePieceImage_h | 133 #endif // NinePieceImage_h |
| OLD | NEW |