OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
6 * rights reserved. | 6 * rights reserved. |
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 4020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4031 inline double adjustDoubleForAbsoluteZoom(double value, | 4031 inline double adjustDoubleForAbsoluteZoom(double value, |
4032 const ComputedStyle& style) { | 4032 const ComputedStyle& style) { |
4033 return value / style.effectiveZoom(); | 4033 return value / style.effectiveZoom(); |
4034 } | 4034 } |
4035 | 4035 |
4036 inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, | 4036 inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, |
4037 const ComputedStyle& style) { | 4037 const ComputedStyle& style) { |
4038 return LayoutUnit(value / style.effectiveZoom()); | 4038 return LayoutUnit(value / style.effectiveZoom()); |
4039 } | 4039 } |
4040 | 4040 |
4041 inline double adjustScrollForAbsoluteZoom(double scrollOffset, | 4041 inline float adjustScrollForAbsoluteZoom(float scrollOffset, float zoomFactor) { |
4042 float zoomFactor) { | |
4043 return scrollOffset / zoomFactor; | 4042 return scrollOffset / zoomFactor; |
4044 } | 4043 } |
4045 | 4044 |
4046 inline double adjustScrollForAbsoluteZoom(double scrollOffset, | 4045 inline float adjustScrollForAbsoluteZoom(float scrollOffset, |
4047 const ComputedStyle& style) { | 4046 const ComputedStyle& style) { |
4048 return adjustScrollForAbsoluteZoom(scrollOffset, style.effectiveZoom()); | 4047 return adjustScrollForAbsoluteZoom(scrollOffset, style.effectiveZoom()); |
4049 } | 4048 } |
4050 | 4049 |
4051 inline bool ComputedStyle::setZoom(float f) { | 4050 inline bool ComputedStyle::setZoom(float f) { |
4052 if (compareEqual(m_visual->m_zoom, f)) | 4051 if (compareEqual(m_visual->m_zoom, f)) |
4053 return false; | 4052 return false; |
4054 m_visual.access()->m_zoom = f; | 4053 m_visual.access()->m_zoom = f; |
4055 setEffectiveZoom(effectiveZoom() * zoom()); | 4054 setEffectiveZoom(effectiveZoom() * zoom()); |
4056 return true; | 4055 return true; |
4057 } | 4056 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4098 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 4097 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
4099 } | 4098 } |
4100 | 4099 |
4101 inline bool ComputedStyle::hasPseudoElementStyle() const { | 4100 inline bool ComputedStyle::hasPseudoElementStyle() const { |
4102 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 4101 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
4103 } | 4102 } |
4104 | 4103 |
4105 } // namespace blink | 4104 } // namespace blink |
4106 | 4105 |
4107 #endif // ComputedStyle_h | 4106 #endif // ComputedStyle_h |
OLD | NEW |