| 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 2996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3007 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedDescription,
m_size); | 3007 m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedDescription,
m_size); |
| 3008 | 3008 |
| 3009 if (settingsImpl()->clobberUserAgentInitialScaleQuirk() | 3009 if (settingsImpl()->clobberUserAgentInitialScaleQuirk() |
| 3010 && m_pageScaleConstraintsSet.userAgentConstraints().initialScale != -1 | 3010 && m_pageScaleConstraintsSet.userAgentConstraints().initialScale != -1 |
| 3011 && m_pageScaleConstraintsSet.userAgentConstraints().initialScale * devic
eScaleFactor() <= 1) { | 3011 && m_pageScaleConstraintsSet.userAgentConstraints().initialScale * devic
eScaleFactor() <= 1) { |
| 3012 if (!description.maxWidth.isFixed() | 3012 if (!description.maxWidth.isFixed() |
| 3013 || (description.maxWidth == Length(100, ViewportPercentageWidth) &&
m_pageScaleConstraintsSet.pageDefinedConstraints().initialScale == 1.0f)) | 3013 || (description.maxWidth == Length(100, ViewportPercentageWidth) &&
m_pageScaleConstraintsSet.pageDefinedConstraints().initialScale == 1.0f)) |
| 3014 setInitialPageScaleOverride(-1); | 3014 setInitialPageScaleOverride(-1); |
| 3015 } | 3015 } |
| 3016 m_pageScaleConstraintsSet.adjustForAndroidWebViewQuirks(adjustedDescription,
m_size, page()->settings().layoutFallbackWidth(), deviceScaleFactor(), settings
Impl()->supportDeprecatedTargetDensityDPI(), page()->settings().wideViewportQuir
kEnabled(), page()->settings().useWideViewport(), page()->settings().loadWithOve
rviewMode()); | 3016 m_pageScaleConstraintsSet.adjustForAndroidWebViewQuirks(adjustedDescription,
m_size, page()->settings().layoutFallbackWidth(), deviceScaleFactor(), settings
Impl()->supportDeprecatedTargetDensityDPI(), page()->settings().wideViewportQuir
kEnabled(), page()->settings().useWideViewport(), page()->settings().loadWithOve
rviewMode()); |
| 3017 m_pageScaleConstraintsSet.applyDeviceScaleAdjustment(adjustedDescription, pa
ge()->settings().deviceScaleAdjustment()); |
| 3017 float newInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().i
nitialScale; | 3018 float newInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().i
nitialScale; |
| 3018 if (oldInitialScale != newInitialScale && newInitialScale != -1) { | 3019 if (oldInitialScale != newInitialScale && newInitialScale != -1) { |
| 3019 m_pageScaleConstraintsSet.setNeedsReset(true); | 3020 m_pageScaleConstraintsSet.setNeedsReset(true); |
| 3020 if (mainFrameImpl() && mainFrameImpl()->frameView()) | 3021 if (mainFrameImpl() && mainFrameImpl()->frameView()) |
| 3021 mainFrameImpl()->frameView()->setNeedsLayout(); | 3022 mainFrameImpl()->frameView()->setNeedsLayout(); |
| 3022 } | 3023 } |
| 3023 | 3024 |
| 3024 updateMainFrameLayoutSize(); | 3025 updateMainFrameLayoutSize(); |
| 3025 } | 3026 } |
| 3026 | 3027 |
| (...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4185 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4186 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4186 | 4187 |
| 4187 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4188 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4188 return false; | 4189 return false; |
| 4189 | 4190 |
| 4190 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4191 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4191 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4192 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4192 } | 4193 } |
| 4193 | 4194 |
| 4194 } // namespace WebKit | 4195 } // namespace WebKit |
| OLD | NEW |