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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 return; | 105 return; |
106 | 106 |
107 String oldSelectorText = this->selectorText(); | 107 String oldSelectorText = this->selectorText(); |
108 m_styleRule->adoptSelectorList(selectorList); | 108 m_styleRule->adoptSelectorList(selectorList); |
109 | 109 |
110 if (hasCachedSelectorText()) { | 110 if (hasCachedSelectorText()) { |
111 ASSERT(selectorTextCache().contains(this)); | 111 ASSERT(selectorTextCache().contains(this)); |
112 selectorTextCache().set(this, generateSelectorText()); | 112 selectorTextCache().set(this, generateSelectorText()); |
113 } | 113 } |
114 | 114 |
115 if (this->selectorText() == oldSelectorText) | |
116 return; | |
117 | |
118 doc->styleSelectorChanged(DeferRecalcStyle); | 115 doc->styleSelectorChanged(DeferRecalcStyle); |
119 } | 116 } |
120 | 117 |
121 String CSSStyleRule::cssText() const | 118 String CSSStyleRule::cssText() const |
122 { | 119 { |
123 String result = selectorText(); | 120 String result = selectorText(); |
124 | 121 |
125 result += " { "; | 122 result += " { "; |
126 result += m_styleRule->properties()->asText(); | 123 result += m_styleRule->properties()->asText(); |
127 result += "}"; | 124 result += "}"; |
128 | 125 |
129 return result; | 126 return result; |
130 } | 127 } |
131 | 128 |
132 } // namespace WebCore | 129 } // namespace WebCore |
OLD | NEW |