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

Side by Side Diff: Source/core/style/ShadowList.cpp

Issue 1210073004: Remove some unused code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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/style/ShadowList.h ('k') | no next file » | 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 29 matching lines...) Expand all
40 { 40 {
41 FloatRectOutsets outsets; 41 FloatRectOutsets outsets;
42 for (const ShadowData& shadow : shadows()) { 42 for (const ShadowData& shadow : shadows()) {
43 if (shadow.style() == Inset) 43 if (shadow.style() == Inset)
44 continue; 44 continue;
45 outsets.unite(shadow.rectOutsets()); 45 outsets.unite(shadow.rectOutsets());
46 } 46 }
47 return outsets; 47 return outsets;
48 } 48 }
49 49
50 void ShadowList::adjustRectForShadow(LayoutRect& rect) const
51 {
52 rect.expand(rectOutsetsIncludingOriginal());
53 }
54
55 void ShadowList::adjustRectForShadow(FloatRect& rect) const 50 void ShadowList::adjustRectForShadow(FloatRect& rect) const
56 { 51 {
57 rect.expand(rectOutsetsIncludingOriginal()); 52 rect.expand(rectOutsetsIncludingOriginal());
58 } 53 }
59 54
60 PassRefPtr<ShadowList> ShadowList::blend(const ShadowList* from, const ShadowLis t* to, double progress, const Color& currentColor) 55 PassRefPtr<ShadowList> ShadowList::blend(const ShadowList* from, const ShadowLis t* to, double progress, const Color& currentColor)
61 { 56 {
62 size_t fromLength = from ? from->shadows().size() : 0; 57 size_t fromLength = from ? from->shadows().size() : 0;
63 size_t toLength = to ? to->shadows().size() : 0; 58 size_t toLength = to ? to->shadows().size() : 0;
64 if (!fromLength && !toLength) 59 if (!fromLength && !toLength)
(...skipping 26 matching lines...) Expand all
91 float shadowX = isHorizontal ? shadow.x() : shadow.y(); 86 float shadowX = isHorizontal ? shadow.x() : shadow.y();
92 float shadowY = isHorizontal ? shadow.y() : -shadow.x(); 87 float shadowY = isHorizontal ? shadow.y() : -shadow.x();
93 drawLooperBuilder->addShadow(FloatSize(shadowX, shadowY), shadow.blur(), shadow.color().resolve(currentColor), 88 drawLooperBuilder->addShadow(FloatSize(shadowX, shadowY), shadow.blur(), shadow.color().resolve(currentColor),
94 DrawLooperBuilder::ShadowRespectsTransforms, alphaMode); 89 DrawLooperBuilder::ShadowRespectsTransforms, alphaMode);
95 } 90 }
96 drawLooperBuilder->addUnmodifiedContent(); 91 drawLooperBuilder->addUnmodifiedContent();
97 return drawLooperBuilder.release(); 92 return drawLooperBuilder.release();
98 } 93 }
99 94
100 } // namespace blink 95 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/style/ShadowList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698