OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef zoomAdjustedPixelValue_h | 5 #ifndef zoomAdjustedPixelValue_h |
6 #define zoomAdjustedPixelValue_h | 6 #define zoomAdjustedPixelValue_h |
7 | 7 |
8 #include "core/css/CSSPrimitiveValue.h" | 8 #include "core/css/CSSPrimitiveValue.h" |
9 #include "core/style/ComputedStyle.h" | 9 #include "core/style/ComputedStyle.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 class ComputedStyle; | 12 class ComputedStyle; |
13 | 13 |
14 inline CSSPrimitiveValue* ZoomAdjustedPixelValue(double value, | 14 inline CSSPrimitiveValue* ZoomAdjustedPixelValue(double value, |
15 const ComputedStyle& style) { | 15 const ComputedStyle& style) { |
16 return CSSPrimitiveValue::Create(AdjustFloatForAbsoluteZoom(value, style), | 16 return CSSPrimitiveValue::Create(AdjustFloatForAbsoluteZoom(value, style), |
17 CSSPrimitiveValue::UnitType::kPixels); | 17 CSSPrimitiveValue::UnitType::kPixels); |
18 } | 18 } |
19 } | 19 } // namespace blink |
20 #endif // zoomAdjustedPixelValue_h | 20 #endif // zoomAdjustedPixelValue_h |
OLD | NEW |