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

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

Issue 2747063002: 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 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 1903
1904 FrameView* view = mainFrame->frameView(); 1904 FrameView* view = mainFrame->frameView();
1905 if (!view) 1905 if (!view)
1906 return; 1906 return;
1907 1907
1908 VisualViewport& visualViewport = page()->frameHost().visualViewport(); 1908 VisualViewport& visualViewport = page()->frameHost().visualViewport();
1909 1909
1910 bool isRotation = 1910 bool isRotation =
1911 page()->settings().getMainFrameResizesAreOrientationChanges() && 1911 page()->settings().getMainFrameResizesAreOrientationChanges() &&
1912 m_size.width && contentsSize().width() && newSize.width != m_size.width && 1912 m_size.width && contentsSize().width() && newSize.width != m_size.width &&
1913 !m_fullscreenController->isFullscreen(); 1913 !m_fullscreenController->isFullscreenOrTransitioning();
1914 m_size = newSize; 1914 m_size = newSize;
1915 1915
1916 FloatSize viewportAnchorCoords(viewportAnchorCoordX, viewportAnchorCoordY); 1916 FloatSize viewportAnchorCoords(viewportAnchorCoordX, viewportAnchorCoordY);
1917 if (isRotation) { 1917 if (isRotation) {
1918 RotationViewportAnchor anchor(*view, visualViewport, viewportAnchorCoords, 1918 RotationViewportAnchor anchor(*view, visualViewport, viewportAnchorCoords,
1919 pageScaleConstraintsSet()); 1919 pageScaleConstraintsSet());
1920 resizeViewWhileAnchored(browserControlsHeight, browserControlsShrinkLayout); 1920 resizeViewWhileAnchored(browserControlsHeight, browserControlsShrinkLayout);
1921 } else { 1921 } else {
1922 ResizeViewportAnchor::ResizeScope resizeScope(*m_resizeViewportAnchor); 1922 ResizeViewportAnchor::ResizeScope resizeScope(*m_resizeViewportAnchor);
1923 resizeViewWhileAnchored(browserControlsHeight, browserControlsShrinkLayout); 1923 resizeViewWhileAnchored(browserControlsHeight, browserControlsShrinkLayout);
(...skipping 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after
4182 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4182 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4183 return nullptr; 4183 return nullptr;
4184 return focusedFrame; 4184 return focusedFrame;
4185 } 4185 }
4186 4186
4187 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4187 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4188 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4188 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4189 } 4189 }
4190 4190
4191 } // namespace blink 4191 } // 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