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

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: move the check to Document::updateLayoutTree Created 4 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 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1852 { 1852 {
1853 // Avoids unnecessary invalidations while various bits of state in TextA utosizer are updated. 1853 // Avoids unnecessary invalidations while various bits of state in TextA utosizer are updated.
1854 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page()); 1854 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page());
1855 performResize(); 1855 performResize();
1856 } 1856 }
1857 1857
1858 m_fullscreenController->updateSize(); 1858 m_fullscreenController->updateSize();
1859 1859
1860 // Update lifecyle phases immediately to recalculate the minimum scale limit for rotation anchoring, 1860 // Update lifecyle phases immediately to recalculate the minimum scale limit for rotation anchoring,
1861 // and to make sure that no lifecycle states are stale if this WebView is em bedded in another one. 1861 // and to make sure that no lifecycle states are stale if this WebView is em bedded in another one.
1862 updateAllLifecyclePhases(); 1862 if (!view->frame().document()->isInitialEmptyDocument())
tkent 2016/02/19 00:43:40 Is this necessary?
1863 updateAllLifecyclePhases();
1863 } 1864 }
1864 1865
1865 void WebViewImpl::resize(const WebSize& newSize) 1866 void WebViewImpl::resize(const WebSize& newSize)
1866 { 1867 {
1867 if (m_shouldAutoResize || m_size == newSize) 1868 if (m_shouldAutoResize || m_size == newSize)
1868 return; 1869 return;
1869 1870
1870 if (page()->mainFrame() && !page()->mainFrame()->isLocalFrame()) { 1871 if (page()->mainFrame() && !page()->mainFrame()->isLocalFrame()) {
1871 // Viewport resize for a remote main frame does not require any 1872 // Viewport resize for a remote main frame does not require any
1872 // particular action, but the state needs to reflect the correct size 1873 // particular action, but the state needs to reflect the correct size
(...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after
4572 { 4573 {
4573 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4574 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4574 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4575 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4575 if (!page()) 4576 if (!page())
4576 return 1; 4577 return 1;
4577 4578
4578 return page()->deviceScaleFactor(); 4579 return page()->deviceScaleFactor();
4579 } 4580 }
4580 4581
4581 } // namespace blink 4582 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698