Merge lp:~gero-bare/midori/midori-bug-1299988 into lp:midori

Proposed by Gero.Bare
Status: Merged
Approved by: Cris Dywan
Approved revision: 6840
Merged at revision: 6842
Proposed branch: lp:~gero-bare/midori/midori-bug-1299988
Merge into: lp:midori
Diff against target: 27 lines (+7/-3)
1 file modified
midori/midori-view.c (+7/-3)
To merge this branch: bzr merge lp:~gero-bare/midori/midori-bug-1299988
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Review via email: mp+242569@code.launchpad.net

This proposal supersedes a proposal from 2014-11-19.

Commit message

Handle _NEW_WINDOW_ACTION explicitly to make _blank targets work

Description of the change

I hope this solve the error.
Now when the user makes a click in the link with "_blank" target midori opens a new tab and selects that one.

I hope not to be forgetting something.

<html>
<head>
</head>
<body>
<a href="http://example.com"> An example</a>
<a href="http://example.com" target="_blank"> Another example</a>
</body>
</html>

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote : Posted in a previous version of this proposal

../midori/midori-view.c:600:50 error: ‘request’ undeclared (first use in this function)
 if (!midori_view_get_tls_info (view, request, &tls_cert, &tls_flags, &hostname)
 ^

The line removing request seems accidental? And well, it doesn't build without it, so please fix :-)

review: Needs Fixing
Revision history for this message
Cris Dywan (kalikiana) wrote :

Nice! Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'midori/midori-view.c'
--- midori/midori-view.c 2014-07-30 17:47:30 +0000
+++ midori/midori-view.c 2014-11-22 18:30:31 +0000
@@ -543,6 +543,11 @@
543 }543 }
544 else if (decision_type == WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION)544 else if (decision_type == WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION)
545 {545 {
546 const gchar* uri = webkit_uri_request_get_uri (
547 webkit_navigation_policy_decision_get_request (WEBKIT_NAVIGATION_POLICY_DECISION (decision)));
548 g_signal_emit (view, signals[NEW_TAB], 0, uri, FALSE);
549 webkit_policy_decision_ignore(decision);
550 return FALSE;
546 }551 }
547 else if (decision_type == WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION)552 else if (decision_type == WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION)
548 {553 {
@@ -553,9 +558,8 @@
553 return FALSE;558 return FALSE;
554 }559 }
555560
556 void* request = NULL;561 WebKitURIRequest * request = webkit_navigation_policy_decision_get_request (WEBKIT_NAVIGATION_POLICY_DECISION (decision));
557 const gchar* uri = webkit_uri_request_get_uri (562 const gchar* uri = webkit_uri_request_get_uri (request);
558 webkit_navigation_policy_decision_get_request (WEBKIT_NAVIGATION_POLICY_DECISION (decision)));
559 #else563 #else
560 const gchar* uri = webkit_network_request_get_uri (request);564 const gchar* uri = webkit_network_request_get_uri (request);
561 #endif565 #endif

Subscribers

People subscribed via source and target branches

to all changes: