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

Side by Side 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: Remove unnecessary scroll reset Created 6 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/web/FullscreenController.cpp ('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 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 if (!view) 1588 if (!view)
1589 return; 1589 return;
1590 1590
1591 WebSize oldSize = m_size; 1591 WebSize oldSize = m_size;
1592 float oldPageScaleFactor = pageScaleFactor(); 1592 float oldPageScaleFactor = pageScaleFactor();
1593 int oldContentsWidth = contentsSize().width(); 1593 int oldContentsWidth = contentsSize().width();
1594 1594
1595 m_size = newSize; 1595 m_size = newSize;
1596 1596
1597 bool shouldAnchorAndRescaleViewport = settings()->mainFrameResizesAreOrienta tionChanges() 1597 bool shouldAnchorAndRescaleViewport = settings()->mainFrameResizesAreOrienta tionChanges()
1598 && oldSize.width && oldContentsWidth && newSize.width != oldSize.width; 1598 && oldSize.width && oldContentsWidth && newSize.width != oldSize.width & & !m_fullscreenController->isFullscreen();
1599 1599
1600 ViewportAnchor viewportAnchor(&mainFrameImpl()->frame()->eventHandler()); 1600 ViewportAnchor viewportAnchor(&mainFrameImpl()->frame()->eventHandler());
1601 if (shouldAnchorAndRescaleViewport) { 1601 if (shouldAnchorAndRescaleViewport) {
1602 viewportAnchor.setAnchor(view->visibleContentRect(), 1602 viewportAnchor.setAnchor(view->visibleContentRect(),
1603 FloatSize(viewportAnchorXCoord, viewportAnchorY Coord)); 1603 FloatSize(viewportAnchorXCoord, viewportAnchorY Coord));
1604 } 1604 }
1605 1605
1606 { 1606 {
1607 // Avoids unnecessary invalidations while various bits of state in FastT extAutosizer are updated. 1607 // Avoids unnecessary invalidations while various bits of state in FastT extAutosizer are updated.
1608 FastTextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page()); 1608 FastTextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page());
(...skipping 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after
4074 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4074 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4075 4075
4076 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4076 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4077 return false; 4077 return false;
4078 4078
4079 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4079 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4080 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4080 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4081 } 4081 }
4082 4082
4083 } // namespace blink 4083 } // namespace blink
OLDNEW
« 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