| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 public: | 42 public: |
| 43 static PassRefPtr<NinePieceImageData> create() { return adoptRef(new NinePie
ceImageData); } | 43 static PassRefPtr<NinePieceImageData> create() { return adoptRef(new NinePie
ceImageData); } |
| 44 PassRefPtr<NinePieceImageData> copy() const { return adoptRef(new NinePieceI
mageData(*this)); } | 44 PassRefPtr<NinePieceImageData> copy() const { return adoptRef(new NinePieceI
mageData(*this)); } |
| 45 | 45 |
| 46 bool operator==(const NinePieceImageData&) const; | 46 bool operator==(const NinePieceImageData&) const; |
| 47 bool operator!=(const NinePieceImageData& o) const { return !(*this == o); } | 47 bool operator!=(const NinePieceImageData& o) const { return !(*this == o); } |
| 48 | 48 |
| 49 unsigned fill : 1; | 49 unsigned fill : 1; |
| 50 unsigned horizontalRule : 2; // ENinePieceImageRule | 50 unsigned horizontalRule : 2; // ENinePieceImageRule |
| 51 unsigned verticalRule : 2; // ENinePieceImageRule | 51 unsigned verticalRule : 2; // ENinePieceImageRule |
| 52 RefPtrWillBePersistent<StyleImage> image; | 52 Persistent<StyleImage> image; |
| 53 LengthBox imageSlices; | 53 LengthBox imageSlices; |
| 54 BorderImageLengthBox borderSlices; | 54 BorderImageLengthBox borderSlices; |
| 55 BorderImageLengthBox outset; | 55 BorderImageLengthBox outset; |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 NinePieceImageData(); | 58 NinePieceImageData(); |
| 59 NinePieceImageData(const NinePieceImageData&); | 59 NinePieceImageData(const NinePieceImageData&); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 class CORE_EXPORT NinePieceImage { | 62 class CORE_EXPORT NinePieceImage { |
| 63 DISALLOW_NEW(); | 63 DISALLOW_NEW(); |
| 64 public: | 64 public: |
| 65 NinePieceImage(); | 65 NinePieceImage(); |
| 66 NinePieceImage(PassRefPtrWillBeRawPtr<StyleImage>, LengthBox imageSlices, bo
ol fill, const BorderImageLengthBox& borderSlices, | 66 NinePieceImage(RawPtr<StyleImage>, LengthBox imageSlices, bool fill, const B
orderImageLengthBox& borderSlices, |
| 67 const BorderImageLengthBox& outset, ENinePieceImageRule horizontalRule,
ENinePieceImageRule verticalRule); | 67 const BorderImageLengthBox& outset, ENinePieceImageRule horizontalRule,
ENinePieceImageRule verticalRule); |
| 68 | 68 |
| 69 bool operator==(const NinePieceImage& other) const { return m_data == other.
m_data; } | 69 bool operator==(const NinePieceImage& other) const { return m_data == other.
m_data; } |
| 70 bool operator!=(const NinePieceImage& other) const { return m_data != other.
m_data; } | 70 bool operator!=(const NinePieceImage& other) const { return m_data != other.
m_data; } |
| 71 | 71 |
| 72 bool hasImage() const { return m_data->image; } | 72 bool hasImage() const { return m_data->image; } |
| 73 StyleImage* image() const { return m_data->image.get(); } | 73 StyleImage* image() const { return m_data->image.get(); } |
| 74 void setImage(PassRefPtrWillBeRawPtr<StyleImage> image) { m_data.access()->i
mage = image; } | 74 void setImage(RawPtr<StyleImage> image) { m_data.access()->image = image; } |
| 75 | 75 |
| 76 const LengthBox& imageSlices() const { return m_data->imageSlices; } | 76 const LengthBox& imageSlices() const { return m_data->imageSlices; } |
| 77 void setImageSlices(const LengthBox& slices) { m_data.access()->imageSlices
= slices; } | 77 void setImageSlices(const LengthBox& slices) { m_data.access()->imageSlices
= slices; } |
| 78 | 78 |
| 79 bool fill() const { return m_data->fill; } | 79 bool fill() const { return m_data->fill; } |
| 80 void setFill(bool fill) { m_data.access()->fill = fill; } | 80 void setFill(bool fill) { m_data.access()->fill = fill; } |
| 81 | 81 |
| 82 const BorderImageLengthBox& borderSlices() const { return m_data->borderSlic
es; } | 82 const BorderImageLengthBox& borderSlices() const { return m_data->borderSlic
es; } |
| 83 void setBorderSlices(const BorderImageLengthBox& slices) { m_data.access()->
borderSlices = slices; } | 83 void setBorderSlices(const BorderImageLengthBox& slices) { m_data.access()->
borderSlices = slices; } |
| 84 | 84 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 return LayoutUnit(outsetSide.length().value()); | 127 return LayoutUnit(outsetSide.length().value()); |
| 128 } | 128 } |
| 129 | 129 |
| 130 private: | 130 private: |
| 131 DataRef<NinePieceImageData> m_data; | 131 DataRef<NinePieceImageData> m_data; |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace blink | 134 } // namespace blink |
| 135 | 135 |
| 136 #endif // NinePieceImage_h | 136 #endif // NinePieceImage_h |
| OLD | NEW |