Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 908453003: Blink changes to record interest rects for http://w3c.github.io/frame-timing/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review comments, plus update Render events to get finishTime as well. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 #include "core/page/DragData.h" 79 #include "core/page/DragData.h"
80 #include "core/page/DragSession.h" 80 #include "core/page/DragSession.h"
81 #include "core/page/EventHandler.h" 81 #include "core/page/EventHandler.h"
82 #include "core/page/FocusController.h" 82 #include "core/page/FocusController.h"
83 #include "core/page/FrameTree.h" 83 #include "core/page/FrameTree.h"
84 #include "core/page/Page.h" 84 #include "core/page/Page.h"
85 #include "core/page/PagePopupClient.h" 85 #include "core/page/PagePopupClient.h"
86 #include "core/page/PointerLockController.h" 86 #include "core/page/PointerLockController.h"
87 #include "core/page/ScopedPageLoadDeferrer.h" 87 #include "core/page/ScopedPageLoadDeferrer.h"
88 #include "core/page/TouchDisambiguation.h" 88 #include "core/page/TouchDisambiguation.h"
89 #include "core/paint/DeprecatedPaintLayer.h"
90 #include "core/timing/DOMWindowPerformance.h"
91 #include "core/timing/Performance.h"
89 #include "modules/accessibility/AXObject.h" 92 #include "modules/accessibility/AXObject.h"
90 #include "modules/accessibility/AXObjectCacheImpl.h" 93 #include "modules/accessibility/AXObjectCacheImpl.h"
91 #include "modules/credentialmanager/CredentialManagerClient.h" 94 #include "modules/credentialmanager/CredentialManagerClient.h"
92 #include "modules/encryptedmedia/MediaKeysController.h" 95 #include "modules/encryptedmedia/MediaKeysController.h"
93 #include "modules/storage/StorageNamespaceController.h" 96 #include "modules/storage/StorageNamespaceController.h"
94 #include "platform/ContextMenu.h" 97 #include "platform/ContextMenu.h"
95 #include "platform/ContextMenuItem.h" 98 #include "platform/ContextMenuItem.h"
96 #include "platform/Cursor.h" 99 #include "platform/Cursor.h"
97 #include "platform/KeyboardCodes.h" 100 #include "platform/KeyboardCodes.h"
98 #include "platform/Logging.h" 101 #include "platform/Logging.h"
(...skipping 19 matching lines...) Expand all
118 #include "public/platform/WebFloatPoint.h" 121 #include "public/platform/WebFloatPoint.h"
119 #include "public/platform/WebGestureCurve.h" 122 #include "public/platform/WebGestureCurve.h"
120 #include "public/platform/WebImage.h" 123 #include "public/platform/WebImage.h"
121 #include "public/platform/WebLayerTreeView.h" 124 #include "public/platform/WebLayerTreeView.h"
122 #include "public/platform/WebURLRequest.h" 125 #include "public/platform/WebURLRequest.h"
123 #include "public/platform/WebVector.h" 126 #include "public/platform/WebVector.h"
124 #include "public/web/WebAXObject.h" 127 #include "public/web/WebAXObject.h"
125 #include "public/web/WebActiveWheelFlingParameters.h" 128 #include "public/web/WebActiveWheelFlingParameters.h"
126 #include "public/web/WebAutofillClient.h" 129 #include "public/web/WebAutofillClient.h"
127 #include "public/web/WebBeginFrameArgs.h" 130 #include "public/web/WebBeginFrameArgs.h"
131 #include "public/web/WebFrame.h"
128 #include "public/web/WebFrameClient.h" 132 #include "public/web/WebFrameClient.h"
129 #include "public/web/WebHitTestResult.h" 133 #include "public/web/WebHitTestResult.h"
130 #include "public/web/WebInputElement.h" 134 #include "public/web/WebInputElement.h"
131 #include "public/web/WebMediaPlayerAction.h" 135 #include "public/web/WebMediaPlayerAction.h"
132 #include "public/web/WebNode.h" 136 #include "public/web/WebNode.h"
133 #include "public/web/WebPlugin.h" 137 #include "public/web/WebPlugin.h"
134 #include "public/web/WebPluginAction.h" 138 #include "public/web/WebPluginAction.h"
135 #include "public/web/WebRange.h" 139 #include "public/web/WebRange.h"
136 #include "public/web/WebSelection.h" 140 #include "public/web/WebSelection.h"
137 #include "public/web/WebTextInputInfo.h" 141 #include "public/web/WebTextInputInfo.h"
(...skipping 4199 matching lines...) Expand 10 before | Expand all | Expand 10 after
4337 4341
4338 if (pageScaleDelta != 1) 4342 if (pageScaleDelta != 1)
4339 m_doubleTapZoomPending = false; 4343 m_doubleTapZoomPending = false;
4340 4344
4341 frameView->setElasticOverscroll(elasticOverscrollDelta + frameView->elasticO verscroll()); 4345 frameView->setElasticOverscroll(elasticOverscrollDelta + frameView->elasticO verscroll());
4342 4346
4343 updateLayoutViewportScrollPosition(frameView->layoutViewportScrollableArea() ->scrollPositionDouble() + 4347 updateLayoutViewportScrollPosition(frameView->layoutViewportScrollableArea() ->scrollPositionDouble() +
4344 DoubleSize(outerViewportDelta.width, outerViewportDelta.height), /* prog rammaticScroll */ false); 4348 DoubleSize(outerViewportDelta.width, outerViewportDelta.height), /* prog rammaticScroll */ false);
4345 } 4349 }
4346 4350
4351 void WebViewImpl::recordFrameTimingEvent(FrameTimingEventType eventType, int64_t FrameId, const WebVector<std::tuple<int, double, double>>& events)
4352 {
4353 Frame* frame = m_page ? m_page->mainFrame() : 0;
4354
4355 while (frame && frame->frameID() != FrameId) {
4356 frame = frame->tree().traverseNext();
4357 }
4358
4359 if (!frame || !frame->domWindow() || !frame->domWindow()->document())
4360 return; // Can't find frame, it may have been cleaned up from the DOM.
4361
4362 blink::DOMWindow* domWindow = frame->domWindow();
4363 blink::Performance* performance = DOMWindowPerformance::performance(*domWind ow);
4364 for (size_t i = 0; i < events.size(); ++i) {
4365 if (eventType == CompositeEvent)
4366 performance->addCompositeTiming(domWindow->document(), std::get<0>(e vents[i]), std::get<1>(events[i]));
4367 else if (eventType == RenderEvent)
4368 performance->addRenderTiming(domWindow->document(), std::get<0>(even ts[i]), std::get<1>(events[i]), std::get<2>(events[i]));
4369 }
4370 }
4371
4347 void WebViewImpl::updateLayerTreeViewport() 4372 void WebViewImpl::updateLayerTreeViewport()
4348 { 4373 {
4349 if (!page() || !m_layerTreeView) 4374 if (!page() || !m_layerTreeView)
4350 return; 4375 return;
4351 4376
4352 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor()); 4377 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor());
4353 } 4378 }
4354 4379
4355 void WebViewImpl::updateLayerTreeBackgroundColor() 4380 void WebViewImpl::updateLayerTreeBackgroundColor()
4356 { 4381 {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
4491 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4516 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4492 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4517 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4493 } 4518 }
4494 4519
4495 void WebViewImpl::forceNextWebGLContextCreationToFail() 4520 void WebViewImpl::forceNextWebGLContextCreationToFail()
4496 { 4521 {
4497 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4522 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4498 } 4523 }
4499 4524
4500 } // namespace blink 4525 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698