From 55e1a69f7a096c9635e93b2456bba4461039b520 Mon Sep 17 00:00:00 2001 From: Devdatta Deshpande Date: Mon, 5 Aug 2013 19:01:56 +0530 Subject: [PATCH] Moved the freezing of paint on load of a new url from provisionalLoadStarted to committedLoad [Title] [Alexa100-5Category]: Combo box is unable to display selected value [Issue#] WEB-3772, WEB-3732 [Problem] On selection change of a drop-down box a new page was being loaded. But the changed value was not getting updated in the drop-down box [Cause] The painting is suspended for current page in WebFrameLoaderClient::provisionalLoadStarted i.e. when the page load starts for new page. [Solution] Moved suspending of paint from provisional load start to WebFrameLoaderClient::committedLoad. So the paint for current page will now be suspended only when the first data for next page is received. [Cherry-picker] Eunmi Lee - cherry pick this patch to fix N_SE-50906. Change-Id: If30bc1117128841585b195a121c63874d174d613 --- Source/WTF/wtf/Platform.h | 2 ++ .../WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 0809b45..7e48cea 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -809,6 +809,8 @@ com) : Patch to do not adjust cover rect as fixed pixel size*/ #define ENABLE_TIZEN_MHTML_CSS_IMPORT_URL_RELATIVE_TO_PARENT 1 /*Santosh Mahto(santosh.ma@samsung.com) : URL of stylesheet specified in @import should be relative to parent Stylesheet in page Serializing */ +#define ENABLE_TIZEN_DELAY_FREEZING_OF_LAYER_TREE_STATE_TILL_COMMITTED_LOAD 1 /* Devdatta Deshpande (d.deshpande@partner.samsung.com): Paint is frozen on new load start. We are delaying this so that any effect of unload events or last gesture by user is visible till the data for next loaded page is available */ + #define ENABLE_TIZEN_OFFLINE_PAGE_SAVE 1 /* Nikhil Bansal (n.bansal@samsung.com) : Tizen feature for offline page save */ #define ENABLE_TIZEN_SIGNAL_APP_BACK_FORWARD_LIST_CHANGED 1 /* Praveen(praveen.ks@samsung.com) : Add API to signal application for change in back forward list */ diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp index 8acd3e0..5c67002 100755 --- a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp +++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp @@ -925,6 +925,14 @@ void WebFrameLoaderClient::didChangeTitle(DocumentLoader*) void WebFrameLoaderClient::committedLoad(DocumentLoader* loader, const char* data, int length) { +#if ENABLE(TIZEN_DELAY_FREEZING_OF_LAYER_TREE_STATE_TILL_COMMITTED_LOAD) + // Disable paints for previous page here. This was earlier done in provisionalLoadStarted + // Due to this any effects of last user gesture or unload events were not painted + WebPage* webPage = m_frame->page(); + if (webPage && m_frame == m_frame->page()->mainWebFrame()) + webPage->drawingArea()->setLayerTreeStateIsFrozen(true); +#endif + // If we're loading a custom representation, we don't want to hand off the data to WebCore. if (m_frameHasCustomRepresentation) return; @@ -1218,12 +1226,14 @@ void WebFrameLoaderClient::restoreViewState() void WebFrameLoaderClient::provisionalLoadStarted() { +#if !ENABLE(TIZEN_DELAY_FREEZING_OF_LAYER_TREE_STATE_TILL_COMMITTED_LOAD) WebPage* webPage = m_frame->page(); if (!webPage) return; if (m_frame == m_frame->page()->mainWebFrame()) webPage->drawingArea()->setLayerTreeStateIsFrozen(true); +#endif } void WebFrameLoaderClient::didFinishLoad() -- 2.7.4