Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: Source/WebCore/css/CSSStyleRule.cpp

Issue 10163021: Merge 113099 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/css/css-set-selector-text-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/css-set-selector-text-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698