Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: Source/core/rendering/style/ShadowList.h

Issue 38823002: Web Animations CSS: Support animation of {text,box,-webkit-box}-shadow and fix blur clamping (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: use 0 instead of PassRefPtr<..>() Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/style/ShadowData.cpp ('k') | Source/core/rendering/style/ShadowList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 public: 48 public:
49 // This consumes passed in vector. 49 // This consumes passed in vector.
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);
59
58 void adjustRectForShadow(LayoutRect&, int additionalOutlineSize = 0) const; 60 void adjustRectForShadow(LayoutRect&, int additionalOutlineSize = 0) const;
59 void adjustRectForShadow(FloatRect&, int additionalOutlineSize = 0) const; 61 void adjustRectForShadow(FloatRect&, int additionalOutlineSize = 0) const;
60 62
61 private: 63 private:
62 ShadowList(ShadowDataVector& shadows) 64 ShadowList(ShadowDataVector& shadows)
63 { 65 {
64 // If we have no shadows, we use a null ShadowList 66 // If we have no shadows, we use a null ShadowList
65 ASSERT(!shadows.isEmpty()); 67 ASSERT(!shadows.isEmpty());
66 m_shadows.swap(shadows); 68 m_shadows.swap(shadows);
67 m_shadows.shrinkToFit(); 69 m_shadows.shrinkToFit();
68 } 70 }
69 ShadowDataVector m_shadows; 71 ShadowDataVector m_shadows;
70 }; 72 };
71 73
72 } // namespace WebCore 74 } // namespace WebCore
73 75
74 #endif // ShadowList_h 76 #endif // ShadowList_h
OLDNEW
« no previous file with comments | « Source/core/rendering/style/ShadowData.cpp ('k') | Source/core/rendering/style/ShadowList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698