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

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: Document::isInitialEmptyDocument() Created 4 years, 11 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 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 { 1904 {
1905 // Avoids unnecessary invalidations while various bits of state in TextA utosizer are updated. 1905 // Avoids unnecessary invalidations while various bits of state in TextA utosizer are updated.
1906 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page()); 1906 TextAutosizer::DeferUpdatePageInfo deferUpdatePageInfo(page());
1907 performResize(); 1907 performResize();
1908 } 1908 }
1909 1909
1910 m_fullscreenController->updateSize(); 1910 m_fullscreenController->updateSize();
1911 1911
1912 // Update lifecyle phases immediately to recalculate the minimum scale limit for rotation anchoring, 1912 // Update lifecyle phases immediately to recalculate the minimum scale limit for rotation anchoring,
1913 // and to make sure that no lifecycle states are stale if this WebView is em bedded in another one. 1913 // and to make sure that no lifecycle states are stale if this WebView is em bedded in another one.
1914 updateAllLifecyclePhases(); 1914 if (!view->frame().document()->isInitialEmptyDocument())
1915 updateAllLifecyclePhases();
1915 } 1916 }
1916 1917
1917 void WebViewImpl::resize(const WebSize& newSize) 1918 void WebViewImpl::resize(const WebSize& newSize)
1918 { 1919 {
1919 if (m_shouldAutoResize || m_size == newSize) 1920 if (m_shouldAutoResize || m_size == newSize)
1920 return; 1921 return;
1921 1922
1922 if (page()->mainFrame() && !page()->mainFrame()->isLocalFrame()) { 1923 if (page()->mainFrame() && !page()->mainFrame()->isLocalFrame()) {
1923 // Viewport resize for a remote main frame does not require any 1924 // Viewport resize for a remote main frame does not require any
1924 // particular action, but the state needs to reflect the correct size 1925 // particular action, but the state needs to reflect the correct size
(...skipping 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after
4639 { 4640 {
4640 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4641 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4641 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4642 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4642 if (!page()) 4643 if (!page())
4643 return 1; 4644 return 1;
4644 4645
4645 return page()->deviceScaleFactor(); 4646 return page()->deviceScaleFactor();
4646 } 4647 }
4647 4648
4648 } // namespace blink 4649 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698