#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. */
#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 ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
, m_restoredScaleFactor(0)
#endif
+#if ENABLE(TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION)
+ , m_scrollPositionBeforePageRendered(IntPoint())
+#endif
, m_isVisible(true)
, m_isScrollableLayerFocused(false)
, m_isScrollableNodeFocused(false)
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
IntPoint initialScrollPosition;
float initialScaleFactor = m_viewportConstraints.initialScale;
+#if ENABLE(TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION)
+ initialScrollPosition = m_scrollPositionBeforePageRendered;
+ m_scrollPositionBeforePageRendered = IntPoint();
+#endif
#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
// if scroll position and scale factor are restored by history controller,
// move scroll position and scale factor with them
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
IntPoint newPoint = point;
newPoint.scale(scaleFactor(), scaleFactor());
+#if ENABLE(TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION)
+ if (!m_pageDidRendered)
+ m_scrollPositionBeforePageRendered = newPoint;
+ else
+ setVisibleContentRect(IntRect(newPoint, m_visibleContentRect.size()), scaleFactor());
+#else
setVisibleContentRect(IntRect(newPoint, m_visibleContentRect.size()), scaleFactor());
#endif
+#endif
}
#endif
WebCore::IntPoint m_restoredScrollPosition;
float m_restoredScaleFactor;
#endif
+#if ENABLE(TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION)
+ WebCore::IntPoint m_scrollPositionBeforePageRendered;
+#endif
#if ENABLE(TIZEN_WEBKIT2_TILED_SCROLLBAR)
RefPtr<MainFrameScrollbarTizen> m_horizontalScrollbar;