OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1918 if (m_continuousPaintingEnabled) { | 1922 if (m_continuousPaintingEnabled) { |
1919 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO verlays.get()); | 1923 ContinuousPainter::setNeedsDisplayRecursive(m_rootGraphicsLayer, m_pageO verlays.get()); |
1920 m_client->scheduleAnimation(); | 1924 m_client->scheduleAnimation(); |
1921 } | 1925 } |
1922 } | 1926 } |
1923 | 1927 |
1924 void WebViewImpl::setNeedsLayoutAndFullPaintInvalidation() | 1928 void WebViewImpl::setNeedsLayoutAndFullPaintInvalidation() |
1925 { | 1929 { |
1926 if (!mainFrameImpl() || !mainFrameImpl()->frame() || !mainFrameImpl()->frame ()->view()) | 1930 if (!mainFrameImpl() || !mainFrameImpl()->frame() || !mainFrameImpl()->frame ()->view()) |
1927 return; | 1931 return; |
1928 | |
chrishtr
2015/05/09 00:51:52
Spurious edit.
MikeB
2015/05/11 23:10:52
Done.
| |
1929 FrameView* view = mainFrameImpl()->frame()->view(); | 1932 FrameView* view = mainFrameImpl()->frame()->view(); |
1930 view->setNeedsLayout(); | 1933 view->setNeedsLayout(); |
1931 view->setNeedsFullPaintInvalidation(); | 1934 view->setNeedsFullPaintInvalidation(); |
1932 } | 1935 } |
1933 | 1936 |
1934 void WebViewImpl::layout() | 1937 void WebViewImpl::layout() |
1935 { | 1938 { |
1936 TRACE_EVENT0("blink", "WebViewImpl::layout"); | 1939 TRACE_EVENT0("blink", "WebViewImpl::layout"); |
1937 if (!mainFrameImpl()) | 1940 if (!mainFrameImpl()) |
1938 return; | 1941 return; |
(...skipping 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4332 | 4335 |
4333 if (pageScaleDelta != 1) | 4336 if (pageScaleDelta != 1) |
4334 m_doubleTapZoomPending = false; | 4337 m_doubleTapZoomPending = false; |
4335 | 4338 |
4336 frameView->setElasticOverscroll(elasticOverscrollDelta + frameView->elasticO verscroll()); | 4339 frameView->setElasticOverscroll(elasticOverscrollDelta + frameView->elasticO verscroll()); |
4337 | 4340 |
4338 updateLayoutViewportScrollPosition(frameView->layoutViewportScrollableArea() ->scrollPositionDouble() + | 4341 updateLayoutViewportScrollPosition(frameView->layoutViewportScrollableArea() ->scrollPositionDouble() + |
4339 DoubleSize(outerViewportDelta.width, outerViewportDelta.height), /* prog rammaticScroll */ false); | 4342 DoubleSize(outerViewportDelta.width, outerViewportDelta.height), /* prog rammaticScroll */ false); |
4340 } | 4343 } |
4341 | 4344 |
4345 void WebViewImpl::recordFrameTimingEvent(FrameTimingEventType eventType, int64_t FrameId, const WebVector<std::pair<int, double>>& events) | |
4346 { | |
4347 Frame* frame = m_page ? m_page->mainFrame() : 0; | |
4348 | |
4349 while (frame && frame->frameID() != FrameId) { | |
4350 frame = frame->tree().traverseNext(); | |
4351 } | |
4352 | |
4353 if (!frame || !frame->domWindow() || !frame->domWindow()->document()) | |
4354 return; // Can't find frame, it may have been cleaned up from the DOM. | |
4355 | |
4356 blink::DOMWindow* domWindow = frame->domWindow(); | |
4357 blink::Performance* performance = DOMWindowPerformance::performance(*domWind ow); | |
4358 for (size_t i = 0; i < events.size(); ++i) { | |
4359 if (eventType == CompositeEvent) | |
4360 performance->addCompositeTiming(domWindow->document(), events[i].fir st, events[i].second); | |
4361 else if (eventType == RenderEvent) | |
4362 performance->addRenderTiming(domWindow->document(), events[i].first, events[i].second); | |
4363 } | |
4364 } | |
4365 | |
4342 void WebViewImpl::updateLayerTreeViewport() | 4366 void WebViewImpl::updateLayerTreeViewport() |
4343 { | 4367 { |
4344 if (!page() || !m_layerTreeView) | 4368 if (!page() || !m_layerTreeView) |
4345 return; | 4369 return; |
4346 | 4370 |
4347 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor()); | 4371 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS caleFactor(), maximumPageScaleFactor()); |
4348 } | 4372 } |
4349 | 4373 |
4350 void WebViewImpl::updateLayerTreeBackgroundColor() | 4374 void WebViewImpl::updateLayerTreeBackgroundColor() |
4351 { | 4375 { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4486 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4510 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4487 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4511 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
4488 } | 4512 } |
4489 | 4513 |
4490 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4514 void WebViewImpl::forceNextWebGLContextCreationToFail() |
4491 { | 4515 { |
4492 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4516 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4493 } | 4517 } |
4494 | 4518 |
4495 } // namespace blink | 4519 } // namespace blink |
OLD | NEW |