OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1464 } | 1464 } |
1465 | 1465 |
1466 void LocalDOMWindow::dispatchLoadEvent() { | 1466 void LocalDOMWindow::dispatchLoadEvent() { |
1467 Event* loadEvent(Event::create(EventTypeNames::load)); | 1467 Event* loadEvent(Event::create(EventTypeNames::load)); |
1468 if (frame() && frame()->loader().documentLoader() && | 1468 if (frame() && frame()->loader().documentLoader() && |
1469 !frame()->loader().documentLoader()->timing().loadEventStart()) { | 1469 !frame()->loader().documentLoader()->timing().loadEventStart()) { |
1470 DocumentLoader* documentLoader = frame()->loader().documentLoader(); | 1470 DocumentLoader* documentLoader = frame()->loader().documentLoader(); |
1471 DocumentLoadTiming& timing = documentLoader->timing(); | 1471 DocumentLoadTiming& timing = documentLoader->timing(); |
1472 timing.markLoadEventStart(); | 1472 timing.markLoadEventStart(); |
1473 dispatchEvent(loadEvent, document()); | 1473 dispatchEvent(loadEvent, document()); |
| 1474 setHasLoadEventFired(); |
1474 timing.markLoadEventEnd(); | 1475 timing.markLoadEventEnd(); |
1475 DCHECK(documentLoader->fetcher()); | 1476 DCHECK(documentLoader->fetcher()); |
1476 // If fetcher->countPreloads() is not empty here, it's full of link | 1477 // If fetcher->countPreloads() is not empty here, it's full of link |
1477 // preloads, as speculatove preloads were cleared at DCL. | 1478 // preloads, as speculatove preloads were cleared at DCL. |
1478 if (frame() && documentLoader == frame()->loader().documentLoader() && | 1479 if (frame() && documentLoader == frame()->loader().documentLoader() && |
1479 documentLoader->fetcher()->countPreloads()) | 1480 documentLoader->fetcher()->countPreloads()) |
1480 m_unusedPreloadsTimer.startOneShot(unusedPreloadTimeoutInSeconds, | 1481 m_unusedPreloadsTimer.startOneShot(unusedPreloadTimeoutInSeconds, |
1481 BLINK_FROM_HERE); | 1482 BLINK_FROM_HERE); |
1482 } else { | 1483 } else { |
1483 dispatchEvent(loadEvent, document()); | 1484 dispatchEvent(loadEvent, document()); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1647 DOMWindow::trace(visitor); | 1648 DOMWindow::trace(visitor); |
1648 Supplementable<LocalDOMWindow>::trace(visitor); | 1649 Supplementable<LocalDOMWindow>::trace(visitor); |
1649 } | 1650 } |
1650 | 1651 |
1651 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { | 1652 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { |
1652 visitor->traceWrappers(m_customElements); | 1653 visitor->traceWrappers(m_customElements); |
1653 DOMWindow::traceWrappers(visitor); | 1654 DOMWindow::traceWrappers(visitor); |
1654 } | 1655 } |
1655 | 1656 |
1656 } // namespace blink | 1657 } // namespace blink |
OLD | NEW |