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

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

Issue 2122013003: Wait until after layout when restoring scroll on exiting fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests after foolip@'s patch Created 4 years, 5 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
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 4042 matching lines...) Expand 10 before | Expand all | Expand 10 after
4053 4053
4054 FrameView* view = webframe->frame()->view(); 4054 FrameView* view = webframe->frame()->view();
4055 4055
4056 postLayoutResize(webframe); 4056 postLayoutResize(webframe);
4057 4057
4058 // Relayout immediately to avoid violating the rule that needsLayout() 4058 // Relayout immediately to avoid violating the rule that needsLayout()
4059 // isn't set at the end of a layout. 4059 // isn't set at the end of a layout.
4060 if (view->needsLayout()) 4060 if (view->needsLayout())
4061 view->layout(); 4061 view->layout();
4062 4062
4063 m_fullscreenController->didUpdateLayout();
4064
4063 m_client->didUpdateLayout(); 4065 m_client->didUpdateLayout();
4064 } 4066 }
4065 4067
4066 void WebViewImpl::didChangeContentsSize() 4068 void WebViewImpl::didChangeContentsSize()
4067 { 4069 {
4068 pageScaleConstraintsSet().didChangeContentsSize(contentsSize(), pageScaleFac tor()); 4070 pageScaleConstraintsSet().didChangeContentsSize(contentsSize(), pageScaleFac tor());
4069 } 4071 }
4070 4072
4071 void WebViewImpl::pageScaleFactorChanged() 4073 void WebViewImpl::pageScaleFactorChanged()
4072 { 4074 {
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
4573 { 4575 {
4574 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4576 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4575 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4577 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4576 if (!page()) 4578 if (!page())
4577 return 1; 4579 return 1;
4578 4580
4579 return page()->deviceScaleFactor(); 4581 return page()->deviceScaleFactor();
4580 } 4582 }
4581 4583
4582 } // namespace blink 4584 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/FullscreenController.cpp ('k') | third_party/WebKit/Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698