[Webkit-unassigned] [Bug 108337] New: [Qt] Changing WebView.contentY and WebView.contentX does not redraw content

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 30 06:11:44 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=108337

           Summary: [Qt] Changing WebView.contentY and WebView.contentX
                    does not redraw content
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P3
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: hald at icandy.de


In QtQuick 2.0 WebView is derived from Flickable. Therefore I expect the Flickable API to work with WebView.

However, if I change the contentY or contentX properties the content scrolls correctly out of view, but the now visible content is not painted. If I flick the content a couple of pixels the content suddenly gets painted correctly.

Also, if changing contentY or contentX and then using the mouse wheel or they cursor keys for scrolling, the content jumps back to the original position before contentY or contentX was changed.

Because of this behavior it is not possible to implement scroll bars in QML.

Tested with Qt 5.0.0 official binaries and Qt 5.0.1 pre-release binaries from Jan. 18th on Linux (64 bit) and Windows 8 (32 bit).

Attached is a screenshot showing what happens after scrolling down by using the contentY property.

Also here is an example to reproduce the problem:

import QtQuick 2.0
import QtWebKit 3.0

Rectangle {
    width: 900
    height: 600
    color: "white"

    WebView {
        id: web
        url: "http://heise.de"
        anchors.fill: parent
        anchors.rightMargin: 20
    }

    Rectangle {
        color: "lightgray"
        width: 20
        anchors.right: parent.right
        anchors.top: parent.top
        anchors.bottom: parent.bottom

        Rectangle {
            id: handle
            color: (mouse.pressed || mouse.containsMouse) ? "lightblue" : "darkgray"
            width: parent.width
            height: web.visibleArea.heightRatio * web.height
            y: web.visibleArea.yPosition * web.height

            MouseArea {
                id: mouse
                hoverEnabled: true
                drag.target: parent
                drag.axis: Drag.YAxis
                drag.minimumY: 0
                drag.maximumY: web.height - handle.height
                anchors.fill: parent
                onPositionChanged: {
                    if (pressedButtons == Qt.LeftButton) {
                        web.contentY = handle.y * web.contentHeight / web.height
                    }
                }
            }
        }
    }
}

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list