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

Side by Side Diff: WebCore/inspector/InspectorCSSAgent.cpp

Issue 5446003: Merge 72938 - 2010-11-30 Pavel Feldman <pfeldman@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years 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 | « WebCore/inspector/InspectorCSSAgent.h ('k') | WebCore/inspector/InspectorStyleSheet.cpp » ('j') | 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 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 278
279 void InspectorCSSAgent::getStyleSheetText2(const String& styleSheetId, String* u rl, String* result) 279 void InspectorCSSAgent::getStyleSheetText2(const String& styleSheetId, String* u rl, String* result)
280 { 280 {
281 InspectorStyleSheet* inspectorStyleSheet = styleSheetForId(styleSheetId); 281 InspectorStyleSheet* inspectorStyleSheet = styleSheetForId(styleSheetId);
282 if (!inspectorStyleSheet) 282 if (!inspectorStyleSheet)
283 return; 283 return;
284 *url = inspectorStyleSheet->finalURL(); 284 *url = inspectorStyleSheet->finalURL();
285 inspectorStyleSheet->text(result); 285 inspectorStyleSheet->text(result);
286 } 286 }
287 287
288 void InspectorCSSAgent::setStyleSheetText2(const String& styleSheetId, const Str ing& text) 288 void InspectorCSSAgent::setStyleSheetText2(const String& styleSheetId, const Str ing& text, bool* success)
289 { 289 {
290 InspectorStyleSheet* inspectorStyleSheet = styleSheetForId(styleSheetId); 290 InspectorStyleSheet* inspectorStyleSheet = styleSheetForId(styleSheetId);
291 if (!inspectorStyleSheet) 291 if (!inspectorStyleSheet) {
292 *success = false;
292 return; 293 return;
294 }
293 295
294 bool success = inspectorStyleSheet->setText(text); 296 *success = inspectorStyleSheet->setText(text);
295 if (success) 297 if (*success)
296 inspectorStyleSheet->reparseStyleSheet(text); 298 inspectorStyleSheet->reparseStyleSheet(text);
297 } 299 }
298 300
299 void InspectorCSSAgent::setPropertyText2(const RefPtr<InspectorObject>& fullStyl eId, long propertyIndex, const String& text, bool overwrite, RefPtr<InspectorVal ue>* result) 301 void InspectorCSSAgent::setPropertyText2(const RefPtr<InspectorObject>& fullStyl eId, long propertyIndex, const String& text, bool overwrite, RefPtr<InspectorVal ue>* result)
300 { 302 {
301 InspectorCSSId compoundId(fullStyleId); 303 InspectorCSSId compoundId(fullStyleId);
302 ASSERT(!compoundId.isEmpty()); 304 ASSERT(!compoundId.isEmpty());
303 305
304 InspectorStyleSheet* inspectorStyleSheet = styleSheetForId(compoundId.styleS heetId()); 306 InspectorStyleSheet* inspectorStyleSheet = styleSheetForId(compoundId.styleS heetId());
305 if (!inspectorStyleSheet) 307 if (!inspectorStyleSheet)
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 if (it == m_nodeToInspectorStyleSheet.end()) 538 if (it == m_nodeToInspectorStyleSheet.end())
537 return; 539 return;
538 540
539 m_idToInspectorStyleSheet.remove(it->second->id()); 541 m_idToInspectorStyleSheet.remove(it->second->id());
540 m_nodeToInspectorStyleSheet.remove(node); 542 m_nodeToInspectorStyleSheet.remove(node);
541 } 543 }
542 544
543 } // namespace WebCore 545 } // namespace WebCore
544 546
545 #endif // ENABLE(INSPECTOR) 547 #endif // ENABLE(INSPECTOR)
OLDNEW
« no previous file with comments | « WebCore/inspector/InspectorCSSAgent.h ('k') | WebCore/inspector/InspectorStyleSheet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698