From: Changhyup Jwa Date: Tue, 8 Oct 2013 10:33:32 +0000 (+0900) Subject: Avoid restoring scale factor 0 by HistoryController X-Git-Tag: 2.2.1_release~118 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c6935b109756927d2d612950f40ba1c6c92f926;p=framework%2Fweb%2Fwebkit-efl.git Avoid restoring scale factor 0 by HistoryController [Title] Avoid restoring scale factor 0 by HistoryController [Issue#] P131004-03246 [Problem] After going back to youtube, content is not rendered [Cause] Scale factor which restored by HistoryController is 0 [Solution] Avoid 0 scale factor restoring Change-Id: I750785fcf338c725655d3d8da89b2872af8ad906 --- diff --git a/Source/WebCore/history/HistoryItem.cpp b/Source/WebCore/history/HistoryItem.cpp index 5209cba..a9c7e1b 100644 --- a/Source/WebCore/history/HistoryItem.cpp +++ b/Source/WebCore/history/HistoryItem.cpp @@ -62,6 +62,9 @@ HistoryItem::HistoryItem() : m_lastVisitedTime(0) , m_lastVisitWasHTTPNonGet(false) , m_pageScaleFactor(0) +#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT) + , m_contentsScaleFactor(0) +#endif , m_lastVisitWasFailure(false) , m_isTargetItem(false) , m_visitCount(0) @@ -79,6 +82,9 @@ HistoryItem::HistoryItem(const String& urlString, const String& title, double ti , m_lastVisitedTime(time) , m_lastVisitWasHTTPNonGet(false) , m_pageScaleFactor(0) +#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT) + , m_contentsScaleFactor(0) +#endif , m_lastVisitWasFailure(false) , m_isTargetItem(false) , m_visitCount(0) @@ -98,6 +104,9 @@ HistoryItem::HistoryItem(const String& urlString, const String& title, const Str , m_lastVisitedTime(time) , m_lastVisitWasHTTPNonGet(false) , m_pageScaleFactor(0) +#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT) + , m_contentsScaleFactor(0) +#endif , m_lastVisitWasFailure(false) , m_isTargetItem(false) , m_visitCount(0) @@ -118,6 +127,9 @@ HistoryItem::HistoryItem(const KURL& url, const String& target, const String& pa , m_lastVisitedTime(0) , m_lastVisitWasHTTPNonGet(false) , m_pageScaleFactor(0) +#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT) + , m_contentsScaleFactor(0) +#endif , m_lastVisitWasFailure(false) , m_isTargetItem(false) , m_visitCount(0) @@ -148,6 +160,9 @@ inline HistoryItem::HistoryItem(const HistoryItem& item) , m_lastVisitWasHTTPNonGet(item.m_lastVisitWasHTTPNonGet) , m_scrollPoint(item.m_scrollPoint) , m_pageScaleFactor(item.m_pageScaleFactor) +#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT) + , m_contentsScaleFactor(item.m_contentsScaleFactor) +#endif , m_lastVisitWasFailure(item.m_lastVisitWasFailure) , m_isTargetItem(item.m_isTargetItem) , m_visitCount(item.m_visitCount) diff --git a/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp b/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp index 235ce0d..74cb953 100755 --- a/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp +++ b/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp @@ -817,6 +817,9 @@ void PageClientImpl::pageDidRequestScroll(const IntPoint& point) #if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT) void PageClientImpl::pageDidRequestRestoreVisibleContentRect(const IntPoint& point, float scale) { + if (!scale) + return; + m_restoredScrollPosition = point; m_restoredScrollPosition.scale(scale, scale); m_restoredScaleFactor = scale;