| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |