| 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 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1241 InlineStyleOverrideScope overrideScope(document); | 1241 InlineStyleOverrideScope overrideScope(document); |
| 1242 m_creatingViaInspectorStyleSheet = true; | 1242 m_creatingViaInspectorStyleSheet = true; |
| 1243 targetNode->appendChild(styleElement, ec); | 1243 targetNode->appendChild(styleElement, ec); |
| 1244 // At this point the added stylesheet will get bound through the updateA
ctiveStyleSheets() invocation. | 1244 // At this point the added stylesheet will get bound through the updateA
ctiveStyleSheets() invocation. |
| 1245 // We just need to pick the respective InspectorStyleSheet from m_docume
ntToInspectorStyleSheet. | 1245 // We just need to pick the respective InspectorStyleSheet from m_docume
ntToInspectorStyleSheet. |
| 1246 m_creatingViaInspectorStyleSheet = false; | 1246 m_creatingViaInspectorStyleSheet = false; |
| 1247 } | 1247 } |
| 1248 if (ec) | 1248 if (ec) |
| 1249 return 0; | 1249 return 0; |
| 1250 | 1250 |
| 1251 return m_documentToInspectorStyleSheet.get(document).get(); | 1251 return m_documentToInspectorStyleSheet.get(document); |
| 1252 } | 1252 } |
| 1253 | 1253 |
| 1254 InspectorStyleSheet* InspectorCSSAgent::assertStyleSheetForId(ErrorString* error
String, const String& styleSheetId) | 1254 InspectorStyleSheet* InspectorCSSAgent::assertStyleSheetForId(ErrorString* error
String, const String& styleSheetId) |
| 1255 { | 1255 { |
| 1256 IdToInspectorStyleSheet::iterator it = m_idToInspectorStyleSheet.find(styleS
heetId); | 1256 IdToInspectorStyleSheet::iterator it = m_idToInspectorStyleSheet.find(styleS
heetId); |
| 1257 if (it == m_idToInspectorStyleSheet.end()) { | 1257 if (it == m_idToInspectorStyleSheet.end()) { |
| 1258 *errorString = "No style sheet with given id found"; | 1258 *errorString = "No style sheet with given id found"; |
| 1259 return 0; | 1259 return 0; |
| 1260 } | 1260 } |
| 1261 return it->value.get(); | 1261 return it->value.get(); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1458 documentsToChange.add(element->ownerDocument()); | 1458 documentsToChange.add(element->ownerDocument()); |
| 1459 } | 1459 } |
| 1460 | 1460 |
| 1461 m_nodeIdToForcedPseudoState.clear(); | 1461 m_nodeIdToForcedPseudoState.clear(); |
| 1462 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) | 1462 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) |
| 1463 (*it)->styleResolverChanged(RecalcStyleImmediately); | 1463 (*it)->styleResolverChanged(RecalcStyleImmediately); |
| 1464 } | 1464 } |
| 1465 | 1465 |
| 1466 } // namespace WebCore | 1466 } // namespace WebCore |
| 1467 | 1467 |
| OLD | NEW |