Bug 46748

Summary: [Qt] QWebElements example from QtWebKit Bridge documentation does not work at all
Product: WebKit Reporter: Torsten Werner <twerner>
Component: WebKit QtAssignee: Noam Rosenthal <noam>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, noam
Priority: P4 Keywords: EasyFix, Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
source code to reproduce the bug
none
Patch none

Description Torsten Werner 2010-09-28 13:11:40 PDT
I've already submitted the bug at <http://bugreports.qt.nokia.com/browse/QTBUG-13977> but it got closed without a solution.

The documentation at http://doc.qt.nokia.com/4.7/qtwebkit-bridge.html tells us: "A signal, slot or property that expects or returns a QWebElement can work seamlessly with JavaScript references to DOM elements." But that does not work in my code. I am attaching a tar file with some minimal example code to reproduce the problem with QT 4.7. This code shows that

    * the JavaScript function works() can call a slot doSomethingWithString with a QString as an argument, but
    * the JavaScript function fails() just throws an exception when calling a slot doSomethingWithWebElement with a QWebElement as an argument.

The actual JavaScript exception is:
TypeError: cannot call doSomethingWithWebElement(): unknown type `QWebElement'
Comment 1 Torsten Werner 2010-09-28 13:12:54 PDT
Created attachment 69092 [details]
source code to reproduce the bug
Comment 2 Noam Rosenthal 2011-01-30 17:23:01 PST
Oops, had a bug about this already and I completely missed it.

*** This bug has been marked as a duplicate of bug 37319 ***
Comment 3 Noam Rosenthal 2011-01-30 18:06:04 PST
Reopening, fix for the duplicate bug didn't fix this one :(
Comment 4 Noam Rosenthal 2011-01-30 19:26:34 PST
Created attachment 80613 [details]
Patch
Comment 5 WebKit Commit Bot 2011-01-31 20:33:39 PST
The commit-queue encountered the following flaky tests while processing attachment 80613 [details]:

http/tests/xmlhttprequest/cross-origin-no-authorization.html bug 33357 (author: ap@webkit.org)
The commit-queue is continuing to process your patch.
Comment 6 WebKit Commit Bot 2011-01-31 20:34:55 PST
Comment on attachment 80613 [details]
Patch

Clearing flags on attachment: 80613

Committed r77212: <http://trac.webkit.org/changeset/77212>
Comment 7 WebKit Commit Bot 2011-01-31 20:35:00 PST
All reviewed patches have been landed.  Closing bug.