Update webkit and cmake packages

* Some changes required in WebPositive to store the cookies on disk
This commit is contained in:
Adrien Destugues
2013-11-15 18:39:07 +01:00
parent 564e256649
commit cb7df3b1da
8 changed files with 38 additions and 30 deletions
+1 -4
View File
@@ -398,10 +398,7 @@ if [ IsPackageAvailable haikuwebkit_devel ] {
file: devel haikuwebkit_devel
depends: base
libraries:
$(developLibDir)/libwtf.so
$(developLibDir)/libjavascriptcore.so
$(developLibDir)/libwebcore.so
$(developLibDir)/libwebkit.so
$(developLibDir)/libWebKit.so
headers: $(developHeadersDir)
;
+3 -4
View File
@@ -25,7 +25,7 @@ RemotePackageRepository HaikuPorts
bzip2-1.0.6-3
caya-2013.07.31-3
cdrtools-3.01~a07-3
cmake-2.8.11.2-2
cmake-2.8.11.2-4
ctags-5.8-3
curl-7.26.0-5
curl_devel-7.26.0-5
@@ -148,8 +148,8 @@ RemotePackageRepository HaikuPorts
gettext_x86_libintl-0.18.1.1-5
glu_x86-9.0.0-2
glu_x86_devel-9.0.0-2
haikuwebkit_x86-1.1.3_2013_08_09-2
haikuwebkit_x86_devel-1.1.3_2013_08_09-2
haikuwebkit_x86-1.2.0-2
haikuwebkit_x86_devel-1.2.0-2
icu_x86-4.8.1.1-4
icu_x86_devel-4.8.1.1-4
jpeg_x86-9-3
@@ -218,7 +218,6 @@ RemotePackageRepository HaikuPorts
gperf
grep
groff
haikuwebkit_x86
htmldoc
icu
jam
+16 -15
View File
@@ -38,6 +38,7 @@
#include <Locale.h>
#include <Path.h>
#include <Screen.h>
#include <UrlContext.h>
#include <debugger.h>
#include <stdio.h>
@@ -61,7 +62,7 @@ const char* kApplicationSignature = "application/x-vnd.Haiku-WebPositive";
const char* kApplicationName = B_TRANSLATE_SYSTEM_NAME("WebPositive");
static const uint32 PRELOAD_BROWSING_HISTORY = 'plbh';
#define ENABLE_NATIVE_COOKIES 0
#define ENABLE_NATIVE_COOKIES 1
BrowserApp::BrowserApp()
@@ -73,10 +74,19 @@ BrowserApp::BrowserApp()
fInitialized(false),
fSettings(NULL),
fCookies(NULL),
fCookieJar(NULL),
fContext(NULL),
fDownloadWindow(NULL),
fSettingsWindow(NULL)
{
#if ENABLE_NATIVE_COOKIES
BString cookieStorePath = kApplicationName;
cookieStorePath << "/Cookies";
fCookies = new SettingsMessage(B_USER_SETTINGS_DIRECTORY,
cookieStorePath.String());
BMessage cookieArchive = fCookies->GetValue("cookies", cookieArchive);
fContext = new BUrlContext();
fContext->SetCookieJar(BNetworkCookieJar(&cookieArchive));
#endif
}
@@ -85,7 +95,7 @@ BrowserApp::~BrowserApp()
delete fLaunchRefsMessage;
delete fSettings;
delete fCookies;
delete fCookieJar;
delete fContext;
}
@@ -166,16 +176,6 @@ BrowserApp::ReadyToRun()
mainSettingsPath << "/Application";
fSettings = new SettingsMessage(B_USER_SETTINGS_DIRECTORY,
mainSettingsPath.String());
#if ENABLE_NATIVE_COOKIES
mainSettingsPath = kApplicationName;
mainSettingsPath << "/Cookies";
fCookies = new SettingsMessage(B_USER_SETTINGS_DIRECTORY,
mainSettingsPath.String());
BMessage cookieArchive;
cookieArchive = fCookies->GetValue("cookies", cookieArchive);
fCookieJar = new BNetworkCookieJar(cookieArchive);
BWebPage::SetCookieJar(fCookieJar);
#endif
fLastWindowFrame = fSettings->GetValue("window frame", fLastWindowFrame);
BRect defaultDownloadWindowFrame(-10, -10, 365, 265);
@@ -344,7 +344,8 @@ BrowserApp::QuitRequested()
}
BMessage cookieArchive;
if (fCookieJar != NULL && fCookieJar->Archive(&cookieArchive) == B_OK)
BNetworkCookieJar& cookieJar = fContext->GetCookieJar();
if (cookieJar.Archive(&cookieArchive) == B_OK)
fCookies->SetValue("cookies", cookieArchive);
return true;
@@ -429,7 +430,7 @@ BrowserApp::_CreateNewWindow(const BString& url, bool fullscreen)
fLastWindowFrame.OffsetTo(50, 50);
BrowserWindow* window = new BrowserWindow(fLastWindowFrame, fSettings,
url);
url, fContext);
if (fullscreen)
window->ToggleFullscreen();
window->Show();
+2 -1
View File
@@ -35,6 +35,7 @@
class BNetworkCookieJar;
class BUrlContext;
class DownloadWindow;
class BrowserWindow;
class SettingsMessage;
@@ -74,7 +75,7 @@ private:
SettingsMessage* fSettings;
SettingsMessage* fCookies;
BNetworkCookieJar* fCookieJar;
BUrlContext* fContext;
DownloadWindow* fDownloadWindow;
SettingsWindow* fSettingsWindow;
+9 -3
View File
@@ -322,7 +322,8 @@ private:
BrowserWindow::BrowserWindow(BRect frame, SettingsMessage* appSettings,
const BString& url, uint32 interfaceElements, BWebView* webView)
const BString& url, BUrlContext* context, uint32 interfaceElements,
BWebView* webView)
:
BWebWindow(frame, kApplicationName,
B_DOCUMENT_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
@@ -331,6 +332,7 @@ BrowserWindow::BrowserWindow(BRect frame, SettingsMessage* appSettings,
fInterfaceVisible(false),
fPulseRunner(NULL),
fVisibleInterfaceElements(interfaceElements),
fContext(context),
fAppSettings(appSettings),
fZoomTextOnly(true),
fShowTabsIfSinglePageOpen(true),
@@ -1200,13 +1202,16 @@ BrowserWindow::IsBlankTab() const
void
BrowserWindow::CreateNewTab(const BString& _url, bool select, BWebView* webView)
BrowserWindow::CreateNewTab(const BString& _url, bool select,
BWebView* webView)
{
bool applyNewPagePolicy = webView == NULL;
// Executed in app thread (new BWebPage needs to be created in app thread).
if (webView == NULL)
webView = new BWebView("web view");
webView->SetContext(fContext);
bool isNewWindow = fTabManager->CountTabs() == 0;
fTabManager->AddTab(webView, B_TRANSLATE("New tab"));
@@ -1298,7 +1303,8 @@ BrowserWindow::NewPageCreated(BWebView* view, BRect windowFrame,
{
if (windowFrame.IsValid()) {
BrowserWindow* window = new BrowserWindow(windowFrame, fAppSettings,
BString(), INTERFACE_ELEMENT_STATUS, view);
BString(), fContext, INTERFACE_ELEMENT_STATUS,
view);
window->Show();
} else
CreateNewTab(BString(), activate, view);
+4
View File
@@ -46,6 +46,7 @@ class BPath;
class BStatusBar;
class BStringView;
class BTextControl;
class BUrlContext;
class BWebView;
class SettingsMessage;
class TabManager;
@@ -90,6 +91,7 @@ public:
BrowserWindow(BRect frame,
SettingsMessage* appSettings,
const BString& url,
BUrlContext* context,
uint32 interfaceElements
= INTERFACE_ELEMENT_ALL,
BWebView* webView = NULL);
@@ -249,6 +251,8 @@ private:
bigtime_t fLastMouseMovedTime;
BPoint fLastMousePos;
BUrlContext* fContext;
// cached settings
SettingsMessage* fAppSettings;
bool fZoomTextOnly;
+1 -1
View File
@@ -72,7 +72,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
[ BuildFeatureAttribute webkit : libraries ]
$(TARGET_LIBSTDC++) localestub
[ MultiArchDefaultGristFiles libshared.a ]
be network tracker translation
be network bnetapi tracker translation
:
WebPositive.rdef
;
@@ -29,11 +29,11 @@ BNetworkCookieJar::BNetworkCookieJar()
}
BNetworkCookieJar::BNetworkCookieJar(const BNetworkCookieJar&)
BNetworkCookieJar::BNetworkCookieJar(const BNetworkCookieJar& other)
:
fCookieHashMap(new PrivateHashMap())
{
// TODO
*this = other;
}