| OLD | NEW |
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 { | 65 { |
| 66 ASSERT(m_font); | 66 ASSERT(m_font); |
| 67 return m_font->getFontMetrics().zeroWidth(); | 67 return m_font->getFontMetrics().zeroWidth(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 CSSToLengthConversionData::ViewportSize::ViewportSize(const LayoutViewItem& layo
utViewItem) | 70 CSSToLengthConversionData::ViewportSize::ViewportSize(const LayoutViewItem& layo
utViewItem) |
| 71 : m_size(!layoutViewItem.isNull() ? layoutViewItem.viewportSizeForViewportUn
its() : DoubleSize()) | 71 : m_size(!layoutViewItem.isNull() ? layoutViewItem.viewportSizeForViewportUn
its() : DoubleSize()) |
| 72 { | 72 { |
| 73 } | 73 } |
| 74 | 74 |
| 75 CSSToLengthConversionData::CSSToLengthConversionData(const ComputedStyle* style,
float zoom) |
| 76 : m_style(style) |
| 77 , m_zoom(clampTo<float>(zoom, std::numeric_limits<float>::denorm_min())) |
| 78 { |
| 79 } |
| 80 |
| 75 CSSToLengthConversionData::CSSToLengthConversionData(const ComputedStyle* style,
const FontSizes& fontSizes, const ViewportSize& viewportSize, float zoom) | 81 CSSToLengthConversionData::CSSToLengthConversionData(const ComputedStyle* style,
const FontSizes& fontSizes, const ViewportSize& viewportSize, float zoom) |
| 76 : m_style(style) | 82 : m_style(style) |
| 77 , m_fontSizes(fontSizes) | 83 , m_fontSizes(fontSizes) |
| 78 , m_viewportSize(viewportSize) | 84 , m_viewportSize(viewportSize) |
| 79 , m_zoom(clampTo<float>(zoom, std::numeric_limits<float>::denorm_min())) | 85 , m_zoom(clampTo<float>(zoom, std::numeric_limits<float>::denorm_min())) |
| 80 { | 86 { |
| 81 ASSERT(m_style); | 87 ASSERT(m_style); |
| 82 } | 88 } |
| 83 | 89 |
| 84 CSSToLengthConversionData::CSSToLengthConversionData(const ComputedStyle* style,
const ComputedStyle* rootStyle, const LayoutViewItem& layoutViewItem, float zoo
m) | 90 CSSToLengthConversionData::CSSToLengthConversionData(const ComputedStyle* style,
const ComputedStyle* rootStyle, const LayoutViewItem& layoutViewItem, float zoo
m) |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 case CSSPrimitiveValue::UnitType::Chs: | 172 case CSSPrimitiveValue::UnitType::Chs: |
| 167 return value * chFontSize(); | 173 return value * chFontSize(); |
| 168 | 174 |
| 169 default: | 175 default: |
| 170 ASSERT_NOT_REACHED(); | 176 ASSERT_NOT_REACHED(); |
| 171 return 0; | 177 return 0; |
| 172 } | 178 } |
| 173 } | 179 } |
| 174 | 180 |
| 175 } // namespace blink | 181 } // namespace blink |
| OLD | NEW |