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

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

Issue 344203003: Replace loadWithOverviewMode settings with calls to shrinksViewportContentToFit (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/WebSettingsImpl.cpp ('k') | Source/web/tests/WebFrameTest.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 2975 matching lines...) Expand 10 before | Expand all | Expand 10 after
2986 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedDescription, defaultMinWidth); 2986 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedDescription, defaultMinWidth);
2987 2987
2988 if (settingsImpl()->clobberUserAgentInitialScaleQuirk() 2988 if (settingsImpl()->clobberUserAgentInitialScaleQuirk()
2989 && m_pageScaleConstraintsSet.userAgentConstraints().initialScale != -1 2989 && m_pageScaleConstraintsSet.userAgentConstraints().initialScale != -1
2990 && m_pageScaleConstraintsSet.userAgentConstraints().initialScale * devic eScaleFactor() <= 1) { 2990 && m_pageScaleConstraintsSet.userAgentConstraints().initialScale * devic eScaleFactor() <= 1) {
2991 if (description.maxWidth == Length(DeviceWidth) 2991 if (description.maxWidth == Length(DeviceWidth)
2992 || (description.maxWidth.type() == Auto && m_pageScaleConstraintsSet .pageDefinedConstraints().initialScale == 1.0f)) 2992 || (description.maxWidth.type() == Auto && m_pageScaleConstraintsSet .pageDefinedConstraints().initialScale == 1.0f))
2993 setInitialPageScaleOverride(-1); 2993 setInitialPageScaleOverride(-1);
2994 } 2994 }
2995 2995
2996 m_pageScaleConstraintsSet.adjustForAndroidWebViewQuirks(adjustedDescription, defaultMinWidth.intValue(), deviceScaleFactor(), settingsImpl()->supportDepreca tedTargetDensityDPI(), page()->settings().wideViewportQuirkEnabled(), page()->se ttings().useWideViewport(), page()->settings().loadWithOverviewMode(), settingsI mpl()->viewportMetaNonUserScalableQuirk()); 2996 m_pageScaleConstraintsSet.adjustForAndroidWebViewQuirks(adjustedDescription, defaultMinWidth.intValue(), deviceScaleFactor(), settingsImpl()->supportDepreca tedTargetDensityDPI(), page()->settings().wideViewportQuirkEnabled(), page()->se ttings().useWideViewport(), settingsImpl()->shrinksViewportContentToFit(), setti ngsImpl()->viewportMetaNonUserScalableQuirk());
2997 float newInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().i nitialScale; 2997 float newInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().i nitialScale;
2998 if (oldInitialScale != newInitialScale && newInitialScale != -1) { 2998 if (oldInitialScale != newInitialScale && newInitialScale != -1) {
2999 m_pageScaleConstraintsSet.setNeedsReset(true); 2999 m_pageScaleConstraintsSet.setNeedsReset(true);
3000 if (mainFrameImpl() && mainFrameImpl()->frameView()) 3000 if (mainFrameImpl() && mainFrameImpl()->frameView())
3001 mainFrameImpl()->frameView()->setNeedsLayout(); 3001 mainFrameImpl()->frameView()->setNeedsLayout();
3002 } 3002 }
3003 3003
3004 updateMainFrameLayoutSize(); 3004 updateMainFrameLayoutSize();
3005 3005
3006 if (LocalFrame* frame = page()->deprecatedLocalMainFrame()) { 3006 if (LocalFrame* frame = page()->deprecatedLocalMainFrame()) {
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
4153 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4153 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4154 4154
4155 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4155 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4156 return false; 4156 return false;
4157 4157
4158 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4158 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4159 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4159 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4160 } 4160 }
4161 4161
4162 } // namespace blink 4162 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebSettingsImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698