[haiku-webkit-commits] r270 - webkit/trunk/WebKit/haiku/WebPositive

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Tue, 02 Mar 2010 21:23:45 +0000

Author: stippi
Date: Tue Mar  2 21:23:44 2010
New Revision: 270
URL: http://mmlr.dyndns.org/changeset/270

Log:
Preload the browsing history after application start. This avoids the delay
when beginning to type something in the URL text field and the autocompletion
invoked the BrowsingHistory for the first time.

Modified:
   webkit/trunk/WebKit/haiku/WebPositive/BrowserApp.cpp

Modified: webkit/trunk/WebKit/haiku/WebPositive/BrowserApp.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/BrowserApp.cpp        Tue Mar  2 
18:56:42 2010        (r269)
+++ webkit/trunk/WebKit/haiku/WebPositive/BrowserApp.cpp        Tue Mar  2 
21:23:44 2010        (r270)
@@ -30,6 +30,7 @@
 #include "BrowserApp.h"
 
 #include "BrowserWindow.h"
+#include "BrowsingHistory.h"
 #include "DownloadWindow.h"
 #include "WebPage.h"
 #include "WebSettings.h"
@@ -47,7 +48,7 @@
 
 const char* kApplicationSignature = "application/x-vnd.Haiku-WebPositive";
 const char* kApplicationName = "WebPositive";
-
+static const uint32 PRELOAD_BROWSING_HISTORY = 'plbh';
 
 BrowserApp::BrowserApp()
        : BApplication(kApplicationSignature)
@@ -132,6 +133,7 @@
                        BMessenger(fDownloadWindow));
                window->Show();
        }
+       PostMessage(PRELOAD_BROWSING_HISTORY);
 }
 
 
@@ -139,6 +141,9 @@
 BrowserApp::MessageReceived(BMessage* message)
 {
        switch (message->what) {
+       case PRELOAD_BROWSING_HISTORY:
+               BrowsingHistory::defaultInstance();
+               break;
        case B_SILENT_RELAUNCH:
                _CreateNewPage("");
                break;

Other related posts:

  • » [haiku-webkit-commits] r270 - webkit/trunk/WebKit/haiku/WebPositive - webkit