OLD | NEW |
---|---|
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 Loading... | |
2986 // isn't set at the end of a layout. | 2986 // isn't set at the end of a layout. |
2987 if (view->needsLayout()) | 2987 if (view->needsLayout()) |
2988 view->layout(); | 2988 view->layout(); |
2989 } | 2989 } |
2990 | 2990 |
2991 void WebViewImpl::updatePageDefinedPageScaleConstraints(const ViewportArguments& arguments) | 2991 void WebViewImpl::updatePageDefinedPageScaleConstraints(const ViewportArguments& arguments) |
2992 { | 2992 { |
2993 if (!settings()->viewportEnabled() || !isFixedLayoutModeEnabled() || !page() || !m_size.width || !m_size.height) | 2993 if (!settings()->viewportEnabled() || !isFixedLayoutModeEnabled() || !page() || !m_size.width || !m_size.height) |
2994 return; | 2994 return; |
2995 | 2995 |
2996 m_pageScaleConstraintsSet.updatePageDefinedConstraints(arguments, m_size, pa ge()->settings().layoutFallbackWidth()); | 2996 ViewportArguments adjustedArguments = arguments; |
2997 if (!settingsImpl()->expandLayoutToFillVisualViewport()) | |
2998 adjustedArguments.type = ViewportArguments::NoExpansionToFillVisualViewp ort; | |
2999 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedArguments, m_ size, page()->settings().layoutFallbackWidth()); | |
kenneth.r.christiansen
2013/08/27 17:42:21
I would like us to be able to do this in the algor
mnaganov (inactive)
2013/08/27 18:16:51
Sorry, it's not clear to me what do you mean by "t
aelias_OOO_until_Jul13
2013/08/28 21:26:47
I think Kenneth is concerned that you're clobberin
mnaganov (inactive)
2013/08/29 12:09:54
Done.
| |
2997 | 3000 |
2998 if (settingsImpl()->supportDeprecatedTargetDensityDPI()) | 3001 if (settingsImpl()->supportDeprecatedTargetDensityDPI()) |
2999 m_pageScaleConstraintsSet.adjustPageDefinedConstraintsForAndroidWebView( arguments, m_size, page()->settings().layoutFallbackWidth(), deviceScaleFactor() , page()->settings().useWideViewport(), page()->settings().loadWithOverviewMode( )); | 3002 m_pageScaleConstraintsSet.adjustPageDefinedConstraintsForAndroidWebView( adjustedArguments, m_size, page()->settings().layoutFallbackWidth(), deviceScale Factor(), page()->settings().useWideViewport(), page()->settings().loadWithOverv iewMode()); |
3000 | 3003 |
3001 WebSize layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedCon straints().layoutSize); | 3004 WebSize layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedCon straints().layoutSize); |
3002 | 3005 |
3003 if (page()->settings().textAutosizingEnabled() && page()->mainFrame() && lay outSize.width != fixedLayoutSize().width) | 3006 if (page()->settings().textAutosizingEnabled() && page()->mainFrame() && lay outSize.width != fixedLayoutSize().width) |
3004 page()->mainFrame()->document()->textAutosizer()->recalculateMultipliers (); | 3007 page()->mainFrame()->document()->textAutosizer()->recalculateMultipliers (); |
3005 | 3008 |
3006 setFixedLayoutSize(layoutSize); | 3009 setFixedLayoutSize(layoutSize); |
3007 } | 3010 } |
3008 | 3011 |
3009 IntSize WebViewImpl::contentsSize() const | 3012 IntSize WebViewImpl::contentsSize() const |
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4111 } | 4114 } |
4112 | 4115 |
4113 bool WebViewImpl::shouldDisableDesktopWorkarounds() | 4116 bool WebViewImpl::shouldDisableDesktopWorkarounds() |
4114 { | 4117 { |
4115 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); | 4118 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); |
4116 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom | 4119 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom |
4117 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); | 4120 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); |
4118 } | 4121 } |
4119 | 4122 |
4120 } // namespace WebKit | 4123 } // namespace WebKit |
OLD | NEW |