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 3370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3381 | 3381 |
3382 RefPtrWillBeRawPtr<FrameView> view = mainFrameImpl()->frameView(); | 3382 RefPtrWillBeRawPtr<FrameView> view = mainFrameImpl()->frameView(); |
3383 if (!view) | 3383 if (!view) |
3384 return; | 3384 return; |
3385 | 3385 |
3386 WebSize layoutSize = m_size; | 3386 WebSize layoutSize = m_size; |
3387 | 3387 |
3388 if (settings()->viewportEnabled()) | 3388 if (settings()->viewportEnabled()) |
3389 layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedConstra
ints().layoutSize); | 3389 layoutSize = flooredIntSize(m_pageScaleConstraintsSet.pageDefinedConstra
ints().layoutSize); |
3390 | 3390 |
3391 if (page()->settings().forceZeroLayoutHeight()) | |
3392 layoutSize.height = 0; | |
3393 | |
3394 view->setLayoutSize(layoutSize); | 3391 view->setLayoutSize(layoutSize); |
3395 } | 3392 } |
3396 | 3393 |
3397 IntSize WebViewImpl::contentsSize() const | 3394 IntSize WebViewImpl::contentsSize() const |
3398 { | 3395 { |
3399 if (!page()->mainFrame()->isLocalFrame()) | 3396 if (!page()->mainFrame()->isLocalFrame()) |
3400 return IntSize(); | 3397 return IntSize(); |
3401 RenderView* root = page()->deprecatedLocalMainFrame()->contentRenderer(); | 3398 RenderView* root = page()->deprecatedLocalMainFrame()->contentRenderer(); |
3402 if (!root) | 3399 if (!root) |
3403 return IntSize(); | 3400 return IntSize(); |
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4624 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4621 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4625 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4622 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4626 } | 4623 } |
4627 | 4624 |
4628 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4625 void WebViewImpl::forceNextWebGLContextCreationToFail() |
4629 { | 4626 { |
4630 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4627 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4631 } | 4628 } |
4632 | 4629 |
4633 } // namespace blink | 4630 } // namespace blink |
OLD | NEW |