| 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 3390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3401 return pageScaleConstraintsSet().finalConstraints().maximumScale; | 3401 return pageScaleConstraintsSet().finalConstraints().maximumScale; |
| 3402 } | 3402 } |
| 3403 | 3403 |
| 3404 void WebViewImpl::resetScrollAndScaleState() | 3404 void WebViewImpl::resetScrollAndScaleState() |
| 3405 { | 3405 { |
| 3406 updateLayoutViewportScrollPosition(IntPoint(), true); | 3406 updateLayoutViewportScrollPosition(IntPoint(), true); |
| 3407 page()->frameHost().pinchViewport().reset(); | 3407 page()->frameHost().pinchViewport().reset(); |
| 3408 | 3408 |
| 3409 if (!page()->mainFrame()->isLocalFrame()) | 3409 if (!page()->mainFrame()->isLocalFrame()) |
| 3410 return; | 3410 return; |
| 3411 | |
| 3412 // Clear out the values for the current history item. This will prevent the
history item from clobbering the | |
| 3413 // value determined during page scale initialization, which may be less than
1. | |
| 3414 page()->deprecatedLocalMainFrame()->loader().clearScrollPositionAndViewState
(); | |
| 3415 pageScaleConstraintsSet().setNeedsReset(true); | 3411 pageScaleConstraintsSet().setNeedsReset(true); |
| 3416 | 3412 |
| 3417 // Clobber saved scales and scroll offsets. | 3413 // Clobber saved scales and scroll offsets. |
| 3418 if (FrameView* view = page()->deprecatedLocalMainFrame()->document()->view()
) | 3414 if (FrameView* view = page()->deprecatedLocalMainFrame()->document()->view()
) |
| 3419 view->cacheCurrentScrollPosition(); | 3415 view->cacheCurrentScrollPosition(); |
| 3420 } | 3416 } |
| 3421 | 3417 |
| 3422 void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action, | 3418 void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action, |
| 3423 const WebPoint& location) | 3419 const WebPoint& location) |
| 3424 { | 3420 { |
| (...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4468 { | 4464 { |
| 4469 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4465 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4470 } | 4466 } |
| 4471 | 4467 |
| 4472 void WebViewImpl::forceNextDrawingBufferCreationToFail() | 4468 void WebViewImpl::forceNextDrawingBufferCreationToFail() |
| 4473 { | 4469 { |
| 4474 DrawingBuffer::forceNextDrawingBufferCreationToFail(); | 4470 DrawingBuffer::forceNextDrawingBufferCreationToFail(); |
| 4475 } | 4471 } |
| 4476 | 4472 |
| 4477 } // namespace blink | 4473 } // namespace blink |
| OLD | NEW |