[haiku-webkit-commits] r219 - webkit/trunk/WebKit/haiku/WebCoreSupport

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Thu, 25 Feb 2010 19:02:13 +0000

Author: stippi
Date: Thu Feb 25 19:02:12 2010
New Revision: 219
URL: http://mmlr.dyndns.org/changeset/219

Log:
Enable something I've found in the Qt port with regards to handling clicking
on links and preventing to open new windows ourself. Improve the comment.

Modified:
   webkit/trunk/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp

Modified: webkit/trunk/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp Thu Feb 
25 18:50:51 2010        (r218)
+++ webkit/trunk/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp Thu Feb 
25 19:02:12 2010        (r219)
@@ -430,15 +430,16 @@
         return;
     }
 
-// NOTE: This is what the Qt port does in QWebPage::acceptNavigationRequest() 
if the
-// current delegation policy is "DelegateExternalLinks":
-//    if 
(WebCore::SecurityOrigin::shouldTreatURLSchemeAsLocal(request.url().scheme())) {
-//        callPolicyFunction(function, PolicyUse);
-//        return;
-//    }
+    // NOTE: This is what the Qt port does in 
QWebPage::acceptNavigationRequest() if the
+    // current delegation policy is "DelegateExternalLinks". Must be good for 
something.
+    if 
(WebCore::SecurityOrigin::shouldTreatURLSchemeAsLocal(request.url().protocol()))
 {
+        callPolicyFunction(function, PolicyUse);
+        return;
+    }
 
-    // Clicks with the middle mouse button shall open a new window,
-    // (or tab respectively depending on browser) - ignore the request for 
this page then.
+    // Clicks with the tertiary mouse button shall open a new window,
+    // (or tab respectively depending on browser) - *ignore* the request for 
this page
+    // then, since we create it ourself.
     BMessage message(NEW_WINDOW_REQUESTED);
     message.AddString("url", request.url().string());
     // Don't switch to the new tab, but load it in the background.

Other related posts:

  • » [haiku-webkit-commits] r219 - webkit/trunk/WebKit/haiku/WebCoreSupport - webkit