// In this case, JS returns incorrect inner size value because scale factor is not updated yet
// So, we update fixed visible content rect at here.
// FIXME: scale factor needs to be calculated and set fixed visible content rect
+
+ // if constrainsScrollingToContentEdge is true, scroll position will be adjusted with contents size.
+ // disable this to avoid adjust scroll position on setFixedVisibleContentRect() because contents size is not fixed yet.
+ bool constrainsScrollingToContentEdge = mainFrameView()->constrainsScrollingToContentEdge();
+ mainFrameView()->setConstrainsScrollingToContentEdge(false);
+
FloatSize contentFixedSize = m_viewportSize;
contentFixedSize.scale(1 / (attr.initialScale * attr.devicePixelRatio));
mainFrameView()->setFixedVisibleContentRect(IntRect(mainFrameView()->scrollPosition(), roundedIntSize(contentFixedSize)));
setResizesToContentsUsingLayoutSize(IntSize(static_cast<int>(attr.layoutSize.width()), static_cast<int>(attr.layoutSize.height())));
+#if ENABLE(TIZEN_VIEWPORT_META_TAG)
+ // recover constrainsScrollingToContentEdge
+ mainFrameView()->setConstrainsScrollingToContentEdge(constrainsScrollingToContentEdge);
+#endif
+
send(Messages::WebPageProxy::DidChangeViewportProperties(attr));
}