| 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 2999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3010 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedDescription,
m_size); | 3010 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedDescription,
m_size); |
| 3011 | 3011 |
| 3012 if (settingsImpl()->clobberUserAgentInitialScaleQuirk() | 3012 if (settingsImpl()->clobberUserAgentInitialScaleQuirk() |
| 3013 && m_pageScaleConstraintsSet.userAgentConstraints().initialScale != -1 | 3013 && m_pageScaleConstraintsSet.userAgentConstraints().initialScale != -1 |
| 3014 && m_pageScaleConstraintsSet.userAgentConstraints().initialScale * devic
eScaleFactor() <= 1) { | 3014 && m_pageScaleConstraintsSet.userAgentConstraints().initialScale * devic
eScaleFactor() <= 1) { |
| 3015 if (!description.maxWidth.isFixed() | 3015 if (!description.maxWidth.isFixed() |
| 3016 || (description.maxWidth == Length(100, ViewportPercentageWidth) &&
m_pageScaleConstraintsSet.pageDefinedConstraints().initialScale == 1.0f)) | 3016 || (description.maxWidth == Length(100, ViewportPercentageWidth) &&
m_pageScaleConstraintsSet.pageDefinedConstraints().initialScale == 1.0f)) |
| 3017 setInitialPageScaleOverride(-1); | 3017 setInitialPageScaleOverride(-1); |
| 3018 } | 3018 } |
| 3019 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()); | 3019 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()); |
| 3020 m_pageScaleConstraintsSet.applyDeviceScaleAdjustment(adjustedDescription, pa
ge()->settings().deviceScaleAdjustment()); |
| 3020 float newInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().i
nitialScale; | 3021 float newInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().i
nitialScale; |
| 3021 if (oldInitialScale != newInitialScale && newInitialScale != -1) { | 3022 if (oldInitialScale != newInitialScale && newInitialScale != -1) { |
| 3022 m_pageScaleConstraintsSet.setNeedsReset(true); | 3023 m_pageScaleConstraintsSet.setNeedsReset(true); |
| 3023 if (mainFrameImpl() && mainFrameImpl()->frameView()) | 3024 if (mainFrameImpl() && mainFrameImpl()->frameView()) |
| 3024 mainFrameImpl()->frameView()->setNeedsLayout(); | 3025 mainFrameImpl()->frameView()->setNeedsLayout(); |
| 3025 } | 3026 } |
| 3026 | 3027 |
| 3027 updateMainFrameLayoutSize(); | 3028 updateMainFrameLayoutSize(); |
| 3028 } | 3029 } |
| 3029 | 3030 |
| (...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4199 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4200 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4200 | 4201 |
| 4201 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4202 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4202 return false; | 4203 return false; |
| 4203 | 4204 |
| 4204 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4205 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4205 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4206 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4206 } | 4207 } |
| 4207 | 4208 |
| 4208 } // namespace blink | 4209 } // namespace blink |
| OLD | NEW |