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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 ASSERT(m_frontend); | 388 ASSERT(m_frontend); |
389 ErrorString error; | 389 ErrorString error; |
390 disable(&error); | 390 disable(&error); |
391 m_frontend = 0; | 391 m_frontend = 0; |
392 resetNonPersistentData(); | 392 resetNonPersistentData(); |
393 } | 393 } |
394 | 394 |
395 void InspectorCSSAgent::discardAgent() | 395 void InspectorCSSAgent::discardAgent() |
396 { | 396 { |
397 m_domAgent->setDOMListener(0); | 397 m_domAgent->setDOMListener(0); |
398 m_domAgent = 0; | 398 m_domAgent = nullptr; |
399 } | 399 } |
400 | 400 |
401 void InspectorCSSAgent::restore() | 401 void InspectorCSSAgent::restore() |
402 { | 402 { |
403 if (m_state->getBoolean(CSSAgentState::cssAgentEnabled)) | 403 if (m_state->getBoolean(CSSAgentState::cssAgentEnabled)) |
404 wasEnabled(nullptr); | 404 wasEnabled(nullptr); |
405 } | 405 } |
406 | 406 |
407 void InspectorCSSAgent::flushPendingFrontendMessages() | 407 void InspectorCSSAgent::flushPendingFrontendMessages() |
408 { | 408 { |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 removedSheets.remove(cssStyleSheet); | 570 removedSheets.remove(cssStyleSheet); |
571 if (isInitialFrontendLoad) | 571 if (isInitialFrontendLoad) |
572 addedSheets.add(cssStyleSheet); | 572 addedSheets.add(cssStyleSheet); |
573 } else { | 573 } else { |
574 addedSheets.add(cssStyleSheet); | 574 addedSheets.add(cssStyleSheet); |
575 } | 575 } |
576 } | 576 } |
577 | 577 |
578 for (HashSet<CSSStyleSheet*>::iterator it = removedSheets.begin(); it != rem
ovedSheets.end(); ++it) { | 578 for (HashSet<CSSStyleSheet*>::iterator it = removedSheets.begin(); it != rem
ovedSheets.end(); ++it) { |
579 CSSStyleSheet* cssStyleSheet = *it; | 579 CSSStyleSheet* cssStyleSheet = *it; |
580 RefPtr<InspectorStyleSheet> inspectorStyleSheet = m_cssStyleSheetToInspe
ctorStyleSheet.get(cssStyleSheet); | 580 RefPtrWillBeRawPtr<InspectorStyleSheet> inspectorStyleSheet = m_cssStyle
SheetToInspectorStyleSheet.get(cssStyleSheet); |
581 ASSERT(inspectorStyleSheet); | 581 ASSERT(inspectorStyleSheet); |
582 | 582 |
583 documentCSSStyleSheets->remove(cssStyleSheet); | 583 documentCSSStyleSheets->remove(cssStyleSheet); |
584 if (m_idToInspectorStyleSheet.contains(inspectorStyleSheet->id())) { | 584 if (m_idToInspectorStyleSheet.contains(inspectorStyleSheet->id())) { |
585 String id = unbindStyleSheet(inspectorStyleSheet.get()); | 585 String id = unbindStyleSheet(inspectorStyleSheet.get()); |
586 if (m_frontend && !isInitialFrontendLoad) | 586 if (m_frontend && !isInitialFrontendLoad) |
587 m_frontend->styleSheetRemoved(id); | 587 m_frontend->styleSheetRemoved(id); |
588 } | 588 } |
589 } | 589 } |
590 | 590 |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 Element* element = toElement(m_domAgent->nodeForId(it->key)); | 1445 Element* element = toElement(m_domAgent->nodeForId(it->key)); |
1446 if (element && element->ownerDocument()) | 1446 if (element && element->ownerDocument()) |
1447 documentsToChange.add(element->ownerDocument()); | 1447 documentsToChange.add(element->ownerDocument()); |
1448 } | 1448 } |
1449 | 1449 |
1450 m_nodeIdToForcedPseudoState.clear(); | 1450 m_nodeIdToForcedPseudoState.clear(); |
1451 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) | 1451 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) |
1452 (*it)->setNeedsStyleRecalc(SubtreeStyleChange); | 1452 (*it)->setNeedsStyleRecalc(SubtreeStyleChange); |
1453 } | 1453 } |
1454 | 1454 |
| 1455 void InspectorCSSAgent::trace(Visitor* visitor) |
| 1456 { |
| 1457 visitor->trace(m_domAgent); |
| 1458 visitor->trace(m_pageAgent); |
| 1459 visitor->trace(m_resourceAgent); |
| 1460 visitor->trace(m_documentToViaInspectorStyleSheet); |
| 1461 visitor->trace(m_inspectorUserAgentStyleSheet); |
| 1462 InspectorBaseAgent::trace(visitor); |
| 1463 } |
| 1464 |
1455 } // namespace WebCore | 1465 } // namespace WebCore |
1456 | 1466 |
OLD | NEW |