| 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 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 bool isInheritedProperty) const { | 1862 bool isInheritedProperty) const { |
| 1863 if (isInheritedProperty) { | 1863 if (isInheritedProperty) { |
| 1864 return inheritedVariables() ? inheritedVariables()->registeredVariable(name) | 1864 return inheritedVariables() ? inheritedVariables()->registeredVariable(name) |
| 1865 : nullptr; | 1865 : nullptr; |
| 1866 } | 1866 } |
| 1867 return nonInheritedVariables() | 1867 return nonInheritedVariables() |
| 1868 ? nonInheritedVariables()->registeredVariable(name) | 1868 ? nonInheritedVariables()->registeredVariable(name) |
| 1869 : nullptr; | 1869 : nullptr; |
| 1870 } | 1870 } |
| 1871 | 1871 |
| 1872 const CSSValue* ComputedStyle::getRegisteredVariable( |
| 1873 const AtomicString& name) const { |
| 1874 // Registered custom properties are by default non-inheriting so check there |
| 1875 // first. |
| 1876 const CSSValue* result = getRegisteredVariable(name, false); |
| 1877 if (result) { |
| 1878 return result; |
| 1879 } |
| 1880 return getRegisteredVariable(name, true); |
| 1881 } |
| 1882 |
| 1872 float ComputedStyle::wordSpacing() const { | 1883 float ComputedStyle::wordSpacing() const { |
| 1873 return getFontDescription().wordSpacing(); | 1884 return getFontDescription().wordSpacing(); |
| 1874 } | 1885 } |
| 1875 float ComputedStyle::letterSpacing() const { | 1886 float ComputedStyle::letterSpacing() const { |
| 1876 return getFontDescription().letterSpacing(); | 1887 return getFontDescription().letterSpacing(); |
| 1877 } | 1888 } |
| 1878 | 1889 |
| 1879 bool ComputedStyle::setFontDescription(const FontDescription& v) { | 1890 bool ComputedStyle::setFontDescription(const FontDescription& v) { |
| 1880 if (m_styleInheritedData->font.getFontDescription() != v) { | 1891 if (m_styleInheritedData->font.getFontDescription() != v) { |
| 1881 m_styleInheritedData.access()->font = Font(v); | 1892 m_styleInheritedData.access()->font = Font(v); |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2498 if (value < 0) | 2509 if (value < 0) |
| 2499 fvalue -= 0.5f; | 2510 fvalue -= 0.5f; |
| 2500 else | 2511 else |
| 2501 fvalue += 0.5f; | 2512 fvalue += 0.5f; |
| 2502 } | 2513 } |
| 2503 | 2514 |
| 2504 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2515 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 2505 } | 2516 } |
| 2506 | 2517 |
| 2507 } // namespace blink | 2518 } // namespace blink |
| OLD | NEW |