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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp

Issue 2622403006: Compute initial values for registered custom properties. (Closed)
Patch Set: initialise CSSToLengthConversionData nicer Created 3 years, 11 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
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 CSSToLengthConversionData::CSSToLengthConversionData( 79 CSSToLengthConversionData::CSSToLengthConversionData(
80 const ComputedStyle* style, 80 const ComputedStyle* style,
81 const FontSizes& fontSizes, 81 const FontSizes& fontSizes,
82 const ViewportSize& viewportSize, 82 const ViewportSize& viewportSize,
83 float zoom) 83 float zoom)
84 : m_style(style), 84 : m_style(style),
85 m_fontSizes(fontSizes), 85 m_fontSizes(fontSizes),
86 m_viewportSize(viewportSize), 86 m_viewportSize(viewportSize),
87 m_zoom(clampTo<float>(zoom, std::numeric_limits<float>::denorm_min())) { 87 m_zoom(clampTo<float>(zoom, std::numeric_limits<float>::denorm_min())) {
88 ASSERT(m_style);
89 } 88 }
90 89
91 CSSToLengthConversionData::CSSToLengthConversionData( 90 CSSToLengthConversionData::CSSToLengthConversionData(
92 const ComputedStyle* style, 91 const ComputedStyle* style,
93 const ComputedStyle* rootStyle, 92 const ComputedStyle* rootStyle,
94 const LayoutViewItem& layoutViewItem, 93 const LayoutViewItem& layoutViewItem,
95 float zoom) 94 float zoom)
96 : CSSToLengthConversionData(style, 95 : CSSToLengthConversionData(style,
97 FontSizes(style, rootStyle), 96 FontSizes(style, rootStyle),
98 ViewportSize(layoutViewItem), 97 ViewportSize(layoutViewItem),
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 case CSSPrimitiveValue::UnitType::Chs: 175 case CSSPrimitiveValue::UnitType::Chs:
177 return value * chFontSize(); 176 return value * chFontSize();
178 177
179 default: 178 default:
180 ASSERT_NOT_REACHED(); 179 ASSERT_NOT_REACHED();
181 return 0; 180 return 0;
182 } 181 }
183 } 182 }
184 183
185 } // namespace blink 184 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698