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