Bug 118860 - [Qt] Add a an isMainFrame property to the QWebNavigationRequest QtWebkit2 API
Summary: [Qt] Add a an isMainFrame property to the QWebNavigationRequest QtWebkit2 API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-18 12:43 PDT by Alexandre Abreu
Modified: 2013-08-28 00:23 PDT (History)
6 users (show)

See Also:


Attachments
Add a 'isMainFrame' parameter to QWebNavigationRequest. (8.93 KB, patch)
2013-07-18 13:40 PDT, Alexandre Abreu
no flags Details | Formatted Diff | Diff
Add revision for the new property and bump the plugin minor versions (10.01 KB, patch)
2013-07-19 12:52 PDT, Alexandre Abreu
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from APPLE-EWS-4 for win-future (103.25 KB, application/zip)
2013-07-27 12:07 PDT, Build Bot
no flags Details
Make sure that we can still access version 3.0 of NavigationRequest QtObject (10.01 KB, patch)
2013-08-27 06:39 PDT, Alexandre Abreu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Abreu 2013-07-18 12:43:59 PDT
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.
Comment 1 Alexandre Abreu 2013-07-18 13:40:52 PDT
Created attachment 207017 [details]
Add a 'isMainFrame' parameter to QWebNavigationRequest.
Comment 2 Simon Hausmann 2013-07-19 02:12:59 PDT
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 :)
Comment 3 Alexandre Abreu 2013-07-19 12:52:32 PDT
Created attachment 207138 [details]
Add revision for the new property and bump the plugin minor versions
Comment 4 Build Bot 2013-07-27 12:07:41 PDT
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
Comment 5 Build Bot 2013-07-27 12:07:44 PDT
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 6 Simon Hausmann 2013-08-26 23:38:44 PDT
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!
Comment 7 Alexandre Abreu 2013-08-27 06:39:26 PDT
Created attachment 209763 [details]
Make sure that we can still access version 3.0 of NavigationRequest QtObject
Comment 8 Alexandre Abreu 2013-08-27 06:42:27 PDT
(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 9 WebKit Commit Bot 2013-08-28 00:23:50 PDT
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>
Comment 10 WebKit Commit Bot 2013-08-28 00:23:53 PDT
All reviewed patches have been landed.  Closing bug.