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 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1880 { | 1880 { |
1881 if (compareEqual(visual->m_zoom, f)) | 1881 if (compareEqual(visual->m_zoom, f)) |
1882 return false; | 1882 return false; |
1883 visual.access()->m_zoom = f; | 1883 visual.access()->m_zoom = f; |
1884 setEffectiveZoom(effectiveZoom() * zoom()); | 1884 setEffectiveZoom(effectiveZoom() * zoom()); |
1885 return true; | 1885 return true; |
1886 } | 1886 } |
1887 | 1887 |
1888 inline bool ComputedStyle::setEffectiveZoom(float f) | 1888 inline bool ComputedStyle::setEffectiveZoom(float f) |
1889 { | 1889 { |
1890 if (compareEqual(rareInheritedData->m_effectiveZoom, f)) | 1890 float clampedEffectiveZoom = clampTo<float>(f); |
fs
2015/06/23 21:11:57
In practice this is just a "gratuitous max value"
| |
1891 if (compareEqual(rareInheritedData->m_effectiveZoom, clampedEffectiveZoom)) | |
1891 return false; | 1892 return false; |
1892 rareInheritedData.access()->m_effectiveZoom = f; | 1893 rareInheritedData.access()->m_effectiveZoom = clampedEffectiveZoom; |
1893 return true; | 1894 return true; |
1894 } | 1895 } |
1895 | 1896 |
1896 inline bool ComputedStyle::isSharable() const | 1897 inline bool ComputedStyle::isSharable() const |
1897 { | 1898 { |
1898 if (unique()) | 1899 if (unique()) |
1899 return false; | 1900 return false; |
1900 if (hasUniquePseudoStyle()) | 1901 if (hasUniquePseudoStyle()) |
1901 return false; | 1902 return false; |
1902 return true; | 1903 return true; |
(...skipping 28 matching lines...) Expand all Loading... | |
1931 } | 1932 } |
1932 | 1933 |
1933 inline bool ComputedStyle::hasPseudoElementStyle() const | 1934 inline bool ComputedStyle::hasPseudoElementStyle() const |
1934 { | 1935 { |
1935 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; | 1936 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; |
1936 } | 1937 } |
1937 | 1938 |
1938 } // namespace blink | 1939 } // namespace blink |
1939 | 1940 |
1940 #endif // ComputedStyle_h | 1941 #endif // ComputedStyle_h |
OLD | NEW |