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 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 } | 1493 } |
1494 | 1494 |
1495 void LocalDOMWindow::DispatchLoadEvent() { | 1495 void LocalDOMWindow::DispatchLoadEvent() { |
1496 Event* load_event(Event::Create(EventTypeNames::load)); | 1496 Event* load_event(Event::Create(EventTypeNames::load)); |
1497 if (GetFrame() && GetFrame()->Loader().GetDocumentLoader() && | 1497 if (GetFrame() && GetFrame()->Loader().GetDocumentLoader() && |
1498 !GetFrame()->Loader().GetDocumentLoader()->GetTiming().LoadEventStart()) { | 1498 !GetFrame()->Loader().GetDocumentLoader()->GetTiming().LoadEventStart()) { |
1499 DocumentLoader* document_loader = GetFrame()->Loader().GetDocumentLoader(); | 1499 DocumentLoader* document_loader = GetFrame()->Loader().GetDocumentLoader(); |
1500 DocumentLoadTiming& timing = document_loader->GetTiming(); | 1500 DocumentLoadTiming& timing = document_loader->GetTiming(); |
1501 timing.MarkLoadEventStart(); | 1501 timing.MarkLoadEventStart(); |
1502 DispatchEvent(load_event, document()); | 1502 DispatchEvent(load_event, document()); |
| 1503 SetHasLoadEventFired(); |
1503 timing.MarkLoadEventEnd(); | 1504 timing.MarkLoadEventEnd(); |
1504 DCHECK(document_loader->Fetcher()); | 1505 DCHECK(document_loader->Fetcher()); |
1505 // If fetcher->countPreloads() is not empty here, it's full of link | 1506 // If fetcher->countPreloads() is not empty here, it's full of link |
1506 // preloads, as speculatove preloads were cleared at DCL. | 1507 // preloads, as speculatove preloads were cleared at DCL. |
1507 if (GetFrame() && | 1508 if (GetFrame() && |
1508 document_loader == GetFrame()->Loader().GetDocumentLoader() && | 1509 document_loader == GetFrame()->Loader().GetDocumentLoader() && |
1509 document_loader->Fetcher()->CountPreloads()) | 1510 document_loader->Fetcher()->CountPreloads()) |
1510 unused_preloads_timer_.StartOneShot(kUnusedPreloadTimeoutInSeconds, | 1511 unused_preloads_timer_.StartOneShot(kUnusedPreloadTimeoutInSeconds, |
1511 BLINK_FROM_HERE); | 1512 BLINK_FROM_HERE); |
1512 } else { | 1513 } else { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 DOMWindow::Trace(visitor); | 1680 DOMWindow::Trace(visitor); |
1680 Supplementable<LocalDOMWindow>::Trace(visitor); | 1681 Supplementable<LocalDOMWindow>::Trace(visitor); |
1681 } | 1682 } |
1682 | 1683 |
1683 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { | 1684 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { |
1684 visitor->TraceWrappers(custom_elements_); | 1685 visitor->TraceWrappers(custom_elements_); |
1685 DOMWindow::TraceWrappers(visitor); | 1686 DOMWindow::TraceWrappers(visitor); |
1686 } | 1687 } |
1687 | 1688 |
1688 } // namespace blink | 1689 } // namespace blink |
OLD | NEW |