Bug 82960 - [Qt][WK2] Seg fault when property binding to experimental.contentY
Summary: [Qt][WK2] Seg fault when property binding to experimental.contentY
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 83033
Blocks: 76773
  Show dependency treegraph
 
Reported: 2012-04-02 15:50 PDT by Rafael Brandao
Modified: 2012-05-22 04:46 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Brandao 2012-04-02 15:50:38 PDT
It's easy to reproduce with MiniBrowser code. On BrowserWindow.qml, do the following:

     WebView {
         id: webView
+        property bool scrolledUpToBoundary: webView.experimental.contentY < 0
+        onScrolledUpToBoundaryChanged: console.log('Scrolled up?' + scrolledUpToBoundary)

It is expected that we can lookup to contentY changes and properly bind the properties here. The comparison webView.experimental.contentY < 0 is causing the seg fault. If instead of this you only work inside experimental.onContentYChanged and print the new value, it works. So you can just force updates to "scrollUpToBoundary" this way inside experimental, but I believe we should be able to do the other way around. Here's an example of the workaround:

+        property bool scrolledUpToBoundary: false
+        experimental {
+            onContentYChanged: webView.scrolledUpToBoundary = webView.experimental.contentY < 0
+        }
Comment 1 Andras Becsi 2012-04-03 10:11:09 PDT
This bug might be invalid after https://bugs.webkit.org/show_bug.cgi?id=83033.

(In reply to comment #0)
> It's easy to reproduce with MiniBrowser code. On BrowserWindow.qml, do the following:
> 
>      WebView {
>          id: webView
> +        property bool scrolledUpToBoundary: webView.experimental.contentY < 0
> +        onScrolledUpToBoundaryChanged: console.log('Scrolled up?' + scrolledUpToBoundary)
> 
> It is expected that we can lookup to contentY changes and properly bind the properties here. The comparison webView.experimental.contentY < 0 is causing the seg fault. If instead of this you only work inside experimental.onContentYChanged and print the new value, it works. So you can just force updates to "scrollUpToBoundary" this way inside experimental, but I believe we should be able to do the other way around. Here's an example of the workaround:
> 
> +        property bool scrolledUpToBoundary: false
> +        experimental {
> +            onContentYChanged: webView.scrolledUpToBoundary = webView.experimental.contentY < 0
> +        }
Comment 2 Rafael Brandao 2012-04-03 14:57:33 PDT
(In reply to comment #1)
> This bug might be invalid after https://bugs.webkit.org/show_bug.cgi?id=83033.
> 

Oh yea, hope so. I will mark this one depending on that then. Thanks! :)
Comment 3 Andras Becsi 2012-05-22 04:46:18 PDT
Since the WebView is a direct subclass of Flickable, this bug is no longer valid.