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

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

Issue 1397713004: Don't bother layout until first navigation is done. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another attempt to fix tests Created 4 years, 9 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 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1856 { 1856 {
1857 // Avoids unnecessary invalidations while various bits of state in TextA utosizer are updated. 1857 // Avoids unnecessary invalidations while various bits of state in TextA utosizer are updated.
1858 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page()); 1858 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page());
1859 performResize(); 1859 performResize();
1860 } 1860 }
1861 1861
1862 m_fullscreenController->updateSize(); 1862 m_fullscreenController->updateSize();
1863 1863
1864 // Update lifecyle phases immediately to recalculate the minimum scale limit for rotation anchoring, 1864 // Update lifecyle phases immediately to recalculate the minimum scale limit for rotation anchoring,
1865 // and to make sure that no lifecycle states are stale if this WebView is em bedded in another one. 1865 // and to make sure that no lifecycle states are stale if this WebView is em bedded in another one.
1866 updateAllLifecyclePhases(); 1866 if (!view->frame().document()->isInitialEmptyDocument())
1867 updateAllLifecyclePhases();
1867 } 1868 }
1868 1869
1869 void WebViewImpl::resize(const WebSize& newSize) 1870 void WebViewImpl::resize(const WebSize& newSize)
1870 { 1871 {
1871 if (m_shouldAutoResize || m_size == newSize) 1872 if (m_shouldAutoResize || m_size == newSize)
1872 return; 1873 return;
1873 1874
1874 if (page()->mainFrame() && !page()->mainFrame()->isLocalFrame()) { 1875 if (page()->mainFrame() && !page()->mainFrame()->isLocalFrame()) {
1875 // Viewport resize for a remote main frame does not require any 1876 // Viewport resize for a remote main frame does not require any
1876 // particular action, but the state needs to reflect the correct size 1877 // particular action, but the state needs to reflect the correct size
(...skipping 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after
4580 { 4581 {
4581 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4582 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4582 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4583 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4583 if (!page()) 4584 if (!page())
4584 return 1; 4585 return 1;
4585 4586
4586 return page()->deviceScaleFactor(); 4587 return page()->deviceScaleFactor();
4587 } 4588 }
4588 4589
4589 } // namespace blink 4590 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698