#if USE(TILED_BACKING_STORE) && ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
void PageClientImpl::updateViewportSize(const IntSize& viewportSize, const int angle)
{
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" view size: [%d, %d], angle: [%d]", viewportSize.width(), viewportSize.height(), angle);
+#endif
+
// update viewport size of webkit
m_visibleContentRect.setSize(viewportSize);
m_visibleContentRect = adjustVisibleContentRect(m_visibleContentRect, m_scaleFactor);
{
m_restoredScaleFactor = scaleFactor();
m_restoredScrollPosition = scrollPosition();
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f]", m_restoredScrollPosition.x(), m_restoredScrollPosition.y(), m_restoredScaleFactor);
+#endif
}
void PageClientImpl::initializeVisibleContentRect()
#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
m_restoredScaleFactor = 0;
#endif
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f]", initialScrollPosition.x(), initialScrollPosition.y(), initialScaleFactor);
+#endif
#endif
setVisibleContentRect(IntRect(initialScrollPosition, m_visibleContentRect.size()), initialScaleFactor);
#else
void PageClientImpl::fitViewportToContent()
{
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f]", m_visibleContentRect.x(), m_visibleContentRect.y(), m_viewportConstraints.minimumScale);
+#endif
setVisibleContentRect(m_visibleContentRect, m_viewportConstraints.minimumScale);
}
m_viewportConstraints.minimumScale = availableMinimumScale();
}
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("layout size: [%d, %d], scale: [%.2f, %.2f, %.2f], user scalable: [%s]",
+ m_viewportConstraints.layoutSize.width(), m_viewportConstraints.layoutSize.height(),
+ m_viewportConstraints.initialScale, m_viewportConstraints.minimumScale, m_viewportConstraints.maximumScale,
+ m_viewportConstraints.userScalable ? "TRUE" : "FALSE");
+#endif
+
// setVisibleContentRect() should be called to adjust visible content rect only when view is resized
if (!m_pageDidRendered || m_viewImpl->page()->estimatedProgress() <= 0.1)
return;
if (m_waitFrameOfNewViewortSize)
ewk_view_resume(m_viewImpl->view());
#endif
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f], rotated: [%s]", m_visibleContentRect.x(), m_visibleContentRect.y(), newScale, isRotated ? "Rotated" : "Not rotated");
+#endif
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
setVisibleContentRect(IntRect(newScrollPosition, m_visibleContentRect.size()), newScale);
void PageClientImpl::didChangeContentsSize(const WebCore::IntSize size)
{
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" [%d, %d]", size.width(), size.height());
+#endif
#if USE(TILED_BACKING_STORE)
if (size.isEmpty())
return;
// adjust visible content rect
bool needScrollAdjustment = (adjustVisibleContentRect(m_visibleContentRect, scaleFactor()) != m_visibleContentRect);
bool needScaleAdjustment = (fabs(adjustScaleWithViewport(scaleFactor()) - scaleFactor()) > numeric_limits<float>::epsilon());
- if (needScrollAdjustment || needScaleAdjustment)
+ if (needScrollAdjustment || needScaleAdjustment) {
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" setVisibleContentRect: [%d, %d], [%.2f]", m_visibleContentRect.x(), m_visibleContentRect.y(), scaleFactor());
+#endif
setVisibleContentRect(m_visibleContentRect, scaleFactor());
+ }
}
void PageClientImpl::pageScaleFactorDidChange()
IntPoint newPoint = point;
newPoint.scale(scaleFactor(), scaleFactor());
#if ENABLE(TIZEN_WEBKIT2_BEFORE_PAGE_RENDERED_SCROLL_POSITION)
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], [%s]", newPoint.x(), newPoint.y(), m_pageDidRendered ? "Rendered" : "Before rendered");
+#endif
if (!m_pageDidRendered)
m_scrollPositionBeforePageRendered = newPoint;
else
m_restoredScrollPosition = point;
m_restoredScrollPosition.scale(scale, scale);
m_restoredScaleFactor = scale;
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f]", m_restoredScrollPosition.x(), m_restoredScrollPosition.y(), m_restoredScaleFactor);
+#endif
// Before contents size is fixed, just update visible content rect's position
m_visibleContentRect.setLocation(m_restoredScrollPosition);
if (!m_hasSuspendedContent)
return;
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI("scroll position: [%d, %d], scale factor: [%.2f]", m_viewImpl->scrollPosition().x(), m_viewImpl->scrollPosition().y(), m_viewImpl->scaleFactor());
+#endif
+
// FIXME: Update visibleContentRect with m_viewImpl after resuming content.
// The concept is that the values of EwkViewImpl and PageClient can be different
// during suspending content and they become same when content is resumed.
Settings* settings = m_page->settings();
#if OS(TIZEN)
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" args type: [%d], scale: [%.1f, %.1f, %.1f], layout: [%.1f, %.1f], userScalable: [%.1f]"
+ , static_cast<int>(m_page->viewportArguments().type), m_page->viewportArguments().initialScale
+ , m_page->viewportArguments().minimumScale, m_page->viewportArguments().maximumScale
+ , m_page->viewportArguments().width, m_page->viewportArguments().height, m_page->viewportArguments().userScalable);
+#endif
+
// As android and iphone does, we set layout width to 980 for desktop content
int minimumLayoutFallbackWidth = settings->layoutFallbackWidth();
#else
if (m_viewportSize == size)
return;
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" viewportSize: [%d, %d]", size.width(), size.height());
+#endif
+
m_viewportSize = size;
sendViewportAttributesChanged();
#if USE(TILED_BACKING_STORE)
void WebPage::pageDidRequestScroll(const IntPoint& point)
{
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" scroll position: [%d, %d]", point.x(), point.y());
+#endif
send(Messages::WebPageProxy::PageDidRequestScroll(point));
}
#endif
#if ENABLE(TIZEN_WEBKIT2_HISTORICAL_RESTORE_VISIBLE_CONTENT_RECT)
void WebPage::pageDidRequestRestoreVisibleContentRect(const IntPoint& point, float scale)
{
+#if ENABLE(TIZEN_DLOG_SUPPORT)
+ TIZEN_LOGI(" scale factor: [%.2f], scroll position: [%d, %d]", scale, point.x(), point.y());
+#endif
send(Messages::WebPageProxy::pageDidRequestRestoreVisibleContentRect(point, scale));
}
#endif