OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "config.h" |
| 6 #include "core/dom/IncrementLoadEventDelayCount.h" |
| 7 |
| 8 #include "core/dom/Document.h" |
| 9 |
| 10 namespace WebCore { |
| 11 |
| 12 IncrementLoadEventDelayCount::IncrementLoadEventDelayCount(Document& document) |
| 13 : m_document(&document) |
| 14 { |
| 15 document.incrementLoadEventDelayCount(); |
| 16 } |
| 17 |
| 18 IncrementLoadEventDelayCount::~IncrementLoadEventDelayCount() |
| 19 { |
| 20 m_document->decrementLoadEventDelayCount(); |
| 21 } |
| 22 |
| 23 void IncrementLoadEventDelayCount::documentChanged(Document& newDocument) |
| 24 { |
| 25 newDocument.incrementLoadEventDelayCount(); |
| 26 m_document->decrementLoadEventDelayCount(); |
| 27 m_document = &newDocument; |
| 28 } |
| 29 } |
OLD | NEW |