Changeset 60687 in webkit
- Timestamp:
- Jun 4, 2010 10:23:10 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r60684 r60687 1 2010-06-04 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 WebInspector: Web Inspector: it would be better to push object properties to JSON string in order of insertion. 6 https://bugs.webkit.org/show_bug.cgi?id=40140 7 8 * inspector/InspectorValues.cpp: 9 (WebCore::InspectorObject::writeJSON): 10 * inspector/InspectorValues.h: 11 (WebCore::InspectorObject::setBool): 12 (WebCore::InspectorObject::setNumber): 13 (WebCore::InspectorObject::setString): 14 (WebCore::InspectorObject::set): 15 1 16 2010-06-04 Tony Gentilcore <tonyg@chromium.org> 2 17 -
trunk/WebCore/inspector/InspectorValues.cpp
r60452 r60687 109 109 { 110 110 output->append('{'); 111 for (Dictionary::const_iterator it = m_data.begin(); it != m_data.end(); ++it) { 111 for (size_t i = 0; i < m_order.size(); ++i) { 112 Dictionary::const_iterator it = m_data.find(m_order[i]); 113 ASSERT(it != m_data.end()); 112 114 if (it != m_data.begin()) 113 115 output->append(','); -
trunk/WebCore/inspector/InspectorValues.h
r60452 r60687 146 146 typedef HashMap<String, RefPtr<InspectorValue> > Dictionary; 147 147 Dictionary m_data; 148 Vector<String> m_order; 148 149 }; 149 150 … … 171 172 inline void InspectorObject::setBool(const String& name, bool value) 172 173 { 173 m_data.set(name, InspectorBasicValue::create(value));174 set(name, InspectorBasicValue::create(value)); 174 175 } 175 176 176 177 inline void InspectorObject::setNumber(const String& name, double value) 177 178 { 178 m_data.set(name, InspectorBasicValue::create(value));179 set(name, InspectorBasicValue::create(value)); 179 180 } 180 181 181 182 inline void InspectorObject::setString(const String& name, const String& value) 182 183 { 183 m_data.set(name, InspectorString::create(value));184 set(name, InspectorString::create(value)); 184 185 } 185 186 186 187 inline void InspectorObject::set(const String& name, PassRefPtr<InspectorValue> value) 187 188 { 188 m_data.set(name, value); 189 if (m_data.set(name, value).second) 190 m_order.append(name); 189 191 } 190 192
Note: See TracChangeset
for help on using the changeset viewer.