OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
4 * reserved. | 4 * reserved. |
5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1852 bool isInheritedProperty) const { | 1852 bool isInheritedProperty) const { |
1853 if (isInheritedProperty) { | 1853 if (isInheritedProperty) { |
1854 return inheritedVariables() ? inheritedVariables()->registeredVariable(name) | 1854 return inheritedVariables() ? inheritedVariables()->registeredVariable(name) |
1855 : nullptr; | 1855 : nullptr; |
1856 } | 1856 } |
1857 return nonInheritedVariables() | 1857 return nonInheritedVariables() |
1858 ? nonInheritedVariables()->registeredVariable(name) | 1858 ? nonInheritedVariables()->registeredVariable(name) |
1859 : nullptr; | 1859 : nullptr; |
1860 } | 1860 } |
1861 | 1861 |
| 1862 const CSSValue* ComputedStyle::getRegisteredVariable( |
| 1863 const AtomicString& name) const { |
| 1864 // Registered custom properties are by default non-inheriting so check there |
| 1865 // first. |
| 1866 const CSSValue* result = getRegisteredVariable(name, false); |
| 1867 if (result) { |
| 1868 return result; |
| 1869 } |
| 1870 return getRegisteredVariable(name, true); |
| 1871 } |
| 1872 |
1862 float ComputedStyle::wordSpacing() const { | 1873 float ComputedStyle::wordSpacing() const { |
1863 return getFontDescription().wordSpacing(); | 1874 return getFontDescription().wordSpacing(); |
1864 } | 1875 } |
1865 float ComputedStyle::letterSpacing() const { | 1876 float ComputedStyle::letterSpacing() const { |
1866 return getFontDescription().letterSpacing(); | 1877 return getFontDescription().letterSpacing(); |
1867 } | 1878 } |
1868 | 1879 |
1869 bool ComputedStyle::setFontDescription(const FontDescription& v) { | 1880 bool ComputedStyle::setFontDescription(const FontDescription& v) { |
1870 if (m_styleInheritedData->font.getFontDescription() != v) { | 1881 if (m_styleInheritedData->font.getFontDescription() != v) { |
1871 m_styleInheritedData.access()->font = Font(v); | 1882 m_styleInheritedData.access()->font = Font(v); |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2488 if (value < 0) | 2499 if (value < 0) |
2489 fvalue -= 0.5f; | 2500 fvalue -= 0.5f; |
2490 else | 2501 else |
2491 fvalue += 0.5f; | 2502 fvalue += 0.5f; |
2492 } | 2503 } |
2493 | 2504 |
2494 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2505 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
2495 } | 2506 } |
2496 | 2507 |
2497 } // namespace blink | 2508 } // namespace blink |
OLD | NEW |