| 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 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3098 | 3098 |
| 3099 RefPtr<FrameView> view = mainFrameImpl()->frameView(); | 3099 RefPtr<FrameView> view = mainFrameImpl()->frameView(); |
| 3100 if (!view) | 3100 if (!view) |
| 3101 return; | 3101 return; |
| 3102 | 3102 |
| 3103 WebSize layoutSize = m_size; | 3103 WebSize layoutSize = m_size; |
| 3104 | 3104 |
| 3105 if (settings()->viewportEnabled()) | 3105 if (settings()->viewportEnabled()) |
| 3106 layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedConstra
ints().layoutSize); | 3106 layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedConstra
ints().layoutSize); |
| 3107 | 3107 |
| 3108 if (page()->settings().forceZeroLayoutHeight()) |
| 3109 layoutSize.height = 0; |
| 3110 |
| 3108 view->setLayoutSize(layoutSize); | 3111 view->setLayoutSize(layoutSize); |
| 3109 } | 3112 } |
| 3110 | 3113 |
| 3111 IntSize WebViewImpl::contentsSize() const | 3114 IntSize WebViewImpl::contentsSize() const |
| 3112 { | 3115 { |
| 3113 if (!page()->mainFrame()->isLocalFrame()) | 3116 if (!page()->mainFrame()->isLocalFrame()) |
| 3114 return IntSize(); | 3117 return IntSize(); |
| 3115 RenderView* root = page()->deprecatedLocalMainFrame()->contentRenderer(); | 3118 RenderView* root = page()->deprecatedLocalMainFrame()->contentRenderer(); |
| 3116 if (!root) | 3119 if (!root) |
| 3117 return IntSize(); | 3120 return IntSize(); |
| (...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4261 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4264 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
| 4262 | 4265 |
| 4263 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4266 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
| 4264 return false; | 4267 return false; |
| 4265 | 4268 |
| 4266 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4269 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4267 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4270 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4268 } | 4271 } |
| 4269 | 4272 |
| 4270 } // namespace blink | 4273 } // namespace blink |
| OLD | NEW |