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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 308513002: Fix fullscreen media control position issue when switching orientation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/FullscreenController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 1a4e1347d9ad6369c6192253ed2a42b385cbc654..c551a775909e8bfbb1cc34e2e609bc598c7627f8 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -1594,8 +1594,9 @@ void WebViewImpl::resize(const WebSize& newSize)
m_size = newSize;
+ bool isFullscreen = m_fullscreenController->isFullscreen();
bool shouldAnchorAndRescaleViewport = settings()->mainFrameResizesAreOrientationChanges()
- && oldSize.width && oldContentsWidth && newSize.width != oldSize.width;
+ && oldSize.width && oldContentsWidth && newSize.width != oldSize.width && !isFullscreen;
ViewportAnchor viewportAnchor(&mainFrameImpl()->frame()->eventHandler());
if (shouldAnchorAndRescaleViewport) {
@@ -1625,7 +1626,9 @@ void WebViewImpl::resize(const WebSize& newSize)
page()->frameHost().pinchViewport().setSize(m_size);
}
- if (settings()->viewportEnabled() && !m_fixedLayoutSizeLock) {
+ if (isFullscreen) {
+ setPageScaleFactor(1.0f, IntPoint());
aelias_OOO_until_Jul13 2014/05/28 23:45:55 Why is this line needed?
trchen 2014/05/29 00:02:13 Maybe not. Just tried without this line. No advers
+ } else if (settings()->viewportEnabled() && !m_fixedLayoutSizeLock) {
// Relayout immediately to recalculate the minimum scale limit.
if (view->needsLayout())
view->layout();
« no previous file with comments | « Source/web/FullscreenController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698