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

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

Issue 705783002: Decouple font unit conversion in computeLengthDouble from RenderStyle. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Forgot to remove ASSERT(rootStyle). Created 6 years, 1 month 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/css/CSSCalculationValueTest.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 * 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Need to look up our size. Create a string of width*height to use as a hash key. 62 // Need to look up our size. Create a string of width*height to use as a hash key.
63 Image* result = getImage(renderer, size); 63 Image* result = getImage(renderer, size);
64 if (result) 64 if (result)
65 return result; 65 return result;
66 } 66 }
67 67
68 // We need to create an image. 68 // We need to create an image.
69 RefPtr<Gradient> gradient; 69 RefPtr<Gradient> gradient;
70 70
71 RenderStyle* rootStyle = renderer->document().documentElement()->renderStyle (); 71 RenderStyle* rootStyle = renderer->document().documentElement()->renderStyle ();
72 CSSToLengthConversionData conversionData(renderer->style(), rootStyle, rende rer->view()); 72 CSSToLengthConversionData conversionData(renderer->style(), rootStyle, rende rer->view(), renderer->style()->effectiveZoom());
73 if (isLinearGradientValue()) 73 if (isLinearGradientValue())
74 gradient = toCSSLinearGradientValue(this)->createGradient(conversionData , size); 74 gradient = toCSSLinearGradientValue(this)->createGradient(conversionData , size);
75 else 75 else
76 gradient = toCSSRadialGradientValue(this)->createGradient(conversionData , size); 76 gradient = toCSSRadialGradientValue(this)->createGradient(conversionData , size);
77 77
78 RefPtr<Image> newImage = GradientGeneratedImage::create(gradient, size); 78 RefPtr<Image> newImage = GradientGeneratedImage::create(gradient, size);
79 if (cacheable) 79 if (cacheable)
80 putImage(size, newImage); 80 putImage(size, newImage);
81 81
82 return newImage.release(); 82 return newImage.release();
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 visitor->trace(m_firstRadius); 1305 visitor->trace(m_firstRadius);
1306 visitor->trace(m_secondRadius); 1306 visitor->trace(m_secondRadius);
1307 visitor->trace(m_shape); 1307 visitor->trace(m_shape);
1308 visitor->trace(m_sizingBehavior); 1308 visitor->trace(m_sizingBehavior);
1309 visitor->trace(m_endHorizontalSize); 1309 visitor->trace(m_endHorizontalSize);
1310 visitor->trace(m_endVerticalSize); 1310 visitor->trace(m_endVerticalSize);
1311 CSSGradientValue::traceAfterDispatch(visitor); 1311 CSSGradientValue::traceAfterDispatch(visitor);
1312 } 1312 }
1313 1313
1314 } // namespace blink 1314 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/CSSCalculationValueTest.cpp ('k') | Source/core/css/CSSMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698