| 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 } | 413 } |
| 414 | 414 |
| 415 void InspectorCSSAgent::enable(ErrorString*, PassRefPtr<EnableCallback> prpCallb
ack) | 415 void InspectorCSSAgent::enable(ErrorString*, PassRefPtr<EnableCallback> prpCallb
ack) |
| 416 { | 416 { |
| 417 m_state->setBoolean(CSSAgentState::cssAgentEnabled, true); | 417 m_state->setBoolean(CSSAgentState::cssAgentEnabled, true); |
| 418 if (!m_pageAgent->resourceContentLoader()) { | 418 if (!m_pageAgent->resourceContentLoader()) { |
| 419 wasEnabled(); | 419 wasEnabled(); |
| 420 prpCallback->sendSuccess(); | 420 prpCallback->sendSuccess(); |
| 421 return; | 421 return; |
| 422 } | 422 } |
| 423 m_pageAgent->resourceContentLoader()->addListener(adoptPtr(new InspectorCSSA
gent::InspectorResourceContentLoaderCallback(this, prpCallback))); | 423 m_pageAgent->resourceContentLoader()->ensureResourcesContentLoaded(adoptPtr(
new InspectorCSSAgent::InspectorResourceContentLoaderCallback(this, prpCallback)
)); |
| 424 } | 424 } |
| 425 | 425 |
| 426 void InspectorCSSAgent::wasEnabled() | 426 void InspectorCSSAgent::wasEnabled() |
| 427 { | 427 { |
| 428 if (!m_state->getBoolean(CSSAgentState::cssAgentEnabled)) { | 428 if (!m_state->getBoolean(CSSAgentState::cssAgentEnabled)) { |
| 429 // We were disabled while fetching resources. | 429 // We were disabled while fetching resources. |
| 430 return; | 430 return; |
| 431 } | 431 } |
| 432 | 432 |
| 433 m_instrumentingAgents->setInspectorCSSAgent(this); | 433 m_instrumentingAgents->setInspectorCSSAgent(this); |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 documentsToChange.add(element->ownerDocument()); | 1399 documentsToChange.add(element->ownerDocument()); |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 m_nodeIdToForcedPseudoState.clear(); | 1402 m_nodeIdToForcedPseudoState.clear(); |
| 1403 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) | 1403 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) |
| 1404 (*it)->setNeedsStyleRecalc(SubtreeStyleChange); | 1404 (*it)->setNeedsStyleRecalc(SubtreeStyleChange); |
| 1405 } | 1405 } |
| 1406 | 1406 |
| 1407 } // namespace WebCore | 1407 } // namespace WebCore |
| 1408 | 1408 |
| OLD | NEW |