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

Side by Side Diff: sky/engine/core/css/CSSGradientValue.cpp

Issue 788883005: Remove REM units. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/engine/core/css/CSSCalculationValue.cpp ('k') | sky/engine/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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 // Need to look up our size. Create a string of width*height to use as a hash key. 55 // Need to look up our size. Create a string of width*height to use as a hash key.
56 Image* result = getImage(renderer, size); 56 Image* result = getImage(renderer, size);
57 if (result) 57 if (result)
58 return result; 58 return result;
59 } 59 }
60 60
61 // We need to create an image. 61 // We need to create an image.
62 RefPtr<Gradient> gradient; 62 RefPtr<Gradient> gradient;
63 63
64 RenderStyle* rootStyle = renderer->document().documentElement()->renderStyle (); 64 CSSToLengthConversionData conversionData(renderer->style(), renderer->view() );
65 CSSToLengthConversionData conversionData(renderer->style(), rootStyle, rende rer->view());
66 if (isLinearGradientValue()) 65 if (isLinearGradientValue())
67 gradient = toCSSLinearGradientValue(this)->createGradient(conversionData , size); 66 gradient = toCSSLinearGradientValue(this)->createGradient(conversionData , size);
68 else 67 else
69 gradient = toCSSRadialGradientValue(this)->createGradient(conversionData , size); 68 gradient = toCSSRadialGradientValue(this)->createGradient(conversionData , size);
70 69
71 RefPtr<Image> newImage = GradientGeneratedImage::create(gradient, size); 70 RefPtr<Image> newImage = GradientGeneratedImage::create(gradient, size);
72 if (cacheable) 71 if (cacheable)
73 putImage(size, newImage); 72 putImage(size, newImage);
74 73
75 return newImage.release(); 74 return newImage.release();
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 equalHorizontalAndVerticalSize = compareCSSValuePtr(m_endHorizontalSize, other.m_endHorizontalSize) && compareCSSValuePtr(m_endVerticalSize, other.m_end VerticalSize); 1164 equalHorizontalAndVerticalSize = compareCSSValuePtr(m_endHorizontalSize, other.m_endHorizontalSize) && compareCSSValuePtr(m_endVerticalSize, other.m_end VerticalSize);
1166 else { 1165 else {
1167 equalShape = !other.m_shape; 1166 equalShape = !other.m_shape;
1168 equalSizingBehavior = !other.m_sizingBehavior; 1167 equalSizingBehavior = !other.m_sizingBehavior;
1169 equalHorizontalAndVerticalSize = !other.m_endHorizontalSize && !other.m_ endVerticalSize; 1168 equalHorizontalAndVerticalSize = !other.m_endHorizontalSize && !other.m_ endVerticalSize;
1170 } 1169 }
1171 return equalShape && equalSizingBehavior && equalHorizontalAndVerticalSize & & m_stops == other.m_stops; 1170 return equalShape && equalSizingBehavior && equalHorizontalAndVerticalSize & & m_stops == other.m_stops;
1172 } 1171 }
1173 1172
1174 } // namespace blink 1173 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSCalculationValue.cpp ('k') | sky/engine/core/css/CSSMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698