OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
486 return element; | 486 return element; |
487 } | 487 } |
488 | 488 |
489 void InspectorDOMAgent::enable(ErrorString*) | 489 void InspectorDOMAgent::enable(ErrorString*) |
490 { | 490 { |
491 if (enabled()) | 491 if (enabled()) |
492 return; | 492 return; |
493 m_state->setBoolean(DOMAgentState::domAgentEnabled, true); | 493 m_state->setBoolean(DOMAgentState::domAgentEnabled, true); |
494 if (m_listener) | 494 if (m_listener) |
495 m_listener->domAgentWasEnabled(); | 495 m_listener->domAgentWasEnabled(); |
496 restore(); | |
pfeldman
2014/06/26 13:57:17
This seems wrong: getDocument -> enable -> restore
| |
496 } | 497 } |
497 | 498 |
498 bool InspectorDOMAgent::enabled() const | 499 bool InspectorDOMAgent::enabled() const |
499 { | 500 { |
500 return m_state->getBoolean(DOMAgentState::domAgentEnabled); | 501 return m_state->getBoolean(DOMAgentState::domAgentEnabled); |
501 } | 502 } |
502 | 503 |
503 void InspectorDOMAgent::disable(ErrorString*) | 504 void InspectorDOMAgent::disable(ErrorString*) |
504 { | 505 { |
505 if (!enabled()) | 506 if (!enabled()) |
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2101 if (!m_documentNodeToIdMap->contains(m_document.get())) { | 2102 if (!m_documentNodeToIdMap->contains(m_document.get())) { |
2102 RefPtr<TypeBuilder::DOM::Node> root; | 2103 RefPtr<TypeBuilder::DOM::Node> root; |
2103 getDocument(errorString, root); | 2104 getDocument(errorString, root); |
2104 return errorString->isEmpty(); | 2105 return errorString->isEmpty(); |
2105 } | 2106 } |
2106 return true; | 2107 return true; |
2107 } | 2108 } |
2108 | 2109 |
2109 } // namespace WebCore | 2110 } // namespace WebCore |
2110 | 2111 |
OLD | NEW |