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 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1507 } | 1507 } |
1508 | 1508 |
1509 void LocalDOMWindow::DispatchLoadEvent() { | 1509 void LocalDOMWindow::DispatchLoadEvent() { |
1510 Event* load_event(Event::Create(EventTypeNames::load)); | 1510 Event* load_event(Event::Create(EventTypeNames::load)); |
1511 if (GetFrame() && GetFrame()->Loader().GetDocumentLoader() && | 1511 if (GetFrame() && GetFrame()->Loader().GetDocumentLoader() && |
1512 !GetFrame()->Loader().GetDocumentLoader()->GetTiming().LoadEventStart()) { | 1512 !GetFrame()->Loader().GetDocumentLoader()->GetTiming().LoadEventStart()) { |
1513 DocumentLoader* document_loader = GetFrame()->Loader().GetDocumentLoader(); | 1513 DocumentLoader* document_loader = GetFrame()->Loader().GetDocumentLoader(); |
1514 DocumentLoadTiming& timing = document_loader->GetTiming(); | 1514 DocumentLoadTiming& timing = document_loader->GetTiming(); |
1515 timing.MarkLoadEventStart(); | 1515 timing.MarkLoadEventStart(); |
1516 DispatchEvent(load_event, document()); | 1516 DispatchEvent(load_event, document()); |
| 1517 SetHasLoadEventFired(); |
1517 timing.MarkLoadEventEnd(); | 1518 timing.MarkLoadEventEnd(); |
1518 DCHECK(document_loader->Fetcher()); | 1519 DCHECK(document_loader->Fetcher()); |
1519 // If fetcher->countPreloads() is not empty here, it's full of link | 1520 // If fetcher->countPreloads() is not empty here, it's full of link |
1520 // preloads, as speculatove preloads were cleared at DCL. | 1521 // preloads, as speculatove preloads were cleared at DCL. |
1521 if (GetFrame() && | 1522 if (GetFrame() && |
1522 document_loader == GetFrame()->Loader().GetDocumentLoader() && | 1523 document_loader == GetFrame()->Loader().GetDocumentLoader() && |
1523 document_loader->Fetcher()->CountPreloads()) | 1524 document_loader->Fetcher()->CountPreloads()) |
1524 unused_preloads_timer_.StartOneShot(kUnusedPreloadTimeoutInSeconds, | 1525 unused_preloads_timer_.StartOneShot(kUnusedPreloadTimeoutInSeconds, |
1525 BLINK_FROM_HERE); | 1526 BLINK_FROM_HERE); |
1526 } else { | 1527 } else { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1693 DOMWindow::Trace(visitor); | 1694 DOMWindow::Trace(visitor); |
1694 Supplementable<LocalDOMWindow>::Trace(visitor); | 1695 Supplementable<LocalDOMWindow>::Trace(visitor); |
1695 } | 1696 } |
1696 | 1697 |
1697 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { | 1698 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { |
1698 visitor->TraceWrappers(custom_elements_); | 1699 visitor->TraceWrappers(custom_elements_); |
1699 DOMWindow::TraceWrappers(visitor); | 1700 DOMWindow::TraceWrappers(visitor); |
1700 } | 1701 } |
1701 | 1702 |
1702 } // namespace blink | 1703 } // namespace blink |
OLD | NEW |