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 20 matching lines...) Expand all Loading... |
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" |
128 #include "public/web/WebElement.h" | 131 #include "public/web/WebElement.h" |
| 132 #include "public/web/WebFrame.h" |
129 #include "public/web/WebFrameClient.h" | 133 #include "public/web/WebFrameClient.h" |
130 #include "public/web/WebHitTestResult.h" | 134 #include "public/web/WebHitTestResult.h" |
131 #include "public/web/WebInputElement.h" | 135 #include "public/web/WebInputElement.h" |
132 #include "public/web/WebMediaPlayerAction.h" | 136 #include "public/web/WebMediaPlayerAction.h" |
133 #include "public/web/WebNode.h" | 137 #include "public/web/WebNode.h" |
134 #include "public/web/WebPlugin.h" | 138 #include "public/web/WebPlugin.h" |
135 #include "public/web/WebPluginAction.h" | 139 #include "public/web/WebPluginAction.h" |
136 #include "public/web/WebRange.h" | 140 #include "public/web/WebRange.h" |
137 #include "public/web/WebSelection.h" | 141 #include "public/web/WebSelection.h" |
138 #include "public/web/WebTextInputInfo.h" | 142 #include "public/web/WebTextInputInfo.h" |
(...skipping 4211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4350 | 4354 |
4351 if (pageScaleDelta != 1) | 4355 if (pageScaleDelta != 1) |
4352 m_doubleTapZoomPending = false; | 4356 m_doubleTapZoomPending = false; |
4353 | 4357 |
4354 frameView->setElasticOverscroll(elasticOverscrollDelta + frameView->elasticO
verscroll()); | 4358 frameView->setElasticOverscroll(elasticOverscrollDelta + frameView->elasticO
verscroll()); |
4355 | 4359 |
4356 updateLayoutViewportScrollPosition(frameView->layoutViewportScrollableArea()
->scrollPositionDouble() + | 4360 updateLayoutViewportScrollPosition(frameView->layoutViewportScrollableArea()
->scrollPositionDouble() + |
4357 DoubleSize(outerViewportDelta.width, outerViewportDelta.height), /* prog
rammaticScroll */ false); | 4361 DoubleSize(outerViewportDelta.width, outerViewportDelta.height), /* prog
rammaticScroll */ false); |
4358 } | 4362 } |
4359 | 4363 |
| 4364 void WebViewImpl::recordFrameTimingEvent(FrameTimingEventType eventType, int64_t
FrameId, const WebVector<WebFrameTimingEvent>& events) |
| 4365 { |
| 4366 Frame* frame = m_page ? m_page->mainFrame() : 0; |
| 4367 |
| 4368 while (frame && frame->frameID() != FrameId) { |
| 4369 frame = frame->tree().traverseNext(); |
| 4370 } |
| 4371 |
| 4372 if (!frame || !frame->domWindow() || !frame->domWindow()->document()) |
| 4373 return; // Can't find frame, it may have been cleaned up from the DOM. |
| 4374 |
| 4375 blink::DOMWindow* domWindow = frame->domWindow(); |
| 4376 blink::Performance* performance = DOMWindowPerformance::performance(*domWind
ow); |
| 4377 for (size_t i = 0; i < events.size(); ++i) { |
| 4378 if (eventType == CompositeEvent) |
| 4379 performance->addCompositeTiming(domWindow->document(), events[i].sou
rceFrame, events[i].startTime); |
| 4380 else if (eventType == RenderEvent) |
| 4381 performance->addRenderTiming(domWindow->document(), events[i].source
Frame, events[i].startTime, events[i].finishTime); |
| 4382 } |
| 4383 } |
| 4384 |
4360 void WebViewImpl::updateLayerTreeViewport() | 4385 void WebViewImpl::updateLayerTreeViewport() |
4361 { | 4386 { |
4362 if (!page() || !m_layerTreeView) | 4387 if (!page() || !m_layerTreeView) |
4363 return; | 4388 return; |
4364 | 4389 |
4365 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS
caleFactor(), maximumPageScaleFactor()); | 4390 m_layerTreeView->setPageScaleFactorAndLimits(pageScaleFactor(), minimumPageS
caleFactor(), maximumPageScaleFactor()); |
4366 } | 4391 } |
4367 | 4392 |
4368 void WebViewImpl::updateLayerTreeBackgroundColor() | 4393 void WebViewImpl::updateLayerTreeBackgroundColor() |
4369 { | 4394 { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4504 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4529 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4505 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4530 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4506 } | 4531 } |
4507 | 4532 |
4508 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4533 void WebViewImpl::forceNextWebGLContextCreationToFail() |
4509 { | 4534 { |
4510 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4535 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4511 } | 4536 } |
4512 | 4537 |
4513 } // namespace blink | 4538 } // namespace blink |
OLD | NEW |