Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 1159723003: Don't reuse HistoryItems for multiple navigations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/HistoryItem.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3341 matching lines...) Expand 10 before | Expand all | Expand 10 after
3352 if (!page()->mainFrame()->isLocalFrame()) 3352 if (!page()->mainFrame()->isLocalFrame())
3353 return; 3353 return;
3354 3354
3355 if (FrameView* frameView = toLocalFrame(page()->mainFrame())->view()) { 3355 if (FrameView* frameView = toLocalFrame(page()->mainFrame())->view()) {
3356 ScrollableArea* scrollableArea = frameView->layoutViewportScrollableArea (); 3356 ScrollableArea* scrollableArea = frameView->layoutViewportScrollableArea ();
3357 3357
3358 if (scrollableArea->scrollPositionDouble() != DoublePoint::zero()) 3358 if (scrollableArea->scrollPositionDouble() != DoublePoint::zero())
3359 scrollableArea->notifyScrollPositionChanged(DoublePoint::zero()); 3359 scrollableArea->notifyScrollPositionChanged(DoublePoint::zero());
3360 } 3360 }
3361 3361
3362 // Clear out the values for the current history item. This will prevent the history item from clobbering the
3363 // value determined during page scale initialization, which may be less than 1.
3364 page()->deprecatedLocalMainFrame()->loader().clearScrollPositionAndViewState ();
3365 pageScaleConstraintsSet().setNeedsReset(true); 3362 pageScaleConstraintsSet().setNeedsReset(true);
3366 3363
3367 // Clobber saved scales and scroll offsets. 3364 // Clobber saved scales and scroll offsets.
3368 if (FrameView* view = page()->deprecatedLocalMainFrame()->document()->view() ) 3365 if (FrameView* view = page()->deprecatedLocalMainFrame()->document()->view() )
3369 view->cacheCurrentScrollPosition(); 3366 view->cacheCurrentScrollPosition();
3370 } 3367 }
3371 3368
3372 void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action, 3369 void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action,
3373 const WebPoint& location) 3370 const WebPoint& location)
3374 { 3371 {
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
4405 { 4402 {
4406 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4403 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4407 } 4404 }
4408 4405
4409 void WebViewImpl::forceNextDrawingBufferCreationToFail() 4406 void WebViewImpl::forceNextDrawingBufferCreationToFail()
4410 { 4407 {
4411 DrawingBuffer::forceNextDrawingBufferCreationToFail(); 4408 DrawingBuffer::forceNextDrawingBufferCreationToFail();
4412 } 4409 }
4413 4410
4414 } // namespace blink 4411 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/HistoryItem.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698