| 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 3453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3464 return pageScaleConstraintsSet().finalConstraints().maximumScale; | 3464 return pageScaleConstraintsSet().finalConstraints().maximumScale; |
| 3465 } | 3465 } |
| 3466 | 3466 |
| 3467 void WebViewImpl::resetScrollAndScaleState() | 3467 void WebViewImpl::resetScrollAndScaleState() |
| 3468 { | 3468 { |
| 3469 updateLayoutViewportScrollPosition(IntPoint(), true); | 3469 updateLayoutViewportScrollPosition(IntPoint(), true); |
| 3470 page()->frameHost().pinchViewport().reset(); | 3470 page()->frameHost().pinchViewport().reset(); |
| 3471 | 3471 |
| 3472 if (!page()->mainFrame()->isLocalFrame()) | 3472 if (!page()->mainFrame()->isLocalFrame()) |
| 3473 return; | 3473 return; |
| 3474 | |
| 3475 // Clear out the values for the current history item. This will prevent the
history item from clobbering the | |
| 3476 // value determined during page scale initialization, which may be less than
1. | |
| 3477 page()->deprecatedLocalMainFrame()->loader().clearScrollPositionAndViewState
(); | |
| 3478 pageScaleConstraintsSet().setNeedsReset(true); | 3474 pageScaleConstraintsSet().setNeedsReset(true); |
| 3479 | 3475 |
| 3480 // Clobber saved scales and scroll offsets. | 3476 // Clobber saved scales and scroll offsets. |
| 3481 if (FrameView* view = page()->deprecatedLocalMainFrame()->document()->view()
) | 3477 if (FrameView* view = page()->deprecatedLocalMainFrame()->document()->view()
) |
| 3482 view->cacheCurrentScrollPosition(); | 3478 view->cacheCurrentScrollPosition(); |
| 3483 } | 3479 } |
| 3484 | 3480 |
| 3485 void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action, | 3481 void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action, |
| 3486 const WebPoint& location) | 3482 const WebPoint& location) |
| 3487 { | 3483 { |
| (...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4531 { | 4527 { |
| 4532 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4528 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4533 } | 4529 } |
| 4534 | 4530 |
| 4535 void WebViewImpl::forceNextDrawingBufferCreationToFail() | 4531 void WebViewImpl::forceNextDrawingBufferCreationToFail() |
| 4536 { | 4532 { |
| 4537 DrawingBuffer::forceNextDrawingBufferCreationToFail(); | 4533 DrawingBuffer::forceNextDrawingBufferCreationToFail(); |
| 4538 } | 4534 } |
| 4539 | 4535 |
| 4540 } // namespace blink | 4536 } // namespace blink |
| OLD | NEW |