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 Apple Inc. All rights reserved. | 4 * Copyright (C) 2002, 2005, 2006, 2008 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 return; | 110 return; |
111 | 111 |
112 String oldSelectorText = this->selectorText(); | 112 String oldSelectorText = this->selectorText(); |
113 m_selectorList.adopt(selectorList); | 113 m_selectorList.adopt(selectorList); |
114 | 114 |
115 if (hasCachedSelectorText()) { | 115 if (hasCachedSelectorText()) { |
116 ASSERT(selectorTextCache().contains(this)); | 116 ASSERT(selectorTextCache().contains(this)); |
117 selectorTextCache().set(this, generateSelectorText()); | 117 selectorTextCache().set(this, generateSelectorText()); |
118 } | 118 } |
119 | 119 |
120 if (this->selectorText() == oldSelectorText) | |
121 return; | |
122 | |
123 doc->styleSelectorChanged(DeferRecalcStyle); | 120 doc->styleSelectorChanged(DeferRecalcStyle); |
124 } | 121 } |
125 | 122 |
126 String CSSStyleRule::cssText() const | 123 String CSSStyleRule::cssText() const |
127 { | 124 { |
128 String result = selectorText(); | 125 String result = selectorText(); |
129 | 126 |
130 result += " { "; | 127 result += " { "; |
131 result += m_style->asText(); | 128 result += m_style->asText(); |
132 result += "}"; | 129 result += "}"; |
133 | 130 |
134 return result; | 131 return result; |
135 } | 132 } |
136 | 133 |
137 void CSSStyleRule::addSubresourceStyleURLs(ListHashSet<KURL>& urls) | 134 void CSSStyleRule::addSubresourceStyleURLs(ListHashSet<KURL>& urls) |
138 { | 135 { |
139 if (m_style) | 136 if (m_style) |
140 m_style->addSubresourceStyleURLs(urls); | 137 m_style->addSubresourceStyleURLs(urls); |
141 } | 138 } |
142 | 139 |
143 } // namespace WebCore | 140 } // namespace WebCore |
OLD | NEW |