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

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

Issue 2746083003: Avoid rotation anchor during transitional fullscreen states. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/web/FullscreenController.h ('k') | no next file » | 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 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 1912
1913 FrameView* view = mainFrame->frameView(); 1913 FrameView* view = mainFrame->frameView();
1914 if (!view) 1914 if (!view)
1915 return; 1915 return;
1916 1916
1917 VisualViewport& visualViewport = page()->frameHost().visualViewport(); 1917 VisualViewport& visualViewport = page()->frameHost().visualViewport();
1918 1918
1919 bool isRotation = 1919 bool isRotation =
1920 page()->settings().getMainFrameResizesAreOrientationChanges() && 1920 page()->settings().getMainFrameResizesAreOrientationChanges() &&
1921 m_size.width && contentsSize().width() && newSize.width != m_size.width && 1921 m_size.width && contentsSize().width() && newSize.width != m_size.width &&
1922 !m_fullscreenController->isFullscreen(); 1922 !m_fullscreenController->isFullscreenOrTransitioning();
1923 m_size = newSize; 1923 m_size = newSize;
1924 1924
1925 FloatSize viewportAnchorCoords(viewportAnchorCoordX, viewportAnchorCoordY); 1925 FloatSize viewportAnchorCoords(viewportAnchorCoordX, viewportAnchorCoordY);
1926 if (isRotation) { 1926 if (isRotation) {
1927 RotationViewportAnchor anchor(*view, visualViewport, viewportAnchorCoords, 1927 RotationViewportAnchor anchor(*view, visualViewport, viewportAnchorCoords,
1928 pageScaleConstraintsSet()); 1928 pageScaleConstraintsSet());
1929 resizeViewWhileAnchored(browserControlsHeight, browserControlsShrinkLayout); 1929 resizeViewWhileAnchored(browserControlsHeight, browserControlsShrinkLayout);
1930 } else { 1930 } else {
1931 ResizeViewportAnchor::ResizeScope resizeScope(*m_resizeViewportAnchor); 1931 ResizeViewportAnchor::ResizeScope resizeScope(*m_resizeViewportAnchor);
1932 resizeViewWhileAnchored(browserControlsHeight, browserControlsShrinkLayout); 1932 resizeViewWhileAnchored(browserControlsHeight, browserControlsShrinkLayout);
(...skipping 2233 matching lines...) Expand 10 before | Expand all | Expand 10 after
4166 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4166 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4167 return nullptr; 4167 return nullptr;
4168 return focusedFrame; 4168 return focusedFrame;
4169 } 4169 }
4170 4170
4171 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4171 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4172 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4172 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4173 } 4173 }
4174 4174
4175 } // namespace blink 4175 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/FullscreenController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698