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 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3096 | 3096 |
3097 RefPtr<FrameView> view = mainFrameImpl()->frameView(); | 3097 RefPtr<FrameView> view = mainFrameImpl()->frameView(); |
3098 if (!view) | 3098 if (!view) |
3099 return; | 3099 return; |
3100 | 3100 |
3101 WebSize layoutSize = m_size; | 3101 WebSize layoutSize = m_size; |
3102 | 3102 |
3103 if (settings()->viewportEnabled()) | 3103 if (settings()->viewportEnabled()) |
3104 layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedConstra
ints().layoutSize); | 3104 layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedConstra
ints().layoutSize); |
3105 | 3105 |
| 3106 if (page()->settings().forceZeroLayoutHeight()) |
| 3107 layoutSize.height = 0; |
| 3108 |
3106 view->setLayoutSize(layoutSize); | 3109 view->setLayoutSize(layoutSize); |
3107 } | 3110 } |
3108 | 3111 |
3109 IntSize WebViewImpl::contentsSize() const | 3112 IntSize WebViewImpl::contentsSize() const |
3110 { | 3113 { |
3111 if (!page()->mainFrame()->isLocalFrame()) | 3114 if (!page()->mainFrame()->isLocalFrame()) |
3112 return IntSize(); | 3115 return IntSize(); |
3113 RenderView* root = page()->deprecatedLocalMainFrame()->contentRenderer(); | 3116 RenderView* root = page()->deprecatedLocalMainFrame()->contentRenderer(); |
3114 if (!root) | 3117 if (!root) |
3115 return IntSize(); | 3118 return IntSize(); |
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4235 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4238 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4236 | 4239 |
4237 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4240 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4238 return false; | 4241 return false; |
4239 | 4242 |
4240 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4243 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4241 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4244 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4242 } | 4245 } |
4243 | 4246 |
4244 } // namespace blink | 4247 } // namespace blink |
OLD | NEW |