RESOLVED FIXED 87999
[Qt][W2] Qml Error in ViewportInfoItem.qml in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=87999
Summary [Qt][W2] Qml Error in ViewportInfoItem.qml in MiniBrowser
Dinu Jacob
Reported 2012-05-31 11:45:33 PDT
qrc:///qml/ViewportInfoItem.qml:28: TypeError: Cannot call method 'toFixed' of undefined qrc:///qml/ViewportInfoItem.qml:35: TypeError: Cannot call method 'toFixed' of undefined qrc:///qml/ViewportInfoItem.qml:42: TypeError: Cannot call method 'toFixed' of undefined qrc:///qml/ViewportInfoItem.qml:49: TypeError: Cannot call method 'toFixed' of undefined qrc:///qml/ViewportInfoItem.qml:57: TypeError: Cannot call method 'toFixed' of undefined qrc:///qml/ViewportInfoItem.qml:71: TypeError: Cannot read property 'width' of undefine
Attachments
patch (2.80 KB, patch)
2012-05-31 11:49 PDT, Dinu Jacob
no flags
Dinu Jacob
Comment 1 2012-05-31 11:48:04 PDT
QWebKitTest methods return invalid QVariant initially and attempt to call toFixed on those results in the error seen. It would be better to return some default values than invalid.
Dinu Jacob
Comment 2 2012-05-31 11:49:00 PDT
Andras Becsi
Comment 3 2012-06-01 04:26:47 PDT
Comment on attachment 145125 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=145125&action=review > Source/WebKit2/UIProcess/API/qt/qwebkittest.cpp:160 > QVariant QWebKitTest::isScalable() const > { > if (QtViewportInteractionEngine* viewport = m_webViewPrivate->viewportInteractionEngine()) > return !!viewport->m_rawAttributes.userScalable; > - return QVariant(); > + return true; Shouldn't the default be false here?
Kenneth Rohde Christiansen
Comment 4 2012-06-01 04:28:50 PDT
Comment on attachment 145125 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=145125&action=review >> Source/WebKit2/UIProcess/API/qt/qwebkittest.cpp:160 >> + return true; > > Shouldn't the default be false here? Good point
Dinu Jacob
Comment 5 2012-06-01 04:35:19 PDT
(In reply to comment #4) > (From update of attachment 145125 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=145125&action=review > > >> Source/WebKit2/UIProcess/API/qt/qwebkittest.cpp:160 > >> + return true; > > > > Shouldn't the default be false here? > > Good point I will change it. Shouldn't user-scalable set to false explicitly though (isn't it treated as user-scalable true if it is not added explicitly? )
Dinu Jacob
Comment 6 2012-06-01 04:39:44 PDT
(In reply to comment #5) > (In reply to comment #4) > > (From update of attachment 145125 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=145125&action=review > > > > >> Source/WebKit2/UIProcess/API/qt/qwebkittest.cpp:160 > > >> + return true; > > > > > > Shouldn't the default be false here? > > > > Good point > > I will change it. Shouldn't user-scalable set to false explicitly though (isn't it treated as user-scalable true if it is not added explicitly? ) Sorry, ignore my comment - I thought I had set it to false :( :(
WebKit Review Bot
Comment 7 2012-06-01 05:27:08 PDT
Comment on attachment 145125 [details] patch Clearing flags on attachment: 145125 Committed r119218: <http://trac.webkit.org/changeset/119218>
WebKit Review Bot
Comment 8 2012-06-01 05:27:13 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.