Bug 105497 - [EFL][WK2] Optimize zooming and scrolling.
Summary: [EFL][WK2] Optimize zooming and scrolling.
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Blocks: 103105
  Show dependency treegraph
Reported: 2012-12-19 22:00 PST by Dongseong Hwang
Modified: 2017-03-11 10:49 PST (History)
8 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Dongseong Hwang 2012-12-19 22:00:04 PST
Qt can make fast scrolling and fast zooming. However, efl always make zooming and scrolling when receiving didRenderFrame mesage from Web Process. It makes big UI responsibility latency.
Refer to Bug 78602

In detail, PageViewportControllerClientQt calls movementStarted() and contentXChanged() if needed.

PageViewportControllerClientQt::PageViewportControllerClientQt(QQuickWebView* viewportItem, QQuickWebPage* pageItem)
    connect(m_viewportItem, SIGNAL(movementStarted()), SLOT(flickMoveStarted()), Qt::DirectConnection);
    connect(m_viewportItem, SIGNAL(movementEnded()), SLOT(flickMoveEnded()), Qt::DirectConnection);
    connect(m_viewportItem, SIGNAL(contentXChanged()), SLOT(pageItemPositionChanged()));
    connect(m_viewportItem, SIGNAL(contentYChanged()), SLOT(pageItemPositionChanged()));

    connect(m_scaleAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)),
            SLOT(scaleAnimationStateChanged(QAbstractAnimation::State, QAbstractAnimation::State)));

I does not have enough knowledge of efl UI toolkit framework. It is good if someone fix this bug before I study efl framework :)
Comment 1 Kenneth Rohde Christiansen 2012-12-21 06:53:56 PST
I don't understand this.

Currently EFL doesn't have a way to pinch and pan, so you can only scroll by selection text/images or by using the wheel. That then sends scroll requests to the UI side.

Could you explain better?
Comment 2 Dongseong Hwang 2012-12-25 18:14:41 PST
Currently, when EFL scrolls, EFL needs two message communications: request (UI Process -> Web Process) and response (Web Process -> UI Process).
However, we can speculatively scroll in UI side like Qt.

In detail, EFL runs following process for scrolling.

1. Request scrolling web process to ui process
- UI Process : WebPageProxy::scrollBy()
- Web Process : WebCore computes

2. Response scrolling
- Web Process : notify did scrolling
- UI Process : PageViewportController::pageDidRequestScroll is called.
-- Update scroll position of EwkView and request rendering of EwkView.

void PageViewportControllerClientEfl::setViewportPosition(const WebCore::FloatPoint& contentsPoint)
    m_contentPosition = contentsPoint;

    FloatPoint pos(contentsPoint);
    pos.scale(scaleFactor(), scaleFactor());

    m_controller->didChangeContentsVisibility(m_contentPosition, scaleFactor());

However, Qt can scroll in UI side. currently, Qt did when flicking.
When Qt view's scroll position is changed, flickMoveStarted(), pageItemPositionChanged() and flickMoveEnded() are called.
Three methods update windows with changed scoll position.

void PageViewportControllerClientQt::flickMoveStarted()

    m_lastScrollPosition = m_viewportItem->contentPos();

    m_ignoreViewportChanges = false;

void PageViewportControllerClientQt::flickMoveEnded()
    // This method is called on the end of the pan or pan kinetic animation.

    m_ignoreViewportChanges = true;
    if (!m_isUserInteracting)

void PageViewportControllerClientQt::pageItemPositionChanged()
    if (m_ignoreViewportChanges)

    QPointF newPosition = m_viewportItem->contentPos();

    updateViewportController(m_lastScrollPosition - newPosition);

    m_lastScrollPosition = newPosition;

I think if efl implemented fast scolling like qt, scrolling latency can be significantly reduced.
Comment 3 Kenneth Rohde Christiansen 2012-12-28 01:32:30 PST
Ah of course we will implement this. Btw, Qt also does the same as us for mouse wheel scrolls. Potentially that could also be done on UI side (with smoothing)
Comment 4 Michael Catanzaro 2017-03-11 10:49:23 PST
Closing this bug because the EFL port has been removed from trunk.

If you feel this bug applies to a different upstream WebKit port and was closed in error, please either update the title and reopen the bug, or leave a comment to request this.