| 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 2987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2998 | 2998 |
| 2999 ViewportDescription adjustedDescription = description; | 2999 ViewportDescription adjustedDescription = description; |
| 3000 if (settingsImpl()->viewportMetaLayoutSizeQuirk() && adjustedDescription.typ
e == ViewportDescription::ViewportMeta) { | 3000 if (settingsImpl()->viewportMetaLayoutSizeQuirk() && adjustedDescription.typ
e == ViewportDescription::ViewportMeta) { |
| 3001 if (adjustedDescription.maxWidth.type() == ExtendToZoom) | 3001 if (adjustedDescription.maxWidth.type() == ExtendToZoom) |
| 3002 adjustedDescription.maxWidth = Length(); // auto | 3002 adjustedDescription.maxWidth = Length(); // auto |
| 3003 adjustedDescription.minWidth = adjustedDescription.maxWidth; | 3003 adjustedDescription.minWidth = adjustedDescription.maxWidth; |
| 3004 adjustedDescription.minHeight = adjustedDescription.maxHeight; | 3004 adjustedDescription.minHeight = adjustedDescription.maxHeight; |
| 3005 } | 3005 } |
| 3006 float oldInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().i
nitialScale; | 3006 float oldInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().i
nitialScale; |
| 3007 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedDescription,
m_size); | 3007 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedDescription,
m_size); |
| 3008 m_pageScaleConstraintsSet.adjustForAndroidWebViewQuirks(adjustedDescription,
m_size, page()->settings().layoutFallbackWidth(), deviceScaleFactor(), settings
Impl()->supportDeprecatedTargetDensityDPI(), page()->settings().wideViewportQuir
kEnabled(), page()->settings().useWideViewport(), page()->settings().loadWithOve
rviewMode()); | 3008 m_pageScaleConstraintsSet.adjustForAndroidWebViewQuirks(adjustedDescription,
m_size, page()->settings().layoutFallbackWidth(), deviceScaleFactor(), settings
Impl()->supportDeprecatedTargetDensityDPI(), page()->settings().wideViewportQuir
kEnabled(), page()->settings().useWideViewport(), page()->settings().loadWithOve
rviewMode(), settingsImpl()->viewportMetaNonUserScalableQuirk()); |
| 3009 float newInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().i
nitialScale; | 3009 float newInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().i
nitialScale; |
| 3010 if (oldInitialScale != newInitialScale && newInitialScale != -1) { | 3010 if (oldInitialScale != newInitialScale && newInitialScale != -1) { |
| 3011 m_pageScaleConstraintsSet.setNeedsReset(true); | 3011 m_pageScaleConstraintsSet.setNeedsReset(true); |
| 3012 if (mainFrameImpl() && mainFrameImpl()->frameView()) | 3012 if (mainFrameImpl() && mainFrameImpl()->frameView()) |
| 3013 mainFrameImpl()->frameView()->setNeedsLayout(); | 3013 mainFrameImpl()->frameView()->setNeedsLayout(); |
| 3014 } | 3014 } |
| 3015 | 3015 |
| 3016 updateMainFrameLayoutSize(); | 3016 updateMainFrameLayoutSize(); |
| 3017 } | 3017 } |
| 3018 | 3018 |
| (...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4177 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4177 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4178 | 4178 |
| 4179 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4179 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4180 return false; | 4180 return false; |
| 4181 | 4181 |
| 4182 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4182 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4183 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4183 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4184 } | 4184 } |
| 4185 | 4185 |
| 4186 } // namespace WebKit | 4186 } // namespace WebKit |
| OLD | NEW |