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

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

Issue 10198001: Merge 113099 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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