| 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 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1936 IntSize(), 0, PlatformEvent::NoModifiers, lastFlingSourceDevice
== WebGestureDeviceTouchpad ? PlatformGestureSourceTouchpad : PlatformGestureSou
rceTouchscreen); | 1936 IntSize(), 0, PlatformEvent::NoModifiers, lastFlingSourceDevice
== WebGestureDeviceTouchpad ? PlatformGestureSourceTouchpad : PlatformGestureSou
rceTouchscreen); |
| 1937 endScrollEvent.setScrollGestureData(0, 0, ScrollByPrecisePixel, 0, 0
, true, false, -1 /* null plugin id */); | 1937 endScrollEvent.setScrollGestureData(0, 0, ScrollByPrecisePixel, 0, 0
, true, false, -1 /* null plugin id */); |
| 1938 | 1938 |
| 1939 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS
crollEvent); | 1939 mainFrameImpl()->frame()->eventHandler().handleGestureScrollEnd(endS
crollEvent); |
| 1940 } | 1940 } |
| 1941 } | 1941 } |
| 1942 | 1942 |
| 1943 if (!m_page) | 1943 if (!m_page) |
| 1944 return; | 1944 return; |
| 1945 | 1945 |
| 1946 DocumentLifecycle::AllowThrottlingScope throttlingScope(mainFrameImpl()->fra
me()->document()->lifecycle()); |
| 1946 PageWidgetDelegate::animate(*m_page, lastFrameTimeMonotonic); | 1947 PageWidgetDelegate::animate(*m_page, lastFrameTimeMonotonic); |
| 1947 } | 1948 } |
| 1948 | 1949 |
| 1949 void WebViewImpl::updateAllLifecyclePhases() | 1950 void WebViewImpl::updateAllLifecyclePhases() |
| 1950 { | 1951 { |
| 1951 TRACE_EVENT0("blink", "WebViewImpl::updateAllLifecyclePhases"); | 1952 TRACE_EVENT0("blink", "WebViewImpl::updateAllLifecyclePhases"); |
| 1952 if (!mainFrameImpl()) | 1953 if (!mainFrameImpl()) |
| 1953 return; | 1954 return; |
| 1954 | 1955 |
| 1956 DocumentLifecycle::AllowThrottlingScope throttlingScope(mainFrameImpl()->fra
me()->document()->lifecycle()); |
| 1955 updateLayerTreeBackgroundColor(); | 1957 updateLayerTreeBackgroundColor(); |
| 1956 | 1958 |
| 1957 PageWidgetDelegate::updateAllLifecyclePhases(*m_page, *mainFrameImpl()->fram
e()); | 1959 PageWidgetDelegate::updateAllLifecyclePhases(*m_page, *mainFrameImpl()->fram
e()); |
| 1958 | 1960 |
| 1959 if (InspectorOverlay* overlay = inspectorOverlay()) { | 1961 if (InspectorOverlay* overlay = inspectorOverlay()) { |
| 1960 overlay->updateAllLifecyclePhases(); | 1962 overlay->updateAllLifecyclePhases(); |
| 1961 // TODO(chrishtr): integrate paint into the overlay's lifecycle. | 1963 // TODO(chrishtr): integrate paint into the overlay's lifecycle. |
| 1962 if (overlay->pageOverlay() && overlay->pageOverlay()->graphicsLayer()) | 1964 if (overlay->pageOverlay() && overlay->pageOverlay()->graphicsLayer()) |
| 1963 overlay->pageOverlay()->graphicsLayer()->paint(nullptr); | 1965 overlay->pageOverlay()->graphicsLayer()->paint(nullptr); |
| 1964 } | 1966 } |
| (...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3521 } | 3523 } |
| 3522 } | 3524 } |
| 3523 | 3525 |
| 3524 WebHitTestResult WebViewImpl::hitTestResultAt(const WebPoint& point) | 3526 WebHitTestResult WebViewImpl::hitTestResultAt(const WebPoint& point) |
| 3525 { | 3527 { |
| 3526 return coreHitTestResultAt(point); | 3528 return coreHitTestResultAt(point); |
| 3527 } | 3529 } |
| 3528 | 3530 |
| 3529 HitTestResult WebViewImpl::coreHitTestResultAt(const WebPoint& pointInViewport) | 3531 HitTestResult WebViewImpl::coreHitTestResultAt(const WebPoint& pointInViewport) |
| 3530 { | 3532 { |
| 3533 DocumentLifecycle::AllowThrottlingScope throttlingScope(mainFrameImpl()->fra
me()->document()->lifecycle()); |
| 3531 FrameView* view = mainFrameImpl()->frameView(); | 3534 FrameView* view = mainFrameImpl()->frameView(); |
| 3532 IntPoint pointInRootFrame = view->contentsToFrame(view->viewportToContents(p
ointInViewport)); | 3535 IntPoint pointInRootFrame = view->contentsToFrame(view->viewportToContents(p
ointInViewport)); |
| 3533 return hitTestResultForRootFramePos(pointInRootFrame); | 3536 return hitTestResultForRootFramePos(pointInRootFrame); |
| 3534 } | 3537 } |
| 3535 | 3538 |
| 3536 void WebViewImpl::copyImageAt(const WebPoint& point) | 3539 void WebViewImpl::copyImageAt(const WebPoint& point) |
| 3537 { | 3540 { |
| 3538 if (!m_page) | 3541 if (!m_page) |
| 3539 return; | 3542 return; |
| 3540 | 3543 |
| (...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4567 { | 4570 { |
| 4568 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4571 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
| 4569 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4572 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4570 if (!page()) | 4573 if (!page()) |
| 4571 return 1; | 4574 return 1; |
| 4572 | 4575 |
| 4573 return page()->deviceScaleFactor(); | 4576 return page()->deviceScaleFactor(); |
| 4574 } | 4577 } |
| 4575 | 4578 |
| 4576 } // namespace blink | 4579 } // namespace blink |
| OLD | NEW |