| Index: Source/web/WebViewImpl.cpp
|
| diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
|
| index bd6e2c920737e2ee92638a9de71f14130d3f9823..ea15dd5f27b95ca99a181283111d1bf790c15209 100644
|
| --- a/Source/web/WebViewImpl.cpp
|
| +++ b/Source/web/WebViewImpl.cpp
|
| @@ -86,6 +86,9 @@
|
| #include "core/page/PointerLockController.h"
|
| #include "core/page/ScopedPageLoadDeferrer.h"
|
| #include "core/page/TouchDisambiguation.h"
|
| +#include "core/paint/DeprecatedPaintLayer.h"
|
| +#include "core/timing/DOMWindowPerformance.h"
|
| +#include "core/timing/Performance.h"
|
| #include "modules/accessibility/AXObject.h"
|
| #include "modules/accessibility/AXObjectCacheImpl.h"
|
| #include "modules/credentialmanager/CredentialManagerClient.h"
|
| @@ -125,6 +128,7 @@
|
| #include "public/web/WebActiveWheelFlingParameters.h"
|
| #include "public/web/WebAutofillClient.h"
|
| #include "public/web/WebBeginFrameArgs.h"
|
| +#include "public/web/WebFrame.h"
|
| #include "public/web/WebFrameClient.h"
|
| #include "public/web/WebHitTestResult.h"
|
| #include "public/web/WebInputElement.h"
|
| @@ -4344,6 +4348,27 @@ void WebViewImpl::applyViewportDeltas(
|
| DoubleSize(outerViewportDelta.width, outerViewportDelta.height), /* programmaticScroll */ false);
|
| }
|
|
|
| +void WebViewImpl::recordFrameTimingEvent(FrameTimingEventType eventType, int64_t FrameId, const WebVector<std::tuple<int, double, double>>& events)
|
| +{
|
| + Frame* frame = m_page ? m_page->mainFrame() : 0;
|
| +
|
| + while (frame && frame->frameID() != FrameId) {
|
| + frame = frame->tree().traverseNext();
|
| + }
|
| +
|
| + if (!frame || !frame->domWindow() || !frame->domWindow()->document())
|
| + return; // Can't find frame, it may have been cleaned up from the DOM.
|
| +
|
| + blink::DOMWindow* domWindow = frame->domWindow();
|
| + blink::Performance* performance = DOMWindowPerformance::performance(*domWindow);
|
| + for (size_t i = 0; i < events.size(); ++i) {
|
| + if (eventType == CompositeEvent)
|
| + performance->addCompositeTiming(domWindow->document(), std::get<0>(events[i]), std::get<1>(events[i]));
|
| + else if (eventType == RenderEvent)
|
| + performance->addRenderTiming(domWindow->document(), std::get<0>(events[i]), std::get<1>(events[i]), std::get<2>(events[i]));
|
| + }
|
| +}
|
| +
|
| void WebViewImpl::updateLayerTreeViewport()
|
| {
|
| if (!page() || !m_layerTreeView)
|
|
|