Changeset 250209 in webkit
- Timestamp:
- Sep 23, 2019 1:39:11 AM (5 years ago)
- Location:
- releases/WebKitGTK/webkit-2.26/Source/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.26/Source/WebKit/ChangeLog
r250206 r250209 1 2019-09-17 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Initial view loading is slow 4 https://bugs.webkit.org/show_bug.cgi?id=201451 5 6 Reviewed by Sergio Villar Senin. 7 8 The problem is that now we are always calling DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint() after a 9 new process is launched and we used to do that only when launching a new process after a crash. This makes 10 m_hasReceivedFirstUpdate useless, because it's always set to true right after a process is launched. Then, we 11 wait up to half a second (which is usually the case for the initial load) until the first update. We only want 12 to do that when recovering from a crash or when swapping processes to avoid flashing effect. 13 14 * UIProcess/WebPageProxy.cpp: 15 (WebKit::WebPageProxy::launchProcess): Add ProcessLaunchReason parameter and pass it to 16 finishAttachingToWebProcess instead of IsProcessSwap. 17 (WebKit::WebPageProxy::swapToWebProcess): Pass ProcessLaunchReason::ProcessSwap to 18 finishAttachingToWebProcess(). 19 (WebKit::WebPageProxy::finishAttachingToWebProcess): Do not call 20 DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint() when process launch reason is ProcessLaunchReason::InitialProcess. 21 (WebKit::WebPageProxy::launchProcessForReload): Pass ProcessLaunchReason::Reload to launchProcess(). 22 * UIProcess/WebPageProxy.h: Remove IsProcessSwap and add ProcessLaunchReason instead that is passed to 23 launchProcess and finishAttachingToWebProcess. 24 1 25 2019-09-18 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 26 -
releases/WebKitGTK/webkit-2.26/Source/WebKit/UIProcess/WebPageProxy.cpp
r250203 r250209 719 719 } 720 720 721 void WebPageProxy::launchProcess(const RegistrableDomain& registrableDomain )721 void WebPageProxy::launchProcess(const RegistrableDomain& registrableDomain, ProcessLaunchReason reason) 722 722 { 723 723 ASSERT(!m_isClosed); … … 741 741 m_process->addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID, *this); 742 742 743 finishAttachingToWebProcess( IsProcessSwap::No);743 finishAttachingToWebProcess(reason); 744 744 } 745 745 … … 814 814 m_process->addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID, *this); 815 815 816 finishAttachingToWebProcess( IsProcessSwap::Yes);817 } 818 819 void WebPageProxy::finishAttachingToWebProcess( IsProcessSwap isProcessSwap)816 finishAttachingToWebProcess(ProcessLaunchReason::ProcessSwap); 817 } 818 819 void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason) 820 820 { 821 821 ASSERT(m_process->state() != AuxiliaryProcessProxy::State::Terminated); … … 827 827 828 828 // In the process-swap case, the ProvisionalPageProxy already took care of initializing the WebPage in the WebProcess. 829 if ( isProcessSwap != IsProcessSwap::Yes)829 if (reason != ProcessLaunchReason::ProcessSwap) 830 830 initializeWebPage(); 831 831 … … 841 841 pageClient().didRelaunchProcess(); 842 842 m_pageLoadState.didSwapWebProcesses(); 843 m_drawingArea->waitForBackingStoreUpdateOnNextPaint(); 843 if (reason != ProcessLaunchReason::InitialProcess) 844 m_drawingArea->waitForBackingStoreUpdateOnNextPaint(); 844 845 } 845 846 … … 891 892 ASSERT(!hasRunningProcess()); 892 893 auto registrableDomain = m_backForwardList->currentItem() ? RegistrableDomain { URL(URL(), m_backForwardList->currentItem()->url()) } : RegistrableDomain { }; 893 launchProcess(registrableDomain );894 launchProcess(registrableDomain, ProcessLaunchReason::Crash); 894 895 895 896 if (!m_backForwardList->currentItem()) { … … 923 924 924 925 ASSERT(!hasRunningProcess()); 925 launchProcess(RegistrableDomain { URL(URL(), item.url()) } );926 launchProcess(RegistrableDomain { URL(URL(), item.url()) }, ProcessLaunchReason::InitialProcess); 926 927 927 928 if (&item != m_backForwardList->currentItem()) … … 1109 1110 { 1110 1111 if (!hasRunningProcess()) 1111 launchProcess({ } );1112 launchProcess({ }, ProcessLaunchReason::InitialProcess); 1112 1113 1113 1114 return m_process; … … 1122 1123 1123 1124 if (!hasRunningProcess()) 1124 launchProcess(RegistrableDomain { request.url() } );1125 launchProcess(RegistrableDomain { request.url() }, ProcessLaunchReason::InitialProcess); 1125 1126 1126 1127 auto navigation = m_navigationState->createLoadRequestNavigation(ResourceRequest(request), m_backForwardList->currentItem()); … … 1169 1170 1170 1171 if (!hasRunningProcess()) 1171 launchProcess({ } );1172 launchProcess({ }, ProcessLaunchReason::InitialProcess); 1172 1173 1173 1174 URL fileURL = URL(URL(), fileURLString); … … 1224 1225 1225 1226 if (!hasRunningProcess()) 1226 launchProcess({ } );1227 launchProcess({ }, ProcessLaunchReason::InitialProcess); 1227 1228 1228 1229 auto navigation = m_navigationState->createLoadDataNavigation(makeUnique<API::SubstituteData>(data.vector(), MIMEType, encoding, baseURL, userData)); … … 1274 1275 1275 1276 if (!hasRunningProcess()) 1276 launchProcess(RegistrableDomain { baseURL } );1277 launchProcess(RegistrableDomain { baseURL }, ProcessLaunchReason::InitialProcess); 1277 1278 1278 1279 auto transaction = m_pageLoadState.transaction(); … … 1311 1312 1312 1313 if (!hasRunningProcess()) 1313 launchProcess({ } );1314 launchProcess({ }, ProcessLaunchReason::InitialProcess); 1314 1315 1315 1316 auto transaction = m_pageLoadState.transaction(); … … 1341 1342 1342 1343 if (!hasRunningProcess()) 1343 launchProcess(RegistrableDomain { URL(URL(), urlString) } );1344 launchProcess(RegistrableDomain { URL(URL(), urlString) }, ProcessLaunchReason::InitialProcess); 1344 1345 1345 1346 m_process->send(Messages::WebPage::NavigateToPDFLinkWithSimulatedClick(urlString, documentPoint, screenPoint), m_pageID); … … 3650 3651 { 3651 3652 if (&process() == process().processPool().dummyProcessProxy()) 3652 launchProcess({ } );3653 launchProcess({ }, ProcessLaunchReason::InitialProcess); 3653 3654 } 3654 3655 -
releases/WebKitGTK/webkit-2.26/Source/WebKit/UIProcess/WebPageProxy.h
r249258 r250209 1732 1732 void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; } 1733 1733 1734 void launchProcess(const WebCore::RegistrableDomain&); 1734 enum class ProcessLaunchReason { 1735 InitialProcess, 1736 ProcessSwap, 1737 Crash 1738 }; 1739 1740 void launchProcess(const WebCore::RegistrableDomain&, ProcessLaunchReason); 1735 1741 void swapToWebProcess(Ref<WebProcessProxy>&&, std::unique_ptr<DrawingAreaProxy>&&, RefPtr<WebFrameProxy>&& mainFrame); 1736 1742 void didFailToSuspendAfterProcessSwap(); 1737 1743 void didSuspendAfterProcessSwap(); 1738 1739 enum class IsProcessSwap { No, Yes }; 1740 void finishAttachingToWebProcess(IsProcessSwap); 1744 void finishAttachingToWebProcess(ProcessLaunchReason); 1741 1745 1742 1746 RefPtr<API::Navigation> launchProcessForReload();
Note: See TracChangeset
for help on using the changeset viewer.