#define ENABLE_TIZEN_WEBKIT2_FORM_DATABASE 1 /* Changhyup Jwa(ch.jwa@samsung.com) : Form database support */
+#define ENABLE_TIZEN_WEBKIT2_SUSPEND_LOADING_URL 1 /* Changhyup Jwa(ch.jwa@samsung.com) : Suspend loading URL while view size is empty */
+
#define ENABLE_TIZEN_RESET_CACHEDFRAME_CONTENTSIZE_ON_NAVIGATION 1 /* Divakar.A (divakar.a@samsung.com) : Resetting contentSize of CachedFrameView on navigation. This flag will be removed once latest opensource merge is done. */
#define ENABLE_TIZEN_CSP 1 /* Seonae Kim(sunaeluv.kim@samsung.com) : Support CSP to provide EWK API to web applicatoin */
bool isVisible() const;
const char* url() const { return m_url; }
+
+#if ENABLE(TIZEN_WEBKIT2_SUSPEND_LOADING_URL)
+ const char* suspendedURL() { return m_suspendedURL; }
+ void setSuspendedURL(const char* url) { m_suspendedURL = url; }
+#endif
+
const char* faviconURL() const { return m_faviconURL; }
const char* title() const;
WebKit::InputMethodContextEfl* inputMethodContext();
WKEinaSharedString m_cursorGroup;
WKEinaSharedString m_faviconURL;
WKEinaSharedString m_url;
+
+#if ENABLE(TIZEN_WEBKIT2_SUSPEND_LOADING_URL)
+ WKEinaSharedString m_suspendedURL;
+#endif
+
mutable WKEinaSharedString m_title;
WKEinaSharedString m_theme;
mutable WKEinaSharedString m_customEncoding;
}
#if USE(TILED_BACKING_STORE) && ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
-void PageClientImpl::updateViewportSize(const IntSize& viewportSize, const int angle)
+void PageClientImpl::updateViewportSize(const IntSize& viewportSize)
{
#if ENABLE(TIZEN_DLOG_SUPPORT)
- TIZEN_LOGI(" view size: [%d, %d], angle: [%d]", viewportSize.width(), viewportSize.height(), angle);
+ TIZEN_LOGI(" view size: [%d, %d]", viewportSize.width(), viewportSize.height());
#endif
// update viewport size of webkit
m_visibleContentRect.setSize(viewportSize);
- m_viewImpl->page()->setViewportSize(viewportSize);
-}
-
-void PageClientImpl::updateVisibleContentRectSize(const IntSize& size)
-{
- // update visible content rect's size and scroll position
- m_visibleContentRect.setSize(size);
m_visibleContentRect = adjustVisibleContentRect(m_visibleContentRect, m_scaleFactor);
m_viewImpl->setScrollPosition(m_visibleContentRect.location());
-
-#if ENABLE(TIZEN_DLOG_SUPPORT)
- TIZEN_LOGI("size: [%d, %d], visibleContentRect: [%d, %d, %d, %d]", size.width(), size.height(),
- m_visibleContentRect.x(), m_visibleContentRect.y(), m_visibleContentRect.width(), m_visibleContentRect.height());
-#endif
+ m_viewImpl->page()->setViewportSize(viewportSize);
}
#endif
m_viewImpl->page()->close();
}
-void PageClientEvasGL::updateViewportSize(const WebCore::IntSize& viewportSize, const int angle)
-{
- PageClientImpl::updateViewportSize(viewportSize, angle);
-}
-
-void PageClientEvasGL::updateVisibleContentRectSize(const WebCore::IntSize& size)
+void PageClientEvasGL::updateViewportSize(const WebCore::IntSize& viewportSize)
{
if (m_surface) {
evas_gl_surface_destroy(m_evasGL, m_surface);
}
setTargetSurface();
- PageClientImpl::updateVisibleContentRectSize(size);
+ PageClientImpl::updateViewportSize(viewportSize);
}
void PageClientEvasGL::setViewNeedsDisplay(const WebCore::IntRect& rect)
ViewportConstraints computeViewportConstraints(const WebCore::ViewportAttributes&);
double adjustScaleWithViewport(double);
#if USE(TILED_BACKING_STORE) && ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
- TIZEN_VIRTUAL void updateViewportSize(const WebCore::IntSize&, const int);
- TIZEN_VIRTUAL void updateVisibleContentRectSize(const WebCore::IntSize&);
+ TIZEN_VIRTUAL void updateViewportSize(const WebCore::IntSize&);
#endif
void prepareRestoredVisibleContectRect();
void initializeVisibleContentRect();
}
~PageClientEvasGL();
- virtual void updateViewportSize(const WebCore::IntSize&, const int);
- virtual void updateVisibleContentRectSize(const WebCore::IntSize&);
+ virtual void updateViewportSize(const WebCore::IntSize&);
virtual void setViewNeedsDisplay(const WebCore::IntRect&);
virtual void displayViewport();
virtual void drawContents();
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl);
#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
evas_object_image_native_surface_set(smartData->image, 0);
-
- Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
- impl->pageClient->updateViewportSize(IntSize(width, height), ecore_evas_rotation_get(ee));
#if ENABLE(TIZEN_RUNTIME_BACKEND_SELECTION)
if (!ewk_view_is_opengl_backend(ewkView))
_ewk_view_composite(smartData);
#endif
#if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE) && !ENABLE(TIZEN_WEBKIT2_EFL_WTR)
Ecore_Evas* ee = ecore_evas_ecore_evas_get(smartData->base.evas);
- impl->pageClient->updateVisibleContentRectSize(IntSize(width, height));
+ impl->pageClient->updateViewportSize(IntSize(width, height));
if (ewk_view_is_opengl_backend(ewkView))
impl->pageClient->displayViewport();
#endif
impl->pageClient->frameRectChanged();
#endif
}
+
+#if ENABLE(TIZEN_WEBKIT2_SUSPEND_LOADING_URL)
+ // Load URL if it's suspended
+ if (impl->suspendedURL()) {
+ TIZEN_LOGI("load suspended URL: %s, time: %f", impl->suspendedURL() ? impl->suspendedURL() : "NULL", ecore_time_get() * 1000);
+ ewk_view_url_set(ewkView, impl->suspendedURL());
+ impl->setSuspendedURL(0);
+ }
+#endif
#endif // #if OS(TIZEN)
}
EWK_VIEW_IMPL_GET_OR_RETURN(smartData, impl, false);
EINA_SAFETY_ON_NULL_RETURN_VAL(url, false);
+#if ENABLE(TIZEN_WEBKIT2_SUSPEND_LOADING_URL)
+ // Suspend loading URL before view size is calculated
+ if (!smartData->view.w || !smartData->view.h) {
+ impl->setSuspendedURL(url);
+ TIZEN_LOGI("suspended URL: %s, time: %f", impl->suspendedURL() ? impl->suspendedURL() : "NULL", ecore_time_get() * 1000);
+ return true;
+ }
+#endif
+
impl->pageProxy->loadURL(String::fromUTF8(url));
impl->informURLChange();
impl->pageProxy->drawingArea()->setSize(IntSize(width, height), IntSize());
impl->pageClient->setWaitFrameOfNewViewortSize(true);
ewk_view_suspend(ewkView);
- impl->pageClient->updateViewportSize(IntSize(width, height), angle);
+ impl->pageClient->updateViewportSize(IntSize(width, height));
#endif
}