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
reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 return empty; | 1238 return empty; |
1239 } | 1239 } |
1240 if (inherited_flags.m_textUnderline) { | 1240 if (inherited_flags.m_textUnderline) { |
1241 DEFINE_STATIC_LOCAL(Vector<AppliedTextDecoration>, underline, (1, Applie
dTextDecoration(TextDecorationUnderline))); | 1241 DEFINE_STATIC_LOCAL(Vector<AppliedTextDecoration>, underline, (1, Applie
dTextDecoration(TextDecorationUnderline))); |
1242 return underline; | 1242 return underline; |
1243 } | 1243 } |
1244 | 1244 |
1245 return rareInheritedData->appliedTextDecorations->vector(); | 1245 return rareInheritedData->appliedTextDecorations->vector(); |
1246 } | 1246 } |
1247 | 1247 |
| 1248 void ComputedStyle::createVariables() |
| 1249 { |
| 1250 RefPtr<StyleVariableData>& variables = rareInheritedData.access()->variables
; |
| 1251 if (!variables) |
| 1252 variables = StyleVariableData::create(); |
| 1253 } |
| 1254 |
| 1255 StyleVariableData* ComputedStyle::variables() const |
| 1256 { |
| 1257 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); |
| 1258 return rareInheritedData->variables.get(); |
| 1259 } |
| 1260 |
| 1261 void ComputedStyle::setVariables(PassRefPtr<StyleVariableData> variableData) |
| 1262 { |
| 1263 rareInheritedData.access()->variables = variableData; |
| 1264 } |
| 1265 |
1248 float ComputedStyle::wordSpacing() const { return fontDescription().wordSpacing(
); } | 1266 float ComputedStyle::wordSpacing() const { return fontDescription().wordSpacing(
); } |
1249 float ComputedStyle::letterSpacing() const { return fontDescription().letterSpac
ing(); } | 1267 float ComputedStyle::letterSpacing() const { return fontDescription().letterSpac
ing(); } |
1250 | 1268 |
1251 bool ComputedStyle::setFontDescription(const FontDescription& v) | 1269 bool ComputedStyle::setFontDescription(const FontDescription& v) |
1252 { | 1270 { |
1253 if (inherited->font.fontDescription() != v) { | 1271 if (inherited->font.fontDescription() != v) { |
1254 inherited.access()->font = Font(v); | 1272 inherited.access()->font = Font(v); |
1255 return true; | 1273 return true; |
1256 } | 1274 } |
1257 return false; | 1275 return false; |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1768 } | 1786 } |
1769 | 1787 |
1770 void ComputedStyle::copyChildDependentFlagsFrom(const ComputedStyle& other) | 1788 void ComputedStyle::copyChildDependentFlagsFrom(const ComputedStyle& other) |
1771 { | 1789 { |
1772 setEmptyState(other.emptyState()); | 1790 setEmptyState(other.emptyState()); |
1773 if (other.hasExplicitlyInheritedProperties()) | 1791 if (other.hasExplicitlyInheritedProperties()) |
1774 setHasExplicitlyInheritedProperties(); | 1792 setHasExplicitlyInheritedProperties(); |
1775 } | 1793 } |
1776 | 1794 |
1777 } // namespace blink | 1795 } // namespace blink |
OLD | NEW |