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 r
ights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 3993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4004 inline double adjustDoubleForAbsoluteZoom(double value, | 4004 inline double adjustDoubleForAbsoluteZoom(double value, |
4005 const ComputedStyle& style) { | 4005 const ComputedStyle& style) { |
4006 return value / style.effectiveZoom(); | 4006 return value / style.effectiveZoom(); |
4007 } | 4007 } |
4008 | 4008 |
4009 inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, | 4009 inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, |
4010 const ComputedStyle& style) { | 4010 const ComputedStyle& style) { |
4011 return LayoutUnit(value / style.effectiveZoom()); | 4011 return LayoutUnit(value / style.effectiveZoom()); |
4012 } | 4012 } |
4013 | 4013 |
4014 inline double adjustScrollForAbsoluteZoom(double scrollOffset, | 4014 inline float adjustScrollForAbsoluteZoom(float scrollOffset, float zoomFactor) { |
4015 float zoomFactor) { | |
4016 return scrollOffset / zoomFactor; | 4015 return scrollOffset / zoomFactor; |
4017 } | 4016 } |
4018 | 4017 |
4019 inline double adjustScrollForAbsoluteZoom(double scrollOffset, | 4018 inline float adjustScrollForAbsoluteZoom(float scrollOffset, |
4020 const ComputedStyle& style) { | 4019 const ComputedStyle& style) { |
4021 return adjustScrollForAbsoluteZoom(scrollOffset, style.effectiveZoom()); | 4020 return adjustScrollForAbsoluteZoom(scrollOffset, style.effectiveZoom()); |
4022 } | 4021 } |
4023 | 4022 |
4024 inline bool ComputedStyle::setZoom(float f) { | 4023 inline bool ComputedStyle::setZoom(float f) { |
4025 if (compareEqual(m_visual->m_zoom, f)) | 4024 if (compareEqual(m_visual->m_zoom, f)) |
4026 return false; | 4025 return false; |
4027 m_visual.access()->m_zoom = f; | 4026 m_visual.access()->m_zoom = f; |
4028 setEffectiveZoom(effectiveZoom() * zoom()); | 4027 setEffectiveZoom(effectiveZoom() * zoom()); |
4029 return true; | 4028 return true; |
4030 } | 4029 } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4071 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); | 4070 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); |
4072 } | 4071 } |
4073 | 4072 |
4074 inline bool ComputedStyle::hasPseudoElementStyle() const { | 4073 inline bool ComputedStyle::hasPseudoElementStyle() const { |
4075 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; | 4074 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; |
4076 } | 4075 } |
4077 | 4076 |
4078 } // namespace blink | 4077 } // namespace blink |
4079 | 4078 |
4080 #endif // ComputedStyle_h | 4079 #endif // ComputedStyle_h |
OLD | NEW |