| 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 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 } | 1309 } |
| 1310 } | 1310 } |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 InspectorStyleSheet* InspectorCSSAgent::bindStyleSheet(CSSStyleSheet* styleSheet
) | 1313 InspectorStyleSheet* InspectorCSSAgent::bindStyleSheet(CSSStyleSheet* styleSheet
) |
| 1314 { | 1314 { |
| 1315 RefPtrWillBeRawPtr<InspectorStyleSheet> inspectorStyleSheet = m_cssStyleShee
tToInspectorStyleSheet.get(styleSheet); | 1315 RefPtrWillBeRawPtr<InspectorStyleSheet> inspectorStyleSheet = m_cssStyleShee
tToInspectorStyleSheet.get(styleSheet); |
| 1316 if (!inspectorStyleSheet) { | 1316 if (!inspectorStyleSheet) { |
| 1317 String id = String::number(m_lastStyleSheetId++); | 1317 String id = String::number(m_lastStyleSheetId++); |
| 1318 Document* document = styleSheet->ownerDocument(); | 1318 Document* document = styleSheet->ownerDocument(); |
| 1319 inspectorStyleSheet = InspectorStyleSheet::create(m_pageAgent, m_resourc
eAgent, id, styleSheet, detectOrigin(styleSheet, document), InspectorDOMAgent::d
ocumentURLString(document), this); | 1319 inspectorStyleSheet = InspectorStyleSheet::create(m_resourceAgent, id, s
tyleSheet, detectOrigin(styleSheet, document), InspectorDOMAgent::documentURLStr
ing(document), this); |
| 1320 m_idToInspectorStyleSheet.set(id, inspectorStyleSheet); | 1320 m_idToInspectorStyleSheet.set(id, inspectorStyleSheet); |
| 1321 m_cssStyleSheetToInspectorStyleSheet.set(styleSheet, inspectorStyleSheet
); | 1321 m_cssStyleSheetToInspectorStyleSheet.set(styleSheet, inspectorStyleSheet
); |
| 1322 if (m_creatingViaInspectorStyleSheet) | 1322 if (m_creatingViaInspectorStyleSheet) |
| 1323 m_documentToViaInspectorStyleSheet.add(document, inspectorStyleSheet
); | 1323 m_documentToViaInspectorStyleSheet.add(document, inspectorStyleSheet
); |
| 1324 } | 1324 } |
| 1325 return inspectorStyleSheet.get(); | 1325 return inspectorStyleSheet.get(); |
| 1326 } | 1326 } |
| 1327 | 1327 |
| 1328 String InspectorCSSAgent::unbindStyleSheet(InspectorStyleSheet* inspectorStyleSh
eet) | 1328 String InspectorCSSAgent::unbindStyleSheet(InspectorStyleSheet* inspectorStyleSh
eet) |
| 1329 { | 1329 { |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 visitor->trace(m_invalidatedDocuments); | 1576 visitor->trace(m_invalidatedDocuments); |
| 1577 visitor->trace(m_nodeToInspectorStyleSheet); | 1577 visitor->trace(m_nodeToInspectorStyleSheet); |
| 1578 visitor->trace(m_documentToViaInspectorStyleSheet); | 1578 visitor->trace(m_documentToViaInspectorStyleSheet); |
| 1579 #endif | 1579 #endif |
| 1580 visitor->trace(m_inspectorUserAgentStyleSheet); | 1580 visitor->trace(m_inspectorUserAgentStyleSheet); |
| 1581 InspectorBaseAgent::trace(visitor); | 1581 InspectorBaseAgent::trace(visitor); |
| 1582 } | 1582 } |
| 1583 | 1583 |
| 1584 } // namespace blink | 1584 } // namespace blink |
| 1585 | 1585 |
| OLD | NEW |