OLD | NEW |
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) | 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) |
4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. 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 30 matching lines...) Expand all Loading... |
41 CSSStyleDeclaration* CSSFontFaceRule::style() const | 41 CSSStyleDeclaration* CSSFontFaceRule::style() const |
42 { | 42 { |
43 if (!m_propertiesCSSOMWrapper) | 43 if (!m_propertiesCSSOMWrapper) |
44 m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_fontFa
ceRule->mutableProperties(), const_cast<CSSFontFaceRule*>(this)); | 44 m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_fontFa
ceRule->mutableProperties(), const_cast<CSSFontFaceRule*>(this)); |
45 return m_propertiesCSSOMWrapper.get(); | 45 return m_propertiesCSSOMWrapper.get(); |
46 } | 46 } |
47 | 47 |
48 String CSSFontFaceRule::cssText() const | 48 String CSSFontFaceRule::cssText() const |
49 { | 49 { |
50 StringBuilder result; | 50 StringBuilder result; |
51 result.appendLiteral("@font-face { "); | 51 result.append("@font-face { "); |
52 String descs = m_fontFaceRule->properties().asText(); | 52 String descs = m_fontFaceRule->properties().asText(); |
53 result.append(descs); | 53 result.append(descs); |
54 if (!descs.isEmpty()) | 54 if (!descs.isEmpty()) |
55 result.append(' '); | 55 result.append(' '); |
56 result.append('}'); | 56 result.append('}'); |
57 return result.toString(); | 57 return result.toString(); |
58 } | 58 } |
59 | 59 |
60 void CSSFontFaceRule::reattach(StyleRuleBase* rule) | 60 void CSSFontFaceRule::reattach(StyleRuleBase* rule) |
61 { | 61 { |
62 ASSERT(rule); | 62 ASSERT(rule); |
63 m_fontFaceRule = toStyleRuleFontFace(rule); | 63 m_fontFaceRule = toStyleRuleFontFace(rule); |
64 if (m_propertiesCSSOMWrapper) | 64 if (m_propertiesCSSOMWrapper) |
65 m_propertiesCSSOMWrapper->reattach(m_fontFaceRule->mutableProperties()); | 65 m_propertiesCSSOMWrapper->reattach(m_fontFaceRule->mutableProperties()); |
66 } | 66 } |
67 | 67 |
68 DEFINE_TRACE(CSSFontFaceRule) | 68 DEFINE_TRACE(CSSFontFaceRule) |
69 { | 69 { |
70 visitor->trace(m_fontFaceRule); | 70 visitor->trace(m_fontFaceRule); |
71 visitor->trace(m_propertiesCSSOMWrapper); | 71 visitor->trace(m_propertiesCSSOMWrapper); |
72 CSSRule::trace(visitor); | 72 CSSRule::trace(visitor); |
73 } | 73 } |
74 | 74 |
75 } // namespace blink | 75 } // namespace blink |
OLD | NEW |