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
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.
Created attachment 145125 [details] patch
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?
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
(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? )
(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 :( :(
Comment on attachment 145125 [details] patch Clearing flags on attachment: 145125 Committed r119218: <http://trac.webkit.org/changeset/119218>
All reviewed patches have been landed. Closing bug.