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 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1779 if (zoomFactor > 1) { | 1779 if (zoomFactor > 1) { |
1780 if (value < 0) | 1780 if (value < 0) |
1781 value--; | 1781 value--; |
1782 else | 1782 else |
1783 value++; | 1783 value++; |
1784 } | 1784 } |
1785 | 1785 |
1786 return roundForImpreciseConversion<int>(value / zoomFactor); | 1786 return roundForImpreciseConversion<int>(value / zoomFactor); |
1787 } | 1787 } |
1788 | 1788 |
1789 inline float adjustFloatForAbsoluteZoom(float value, const RenderStyle* style) | 1789 inline float adjustFloatForAbsoluteZoom(float value, const RenderStyle& style) |
1790 { | 1790 { |
1791 return value / style->effectiveZoom(); | 1791 return value / style.effectiveZoom(); |
1792 } | 1792 } |
1793 | 1793 |
1794 inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, const Render
Style* style) | 1794 inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, const Render
Style& style) |
1795 { | 1795 { |
1796 return value / style->effectiveZoom(); | 1796 return value / style.effectiveZoom(); |
1797 } | 1797 } |
1798 | 1798 |
1799 inline bool RenderStyle::setZoom(float f) | 1799 inline bool RenderStyle::setZoom(float f) |
1800 { | 1800 { |
1801 if (compareEqual(visual->m_zoom, f)) | 1801 if (compareEqual(visual->m_zoom, f)) |
1802 return false; | 1802 return false; |
1803 visual.access()->m_zoom = f; | 1803 visual.access()->m_zoom = f; |
1804 setEffectiveZoom(effectiveZoom() * zoom()); | 1804 setEffectiveZoom(effectiveZoom() * zoom()); |
1805 return true; | 1805 return true; |
1806 } | 1806 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1848 inline void RenderStyle::setHasPseudoStyle(PseudoId pseudo) | 1848 inline void RenderStyle::setHasPseudoStyle(PseudoId pseudo) |
1849 { | 1849 { |
1850 ASSERT(pseudo > NOPSEUDO); | 1850 ASSERT(pseudo > NOPSEUDO); |
1851 ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID); | 1851 ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID); |
1852 noninherited_flags._pseudoBits |= 1 << (pseudo - 1); | 1852 noninherited_flags._pseudoBits |= 1 << (pseudo - 1); |
1853 } | 1853 } |
1854 | 1854 |
1855 } // namespace WebCore | 1855 } // namespace WebCore |
1856 | 1856 |
1857 #endif // RenderStyle_h | 1857 #endif // RenderStyle_h |
OLD | NEW |