#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
#define ENABLE_TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT 1 /* Changhyup Jwa(ch.jwa@samsung.com) : Restore visible content rect on going back and forward */
#define ENABLE_TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION 1 /*Santosh Mahto(santosh.ma@samsung.com) : save and restore the scrollpostion before page is not rendered fully. */
+#define ENABLE_TIZEN_WEBKIT2_RESTORE_SCROLLPOINT_ON_FRAME_LOAD_FINISH 1 /*Deepak Mittal(deepak.m1@samsung.com) : restoring scroll points on FrameLoadFinish. */
#endif
#define ENABLE_TIZEN_WEBKIT2_MEMORY_SAVING_MODE 1 /*Eunsol Park(eunsol47.park@samsung.com) : Used for lower memory usage profiling*/
#define ENABLE_TIZEN_WEBKIT2_CONTEXT_X_WINDOW 1 /* Changhyup Jwa(ch.jwa@samsung.com) : WebProcess cannot access to evas, so it needs to obtain window id to get window's orientation. Default root window has sync issue. */
if (pageClient->wasViewportFitsToContent() && !pageClient->viewportConstraints().fixedInitialScale)
pageClient->fitViewportToContent();
+#if ENABLE(TIZEN_WEBKIT2_RESTORE_SCROLLPOINT_ON_FRAME_LOAD_FINISH)
+ pageClient->setRestoredScrollPoints();
+#endif
+
#if ENABLE(TIZEN_WEBKIT2_FORM_DATABASE)
ewk_view_form_password_data_fill(m_view);
#endif
#endif
#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
, m_restoredScaleFactor(0)
+ , m_restoredScrollPosition(IntPoint())
#endif
#if ENABLE(TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION)
, m_scrollPositionBeforePageRendered(IntPoint())
initialScrollPosition = m_restoredScrollPosition;
initialScaleFactor = m_restoredScaleFactor;
}
-#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
- m_restoredScaleFactor = 0;
-#endif
#if ENABLE(TIZEN_DLOG_SUPPORT)
TIZEN_LOGI("visibleContentRect: [%d, %d, %d, %d], scale factor: [%.2f]",
initialScrollPosition.x(), initialScrollPosition.y(),
return horizontalMinScale;
}
+#if ENABLE(TIZEN_WEBKIT2_RESTORE_SCROLLPOINT_ON_FRAME_LOAD_FINISH)
+void PageClientImpl::setRestoredScrollPoints()
+{
+ if(m_restoredScaleFactor)
+ setVisibleContentRect(IntRect(m_restoredScrollPosition, m_visibleContentRect.size()), m_restoredScaleFactor);
+ m_restoredScaleFactor = 0;
+ m_restoredScrollPosition = IntPoint();
+ displayViewport();
+}
+#endif
+
void PageClientImpl::fitViewportToContent()
{
#if ENABLE(TIZEN_DLOG_SUPPORT)
TIZEN_VIRTUAL void updateVisibleContentRectSize(const WebCore::IntSize&);
#endif
void prepareRestoredVisibleContectRect();
+#if ENABLE(TIZEN_WEBKIT2_RESTORE_SCROLLPOINT_ON_FRAME_LOAD_FINISH)
+ void setRestoredScrollPoints();
+#endif
void initializeVisibleContentRect();
double availableMinimumScale();
void fitViewportToContent();