Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 911083002: Carry out a resize even if no layout has been performed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Made needsLayout() true when forcing zero-height and added unit test Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698