The Qt/QML API exposed by QtWebkit2 for the navigation requested policy could use an additional 'isMainFrame' property to the QWebNavigationRequest object sent to onNavigationRequested. The fact that it not there makes it hard for an application to take an action with a limited context.
Created attachment 207017 [details] Add a 'isMainFrame' parameter to QWebNavigationRequest.
Comment on attachment 207017 [details] Add a 'isMainFrame' parameter to QWebNavigationRequest. Looks good to me in general, but adding new properties requires a new minor revision of the import. See also http://qt-project.org/doc/qt-5.1/qtqml/qtqml-cppintegration-definetypes.html#type-revisions-and-versions Also, you may want to mark your patch for review :)
Created attachment 207138 [details] Add revision for the new property and bump the plugin minor versions
Comment on attachment 207138 [details] Add revision for the new property and bump the plugin minor versions Attachment 207138 [details] did not pass win-ews (win): Output: http://webkit-queues.appspot.com/results/1247513 New failing tests: dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref1.xhtml dom/xhtml/level1/core/hc_attrappendchild4.xhtml dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.svg dom/html/level2/events/dispatchEvent04.html dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.svg dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.svg dom/html/level1/core/documentinvalidcharacterexceptioncreateentref.html dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.svg dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.svg dom/html/level2/events/dispatchEvent01.html dom/html/level1/core/hc_attrgetvalue2.html dom/html/level2/events/dispatchEvent03.html dom/html/level2/events/dispatchEvent02.html dom/html/level2/core/createDocumentType04.html dom/html/level1/core/documentinvalidcharacterexceptioncreateentref1.html dom/xhtml/level1/core/hc_attrappendchild2.xhtml dom/html/level2/events/dispatchEvent06.html dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi1.xhtml dom/html/level2/events/dispatchEvent07.html dom/html/level2/core/setAttributeNS10.html dom/html/level2/events/dispatchEvent05.html dom/html/level1/core/hc_attrappendchild2.html dom/html/level2/core/createAttributeNS06.html dom/html/level1/core/hc_attrappendchild4.html dom/xhtml/level1/core/documentinvalidcharacterexceptioncreatepi.xhtml dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.svg dom/xhtml/level1/core/documentinvalidcharacterexceptioncreateentref.xhtml dom/html/level1/core/documentinvalidcharacterexceptioncreatepi1.html dom/html/level1/core/documentinvalidcharacterexceptioncreatepi.html dom/html/level2/core/hc_namednodemapinvalidtype1.html
Created attachment 207587 [details] Archive of layout-test-results from APPLE-EWS-4 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: APPLE-EWS-4 Port: win-future Platform: CYGWIN_NT-6.1-WOW64-1.7.20-0.266-5-3-i686-32bit
Comment on attachment 207138 [details] Add revision for the new property and bump the plugin minor versions View in context: https://bugs.webkit.org/attachment.cgi?id=207138&action=review > Source/WebKit/qt/declarative/plugin.cpp:60 > - qmlRegisterUncreatableType<QWebNavigationRequest>(uri, 3, 0, "NavigationRequest", QObject::tr("Cannot create separate instance of NavigationRequest")); > + qmlRegisterUncreatableType<QWebNavigationRequest, 1>(uri, 3, 1, "NavigationRequest", QObject::tr("Cannot create separate instance of NavigationRequest")); I think you may want to keep both lines, in order to continue to be able to instantiate the 3.0 version. Looks good to me otherwise!
Created attachment 209763 [details] Make sure that we can still access version 3.0 of NavigationRequest QtObject
(In reply to comment #6) > (From update of attachment 207138 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=207138&action=review > > > Source/WebKit/qt/declarative/plugin.cpp:60 > > - qmlRegisterUncreatableType<QWebNavigationRequest>(uri, 3, 0, "NavigationRequest", QObject::tr("Cannot create separate instance of NavigationRequest")); > > + qmlRegisterUncreatableType<QWebNavigationRequest, 1>(uri, 3, 1, "NavigationRequest", QObject::tr("Cannot create separate instance of NavigationRequest")); > > I think you may want to keep both lines, in order to continue to be able to instantiate the 3.0 version. > > Looks good to me otherwise! right, done.
Comment on attachment 207138 [details] Add revision for the new property and bump the plugin minor versions Clearing flags on attachment: 207138 Committed r154724: <http://trac.webkit.org/changeset/154724>
All reviewed patches have been landed. Closing bug.