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

Side by Side Diff: Source/core/css/CSSGradientValue.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSFontSelector.cpp ('k') | Source/core/css/CSSMatrix.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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2015 Google Inc. All rights reserved. 3 * Copyright (C) 2015 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 13 matching lines...) Expand all
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/css/CSSGradientValue.h" 28 #include "core/css/CSSGradientValue.h"
29 29
30 #include "core/CSSValueKeywords.h" 30 #include "core/CSSValueKeywords.h"
31 #include "core/css/CSSCalculationValue.h" 31 #include "core/css/CSSCalculationValue.h"
32 #include "core/css/CSSToLengthConversionData.h" 32 #include "core/css/CSSToLengthConversionData.h"
33 #include "core/css/Pair.h" 33 #include "core/css/Pair.h"
34 #include "core/dom/NodeLayoutStyle.h" 34 #include "core/dom/NodeComputedStyle.h"
35 #include "core/dom/TextLinkColors.h" 35 #include "core/dom/TextLinkColors.h"
36 #include "core/layout/LayoutObject.h" 36 #include "core/layout/LayoutObject.h"
37 #include "platform/geometry/IntSize.h" 37 #include "platform/geometry/IntSize.h"
38 #include "platform/graphics/Gradient.h" 38 #include "platform/graphics/Gradient.h"
39 #include "platform/graphics/GradientGeneratedImage.h" 39 #include "platform/graphics/GradientGeneratedImage.h"
40 #include "platform/graphics/Image.h" 40 #include "platform/graphics/Image.h"
41 #include "platform/graphics/skia/SkiaUtils.h" 41 #include "platform/graphics/skia/SkiaUtils.h"
42 #include "wtf/text/StringBuilder.h" 42 #include "wtf/text/StringBuilder.h"
43 #include "wtf/text/WTFString.h" 43 #include "wtf/text/WTFString.h"
44 #include <utility> 44 #include <utility>
(...skipping 18 matching lines...) Expand all
63 63
64 // Need to look up our size. Create a string of width*height to use as a hash key. 64 // Need to look up our size. Create a string of width*height to use as a hash key.
65 Image* result = getImage(renderer, size); 65 Image* result = getImage(renderer, size);
66 if (result) 66 if (result)
67 return result; 67 return result;
68 } 68 }
69 69
70 // We need to create an image. 70 // We need to create an image.
71 RefPtr<Gradient> gradient; 71 RefPtr<Gradient> gradient;
72 72
73 const LayoutStyle* rootStyle = renderer->document().documentElement()->layou tStyle(); 73 const ComputedStyle* rootStyle = renderer->document().documentElement()->com putedStyle();
74 CSSToLengthConversionData conversionData(renderer->style(), rootStyle, rende rer->view(), renderer->style()->effectiveZoom()); 74 CSSToLengthConversionData conversionData(renderer->style(), rootStyle, rende rer->view(), renderer->style()->effectiveZoom());
75 if (isLinearGradientValue()) 75 if (isLinearGradientValue())
76 gradient = toCSSLinearGradientValue(this)->createGradient(conversionData , size, *renderer); 76 gradient = toCSSLinearGradientValue(this)->createGradient(conversionData , size, *renderer);
77 else 77 else
78 gradient = toCSSRadialGradientValue(this)->createGradient(conversionData , size, *renderer); 78 gradient = toCSSRadialGradientValue(this)->createGradient(conversionData , size, *renderer);
79 79
80 RefPtr<Image> newImage = GradientGeneratedImage::create(gradient, size); 80 RefPtr<Image> newImage = GradientGeneratedImage::create(gradient, size);
81 if (cacheable) 81 if (cacheable)
82 putImage(size, newImage); 82 putImage(size, newImage);
83 83
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 visitor->trace(m_firstRadius); 1202 visitor->trace(m_firstRadius);
1203 visitor->trace(m_secondRadius); 1203 visitor->trace(m_secondRadius);
1204 visitor->trace(m_shape); 1204 visitor->trace(m_shape);
1205 visitor->trace(m_sizingBehavior); 1205 visitor->trace(m_sizingBehavior);
1206 visitor->trace(m_endHorizontalSize); 1206 visitor->trace(m_endHorizontalSize);
1207 visitor->trace(m_endVerticalSize); 1207 visitor->trace(m_endVerticalSize);
1208 CSSGradientValue::traceAfterDispatch(visitor); 1208 CSSGradientValue::traceAfterDispatch(visitor);
1209 } 1209 }
1210 1210
1211 } // namespace blink 1211 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSFontSelector.cpp ('k') | Source/core/css/CSSMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698