| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 #include "core/inspector/InspectorInstrumentation.h" | 68 #include "core/inspector/InspectorInstrumentation.h" |
| 69 #include "core/loader/DocumentLoader.h" | 69 #include "core/loader/DocumentLoader.h" |
| 70 #include "core/loader/FrameLoaderClient.h" | 70 #include "core/loader/FrameLoaderClient.h" |
| 71 #include "core/loader/SinkDocument.h" | 71 #include "core/loader/SinkDocument.h" |
| 72 #include "core/loader/appcache/ApplicationCache.h" | 72 #include "core/loader/appcache/ApplicationCache.h" |
| 73 #include "core/page/ChromeClient.h" | 73 #include "core/page/ChromeClient.h" |
| 74 #include "core/page/CreateWindow.h" | 74 #include "core/page/CreateWindow.h" |
| 75 #include "core/page/Page.h" | 75 #include "core/page/Page.h" |
| 76 #include "core/page/WindowFeatures.h" | 76 #include "core/page/WindowFeatures.h" |
| 77 #include "core/page/scrolling/ScrollingCoordinator.h" | 77 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 78 #include "core/timing/DOMWindowPerformance.h" |
| 79 #include "core/timing/Performance.h" |
| 78 #include "platform/EventDispatchForbiddenScope.h" | 80 #include "platform/EventDispatchForbiddenScope.h" |
| 79 #include "platform/weborigin/SecurityOrigin.h" | 81 #include "platform/weborigin/SecurityOrigin.h" |
| 80 #include "platform/weborigin/Suborigin.h" | 82 #include "platform/weborigin/Suborigin.h" |
| 81 #include "public/platform/Platform.h" | 83 #include "public/platform/Platform.h" |
| 82 #include "public/platform/WebFrameScheduler.h" | 84 #include "public/platform/WebFrameScheduler.h" |
| 83 #include "public/platform/WebScreenInfo.h" | 85 #include "public/platform/WebScreenInfo.h" |
| 84 #include <memory> | 86 #include <memory> |
| 85 | 87 |
| 86 namespace blink { | 88 namespace blink { |
| 87 | 89 |
| (...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1394 // If fetcher->countPreloads() is not empty here, it's full of link | 1396 // If fetcher->countPreloads() is not empty here, it's full of link |
| 1395 // preloads, as speculatove preloads were cleared at DCL. | 1397 // preloads, as speculatove preloads were cleared at DCL. |
| 1396 if (frame() && documentLoader == frame()->loader().documentLoader() && | 1398 if (frame() && documentLoader == frame()->loader().documentLoader() && |
| 1397 documentLoader->fetcher()->countPreloads()) | 1399 documentLoader->fetcher()->countPreloads()) |
| 1398 m_unusedPreloadsTimer.startOneShot(unusedPreloadTimeoutInSeconds, | 1400 m_unusedPreloadsTimer.startOneShot(unusedPreloadTimeoutInSeconds, |
| 1399 BLINK_FROM_HERE); | 1401 BLINK_FROM_HERE); |
| 1400 } else { | 1402 } else { |
| 1401 dispatchEvent(loadEvent, document()); | 1403 dispatchEvent(loadEvent, document()); |
| 1402 } | 1404 } |
| 1403 | 1405 |
| 1406 Performance* performance = DOMWindowPerformance::performance(*this); |
| 1407 DCHECK(performance); |
| 1408 performance->addNavigationTiming(frame()); |
| 1409 |
| 1404 // For load events, send a separate load event to the enclosing frame only. | 1410 // For load events, send a separate load event to the enclosing frame only. |
| 1405 // This is a DOM extension and is independent of bubbling/capturing rules of | 1411 // This is a DOM extension and is independent of bubbling/capturing rules of |
| 1406 // the DOM. | 1412 // the DOM. |
| 1407 FrameOwner* owner = frame() ? frame()->owner() : nullptr; | 1413 FrameOwner* owner = frame() ? frame()->owner() : nullptr; |
| 1408 if (owner) | 1414 if (owner) |
| 1409 owner->dispatchLoad(); | 1415 owner->dispatchLoad(); |
| 1410 | 1416 |
| 1411 TRACE_EVENT_INSTANT1("devtools.timeline", "MarkLoad", | 1417 TRACE_EVENT_INSTANT1("devtools.timeline", "MarkLoad", |
| 1412 TRACE_EVENT_SCOPE_THREAD, "data", | 1418 TRACE_EVENT_SCOPE_THREAD, "data", |
| 1413 InspectorMarkLoadEvent::data(frame())); | 1419 InspectorMarkLoadEvent::data(frame())); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1551 | 1557 |
| 1552 LocalFrame* LocalDOMWindow::frame() const { | 1558 LocalFrame* LocalDOMWindow::frame() const { |
| 1553 // If the LocalDOMWindow still has a frame reference, that frame must point | 1559 // If the LocalDOMWindow still has a frame reference, that frame must point |
| 1554 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1560 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
| 1555 // where script execution leaks between different LocalDOMWindows. | 1561 // where script execution leaks between different LocalDOMWindows. |
| 1556 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this); | 1562 SECURITY_DCHECK(!m_frame || m_frame->domWindow() == this); |
| 1557 return m_frame; | 1563 return m_frame; |
| 1558 } | 1564 } |
| 1559 | 1565 |
| 1560 } // namespace blink | 1566 } // namespace blink |
| OLD | NEW |