| 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 3347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3358 { | 3358 { |
| 3359 page()->frameHost().pinchViewport().reset(); | 3359 page()->frameHost().pinchViewport().reset(); |
| 3360 | 3360 |
| 3361 if (!page()->mainFrame()->isLocalFrame()) | 3361 if (!page()->mainFrame()->isLocalFrame()) |
| 3362 return; | 3362 return; |
| 3363 | 3363 |
| 3364 if (FrameView* frameView = toLocalFrame(page()->mainFrame())->view()) { | 3364 if (FrameView* frameView = toLocalFrame(page()->mainFrame())->view()) { |
| 3365 ScrollableArea* scrollableArea = frameView->layoutViewportScrollableArea
(); | 3365 ScrollableArea* scrollableArea = frameView->layoutViewportScrollableArea
(); |
| 3366 | 3366 |
| 3367 if (scrollableArea->scrollPositionDouble() != DoublePoint::zero()) | 3367 if (scrollableArea->scrollPositionDouble() != DoublePoint::zero()) |
| 3368 scrollableArea->notifyScrollPositionChanged(DoublePoint::zero()); | 3368 scrollableArea->setScrollPosition(DoublePoint::zero(), ProgrammaticS
croll); |
| 3369 } | 3369 } |
| 3370 | 3370 |
| 3371 pageScaleConstraintsSet().setNeedsReset(true); | 3371 pageScaleConstraintsSet().setNeedsReset(true); |
| 3372 | 3372 |
| 3373 // Clobber saved scales and scroll offsets. | 3373 // Clobber saved scales and scroll offsets. |
| 3374 if (FrameView* view = page()->deprecatedLocalMainFrame()->document()->view()
) | 3374 if (FrameView* view = page()->deprecatedLocalMainFrame()->document()->view()
) |
| 3375 view->cacheCurrentScrollPosition(); | 3375 view->cacheCurrentScrollPosition(); |
| 3376 } | 3376 } |
| 3377 | 3377 |
| 3378 void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action, | 3378 void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action, |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4226 m_doubleTapZoomPending = false; | 4226 m_doubleTapZoomPending = false; |
| 4227 | 4227 |
| 4228 frameView->setElasticOverscroll(elasticOverscrollDelta + frameView->elasticO
verscroll()); | 4228 frameView->setElasticOverscroll(elasticOverscrollDelta + frameView->elasticO
verscroll()); |
| 4229 | 4229 |
| 4230 ScrollableArea* layoutViewport = frameView->layoutViewportScrollableArea(); | 4230 ScrollableArea* layoutViewport = frameView->layoutViewportScrollableArea(); |
| 4231 | 4231 |
| 4232 DoublePoint layoutViewportPosition = layoutViewport->scrollPositionDouble() | 4232 DoublePoint layoutViewportPosition = layoutViewport->scrollPositionDouble() |
| 4233 + DoubleSize(layoutViewportDelta.width, layoutViewportDelta.height); | 4233 + DoubleSize(layoutViewportDelta.width, layoutViewportDelta.height); |
| 4234 | 4234 |
| 4235 if (layoutViewport->scrollPositionDouble() != layoutViewportPosition) { | 4235 if (layoutViewport->scrollPositionDouble() != layoutViewportPosition) { |
| 4236 layoutViewport->notifyScrollPositionChanged(layoutViewportPosition); | 4236 layoutViewport->setScrollPosition(layoutViewportPosition, CompositorScro
ll); |
| 4237 frameView->setWasScrolledByUser(true); | 4237 frameView->setWasScrolledByUser(true); |
| 4238 } | 4238 } |
| 4239 } | 4239 } |
| 4240 | 4240 |
| 4241 void WebViewImpl::recordFrameTimingEvent(FrameTimingEventType eventType, int64_t
FrameId, const WebVector<WebFrameTimingEvent>& events) | 4241 void WebViewImpl::recordFrameTimingEvent(FrameTimingEventType eventType, int64_t
FrameId, const WebVector<WebFrameTimingEvent>& events) |
| 4242 { | 4242 { |
| 4243 Frame* frame = m_page ? m_page->mainFrame() : 0; | 4243 Frame* frame = m_page ? m_page->mainFrame() : 0; |
| 4244 | 4244 |
| 4245 while (frame && frame->frameID() != FrameId) { | 4245 while (frame && frame->frameID() != FrameId) { |
| 4246 frame = frame->tree().traverseNext(); | 4246 frame = frame->tree().traverseNext(); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4411 { | 4411 { |
| 4412 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4412 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4413 } | 4413 } |
| 4414 | 4414 |
| 4415 void WebViewImpl::forceNextDrawingBufferCreationToFail() | 4415 void WebViewImpl::forceNextDrawingBufferCreationToFail() |
| 4416 { | 4416 { |
| 4417 DrawingBuffer::forceNextDrawingBufferCreationToFail(); | 4417 DrawingBuffer::forceNextDrawingBufferCreationToFail(); |
| 4418 } | 4418 } |
| 4419 | 4419 |
| 4420 } // namespace blink | 4420 } // namespace blink |
| OLD | NEW |