| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 static PassRefPtr<ShadowList> adopt(ShadowDataVector& shadows) | 50 static PassRefPtr<ShadowList> adopt(ShadowDataVector& shadows) |
| 51 { | 51 { |
| 52 return adoptRef(new ShadowList(shadows)); | 52 return adoptRef(new ShadowList(shadows)); |
| 53 } | 53 } |
| 54 const ShadowDataVector& shadows() const { return m_shadows; } | 54 const ShadowDataVector& shadows() const { return m_shadows; } |
| 55 bool operator==(const ShadowList& o) const { return m_shadows == o.m_shadows
; } | 55 bool operator==(const ShadowList& o) const { return m_shadows == o.m_shadows
; } |
| 56 bool operator!=(const ShadowList& o) const { return !(*this == o); } | 56 bool operator!=(const ShadowList& o) const { return !(*this == o); } |
| 57 | 57 |
| 58 static PassRefPtr<ShadowList> blend(const ShadowList* from, const ShadowList
* to, double progress); | 58 static PassRefPtr<ShadowList> blend(const ShadowList* from, const ShadowList
* to, double progress); |
| 59 | 59 |
| 60 void adjustRectForShadow(LayoutRect&, int additionalOutlineSize = 0) const; | 60 void adjustRectForShadow(LayoutRect&, LayoutUnit additionalOutlineSize = 0)
const; |
| 61 void adjustRectForShadow(FloatRect&, int additionalOutlineSize = 0) const; | 61 void adjustRectForShadow(FloatRect&, LayoutUnit additionalOutlineSize = 0) c
onst; |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 ShadowList(ShadowDataVector& shadows) | 64 ShadowList(ShadowDataVector& shadows) |
| 65 { | 65 { |
| 66 // If we have no shadows, we use a null ShadowList | 66 // If we have no shadows, we use a null ShadowList |
| 67 ASSERT(!shadows.isEmpty()); | 67 ASSERT(!shadows.isEmpty()); |
| 68 m_shadows.swap(shadows); | 68 m_shadows.swap(shadows); |
| 69 m_shadows.shrinkToFit(); | 69 m_shadows.shrinkToFit(); |
| 70 } | 70 } |
| 71 ShadowDataVector m_shadows; | 71 ShadowDataVector m_shadows; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace WebCore | 74 } // namespace WebCore |
| 75 | 75 |
| 76 #endif // ShadowList_h | 76 #endif // ShadowList_h |
| OLD | NEW |