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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 selectorTextCache().remove(this); | 106 selectorTextCache().remove(this); |
107 setHasCachedSelectorText(false); | 107 setHasCachedSelectorText(false); |
108 } | 108 } |
109 } | 109 } |
110 | 110 |
111 String CSSStyleRule::cssText() const | 111 String CSSStyleRule::cssText() const |
112 { | 112 { |
113 StringBuilder result; | 113 StringBuilder result; |
114 result.append(selectorText()); | 114 result.append(selectorText()); |
115 result.appendLiteral(" { "); | 115 result.appendLiteral(" { "); |
116 String decls = m_styleRule->properties()->asText(); | 116 String decls = m_styleRule->properties().asText(); |
117 result.append(decls); | 117 result.append(decls); |
118 if (!decls.isEmpty()) | 118 if (!decls.isEmpty()) |
119 result.append(' '); | 119 result.append(' '); |
120 result.append('}'); | 120 result.append('}'); |
121 return result.toString(); | 121 return result.toString(); |
122 } | 122 } |
123 | 123 |
124 void CSSStyleRule::reattach(StyleRuleBase* rule) | 124 void CSSStyleRule::reattach(StyleRuleBase* rule) |
125 { | 125 { |
126 ASSERT(rule); | 126 ASSERT(rule); |
127 m_styleRule = toStyleRule(rule); | 127 m_styleRule = toStyleRule(rule); |
128 if (m_propertiesCSSOMWrapper) | 128 if (m_propertiesCSSOMWrapper) |
129 m_propertiesCSSOMWrapper->reattach(m_styleRule->mutableProperties()); | 129 m_propertiesCSSOMWrapper->reattach(m_styleRule->mutableProperties()); |
130 } | 130 } |
131 | 131 |
132 void CSSStyleRule::trace(Visitor* visitor) | 132 void CSSStyleRule::trace(Visitor* visitor) |
133 { | 133 { |
134 visitor->trace(m_styleRule); | 134 visitor->trace(m_styleRule); |
135 CSSRule::trace(visitor); | 135 CSSRule::trace(visitor); |
136 } | 136 } |
137 | 137 |
138 } // namespace WebCore | 138 } // namespace WebCore |
OLD | NEW |