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

Side by Side Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 12045023: Merge 140035 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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 | « no previous file | Source/WebKit/chromium/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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 } 1121 }
1122 1122
1123 bool scaleUnchanged = true; 1123 bool scaleUnchanged = true;
1124 if (!rect.isEmpty()) { 1124 if (!rect.isEmpty()) {
1125 // Pages should be as legible as on desktop when at dpi scale, so no 1125 // Pages should be as legible as on desktop when at dpi scale, so no
1126 // need to zoom in further when automatically determining zoom level 1126 // need to zoom in further when automatically determining zoom level
1127 // (after double tap, find in page, etc), though the user should still 1127 // (after double tap, find in page, etc), though the user should still
1128 // be allowed to manually pinch zoom in further if they desire. 1128 // be allowed to manually pinch zoom in further if they desire.
1129 const float defaultScaleWhenAlreadyLegible = m_minimumPageScaleFactor * doubleTapZoomAlreadyLegibleRatio; 1129 const float defaultScaleWhenAlreadyLegible = m_minimumPageScaleFactor * doubleTapZoomAlreadyLegibleRatio;
1130 float legibleScale = deviceScaleFactor(); 1130 float legibleScale = deviceScaleFactor();
1131 #if ENABLE(TEXT_AUTOSIZING)
1132 if (page() && page()->settings())
1133 legibleScale *= page()->settings()->textAutosizingFontScaleFactor();
1134 #endif
1131 if (legibleScale < defaultScaleWhenAlreadyLegible) 1135 if (legibleScale < defaultScaleWhenAlreadyLegible)
1132 legibleScale = (scale == m_minimumPageScaleFactor) ? defaultScaleWhe nAlreadyLegible : m_minimumPageScaleFactor; 1136 legibleScale = (scale == m_minimumPageScaleFactor) ? defaultScaleWhe nAlreadyLegible : m_minimumPageScaleFactor;
1133 1137
1134 const float defaultMargin = doubleTapZoomContentDefaultMargin * deviceSc aleFactor(); 1138 const float defaultMargin = doubleTapZoomContentDefaultMargin * deviceSc aleFactor();
1135 const float minimumMargin = doubleTapZoomContentMinimumMargin * deviceSc aleFactor(); 1139 const float minimumMargin = doubleTapZoomContentMinimumMargin * deviceSc aleFactor();
1136 // We want the margins to have the same physical size, which means we 1140 // We want the margins to have the same physical size, which means we
1137 // need to express them in post-scale size. To do that we'd need to know 1141 // need to express them in post-scale size. To do that we'd need to know
1138 // the scale we're scaling to, but that depends on the margins. Instead 1142 // the scale we're scaling to, but that depends on the margins. Instead
1139 // we express them as a fraction of the target rectangle: this will be 1143 // we express them as a fraction of the target rectangle: this will be
1140 // correct if we end up fully zooming to it, and won't matter if we 1144 // correct if we end up fully zooming to it, and won't matter if we
(...skipping 3149 matching lines...) Expand 10 before | Expand all | Expand 10 after
4290 const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event); 4294 const WebMouseEvent& mouseEvent = static_cast<const WebMouseEvent&>(event);
4291 4295
4292 if (page()) 4296 if (page())
4293 page()->pointerLockController()->dispatchLockedMouseEvent( 4297 page()->pointerLockController()->dispatchLockedMouseEvent(
4294 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent), 4298 PlatformMouseEventBuilder(mainFrameImpl()->frameView(), mouseEvent),
4295 eventType); 4299 eventType);
4296 } 4300 }
4297 #endif 4301 #endif
4298 4302
4299 } // namespace WebKit 4303 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | Source/WebKit/chromium/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698