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

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

Issue 190723007: Fix tests to be compatible with Android scale initialization. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove substantive change, change only tests 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/repaint/scale-page-shrink.html ('k') | Source/web/tests/TouchActionTest.cpp » ('j') | 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 2842 matching lines...) Expand 10 before | Expand all | Expand 10 after
2853 2853
2854 void WebViewImpl::refreshPageScaleFactorAfterLayout() 2854 void WebViewImpl::refreshPageScaleFactorAfterLayout()
2855 { 2855 {
2856 if (!mainFrame() || !page() || !page()->mainFrame() || !page()->mainFrame()- >view()) 2856 if (!mainFrame() || !page() || !page()->mainFrame() || !page()->mainFrame()- >view())
2857 return; 2857 return;
2858 FrameView* view = page()->mainFrame()->view(); 2858 FrameView* view = page()->mainFrame()->view();
2859 2859
2860 updatePageDefinedViewportConstraints(mainFrameImpl()->frame()->document()->v iewportDescription()); 2860 updatePageDefinedViewportConstraints(mainFrameImpl()->frame()->document()->v iewportDescription());
2861 m_pageScaleConstraintsSet.computeFinalConstraints(); 2861 m_pageScaleConstraintsSet.computeFinalConstraints();
2862 2862
2863 if (settings()->shrinksViewportContentToFit() && settings()->viewportEnabled () && !m_fixedLayoutSizeLock) { 2863 if (settings()->shrinksViewportContentToFit() && !m_fixedLayoutSizeLock) {
2864 int verticalScrollbarWidth = 0; 2864 int verticalScrollbarWidth = 0;
2865 if (view->verticalScrollbar() && !view->verticalScrollbar()->isOverlaySc rollbar()) 2865 if (view->verticalScrollbar() && !view->verticalScrollbar()->isOverlaySc rollbar())
2866 verticalScrollbarWidth = view->verticalScrollbar()->width(); 2866 verticalScrollbarWidth = view->verticalScrollbar()->width();
2867 m_pageScaleConstraintsSet.adjustFinalConstraintsToContentsSize(contentsS ize(), verticalScrollbarWidth); 2867 m_pageScaleConstraintsSet.adjustFinalConstraintsToContentsSize(contentsS ize(), verticalScrollbarWidth);
2868 } 2868 }
2869 2869
2870 if (pinchVirtualViewportEnabled()) 2870 if (pinchVirtualViewportEnabled())
2871 mainFrameImpl()->frameView()->resize(m_pageScaleConstraintsSet.mainFrame Size(contentsSize())); 2871 mainFrameImpl()->frameView()->resize(m_pageScaleConstraintsSet.mainFrame Size(contentsSize()));
2872 2872
2873 float newPageScaleFactor = pageScaleFactor(); 2873 float newPageScaleFactor = pageScaleFactor();
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
4064 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4064 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4065 4065
4066 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4066 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4067 return false; 4067 return false;
4068 4068
4069 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4069 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4070 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4070 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4071 } 4071 }
4072 4072
4073 } // namespace blink 4073 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/repaint/scale-page-shrink.html ('k') | Source/web/tests/TouchActionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698