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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 | 404 |
405 void InspectorCSSAgent::setFrontend(InspectorFrontend* frontend) | 405 void InspectorCSSAgent::setFrontend(InspectorFrontend* frontend) |
406 { | 406 { |
407 ASSERT(!m_frontend); | 407 ASSERT(!m_frontend); |
408 m_frontend = frontend->css(); | 408 m_frontend = frontend->css(); |
409 } | 409 } |
410 | 410 |
411 void InspectorCSSAgent::clearFrontend() | 411 void InspectorCSSAgent::clearFrontend() |
412 { | 412 { |
413 ASSERT(m_frontend); | 413 ASSERT(m_frontend); |
| 414 ErrorString error; |
| 415 disable(&error); |
414 m_frontend = 0; | 416 m_frontend = 0; |
415 resetNonPersistentData(); | 417 resetNonPersistentData(); |
416 } | 418 } |
417 | 419 |
418 void InspectorCSSAgent::discardAgent() | 420 void InspectorCSSAgent::discardAgent() |
419 { | 421 { |
420 m_domAgent->setDOMListener(0); | 422 m_domAgent->setDOMListener(0); |
421 m_domAgent = 0; | 423 m_domAgent = 0; |
422 } | 424 } |
423 | 425 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 Vector<Document*> documents = m_domAgent->documents(); | 502 Vector<Document*> documents = m_domAgent->documents(); |
501 for (Vector<Document*>::iterator it = documents.begin(); it != documents.end
(); ++it) | 503 for (Vector<Document*>::iterator it = documents.begin(); it != documents.end
(); ++it) |
502 updateActiveStyleSheets(*it, InitialFrontendLoad); | 504 updateActiveStyleSheets(*it, InitialFrontendLoad); |
503 | 505 |
504 if (callback) | 506 if (callback) |
505 callback->sendSuccess(); | 507 callback->sendSuccess(); |
506 } | 508 } |
507 | 509 |
508 void InspectorCSSAgent::disable(ErrorString*) | 510 void InspectorCSSAgent::disable(ErrorString*) |
509 { | 511 { |
| 512 reset(); |
510 m_instrumentingAgents->setInspectorCSSAgent(0); | 513 m_instrumentingAgents->setInspectorCSSAgent(0); |
511 m_state->setBoolean(CSSAgentState::cssAgentEnabled, false); | 514 m_state->setBoolean(CSSAgentState::cssAgentEnabled, false); |
512 } | 515 } |
513 | 516 |
514 void InspectorCSSAgent::didCommitLoadForMainFrame() | 517 void InspectorCSSAgent::didCommitLoadForMainFrame() |
515 { | 518 { |
516 reset(); | 519 reset(); |
517 } | 520 } |
518 | 521 |
519 void InspectorCSSAgent::mediaQueryResultChanged() | 522 void InspectorCSSAgent::mediaQueryResultChanged() |
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 documentsToChange.add(element->ownerDocument()); | 1357 documentsToChange.add(element->ownerDocument()); |
1355 } | 1358 } |
1356 | 1359 |
1357 m_nodeIdToForcedPseudoState.clear(); | 1360 m_nodeIdToForcedPseudoState.clear(); |
1358 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) | 1361 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) |
1359 (*it)->setNeedsStyleRecalc(SubtreeStyleChange); | 1362 (*it)->setNeedsStyleRecalc(SubtreeStyleChange); |
1360 } | 1363 } |
1361 | 1364 |
1362 } // namespace WebCore | 1365 } // namespace WebCore |
1363 | 1366 |
OLD | NEW |