History log of /haiku/src/apps/webpositive/BrowserApp.h
Revision Date Author Comments
# f28e05bc 19-Jul-2022 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Web+: Use reference for urlcontext in app and window

It needs to be deleted after everything is done.
This seems to fix the crashes I could reproduce on exit in my VM.
So might fix #17583.
(WebView also has fContext, but I assume they are part of a window)

Change-Id: I0125f76b0b2331ac3b6a81d6c20087ebdedbf2f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5486
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 2b1972cf 05-Jul-2021 Adrien Destugues <pulkomandy@gmail.com>

webpositive: Fix for HaikuWebKit 1.8.1

Change-Id: I00b2b01bf84e0d22ec759511b2f9435403207c95
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4150
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>


# f86df64b 13-Nov-2015 Adrien Destugues <pulkomandy@pulkomandy.tk>

Web+: implement a simple session management system.

When quitting the app or closing the last window, all windows and tabs
are stored in a "Session" file. This is reloaded when the browser
starts, allowing to restore all windows and tabs.

Limitations: the page content and navigation history are not saved. The
file is written only at exit so this can't be used for crash recovery
(but you can make a backup of your default session).

Fixes #6680.


# 5b7cdbbb 12-Nov-2015 Adrien Destugues <pulkomandy@pulkomandy.tk>

WebPositive: add a cookie manager.

* Allows you to view and delete cookies.
* The list of domains is hierarchized and collapsed to minimize the
number of empty entries
* All cookie parameters are shown for each domain: name, path, value,
expiration date, and known flags.


# 8512f7b0 16-Mar-2014 Zhuowei Zhang <zhuoweizhang@yahoo.com>

Added a simple window to display console messages (fixes #10410)

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 48af26c7 14-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Don't reuse same tab for multiple bookmarks.

As WebKit is asynchronous to the window, when launching a request in a
BWebView, IsBlankTab() will keep returning true until it gets the
BMessage and updates its state.

When opening bookmarks or refs, we would send them too fast, not detect
this, and reuse the same tab for several items. Make sure the blank tab
is only used once when looping over the refs, and force opening all
remaining refs in new tabs of the same window.

Fixes #6625.

Also optimizes the ref loading by not looking up the window for each
ref. Pick one window, then use it for all the bookmarks in the loop.


# dd71f181 14-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Open bookmarks in the current window

* Instead of looking for the first window in the workspace, add the
current one to the message.
* Fixes #6623.


# cb7df3b1 15-Nov-2013 Adrien Destugues <pulkomandy@pulkomandy.tk>

Update webkit and cmake packages

* Some changes required in WebPositive to store the cookies on disk


# fd19c736 30-Apr-2013 Adrien Destugues <pulkomandy@gmail.com>

Fix BAboutWindow lifecycle

BAboutWindow returned false in QuitRequested in order to hide instead of closing.
Not only this keeps a BLooper running for a rarely used window, but it also
prevents quitting an application in the window was not destroyed first.

* Remove aforementioned QuitRequested method,
* Add a static GetWindow method that returns the existing about window, if there
is one, or creates one if there is not. A boolean can be set to tell the caller
what happened,
* Adjust all callers to use that new method, instead of managing the window themselves.


# 6084a1e1 14-Dec-2012 John Scipione <jscipione@gmail.com>

Update the about window of WebPositive.

Also update the version number to 1.1-alpha in the rdef file
matching the text on the old about window.


# ef6778d1 03-Jul-2010 anevilyak <anevilyak@94f232f2-1747-11df-bad5-a5bfde151594>

Fix building Web+ against updated locale kit (currently requires manually placing liblocalestub.a from Haiku's build tree)

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@527 94f232f2-1747-11df-bad5-a5bfde151594


# e979801b 19-May-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

Introduced --fullscreen and -f command line options.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@506 94f232f2-1747-11df-bad5-a5bfde151594


# 845ec8e1 07-Apr-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

* Revised the application startup to check how many windows have been created at
all. Open a blank page if no pages have been created from the arguments passed
to the application.
* If no pages have been created yet, don't offset the last known window frame.
This fixes windows shifting over the screen from session to session.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@397 94f232f2-1747-11df-bad5-a5bfde151594


# 7239ea75 09-Mar-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

* Added a class CookieJarClient to WebCore's CookieJar.h which provides the
same functionality as the global methods for managing cookies. This is only
enabled for the Haiku platform. Since the global cookie methods get a Document
pointer, I envision, the CookieJarClient could eventually be a member of
Document instances. It would then be passed upon WebCore::Page creation.
Still waiting on feedback from other WebKit developers on this one. This change
is more elegant than what the Qt port does, which is to use WebKit classes in
WebCore (layering violation). Right now, a single global instance of a
CookieJarClient can be assigned.
* Implemented CookieJarClientHaiku which uses a BNetworkCookieJar to forward
the requests. Eventually, the behaviour could be browser specific.
* Added all the necessary wiring to BrowserApplication to make the cookie jar
persistent.
* TODO: Actually parse cookies and handle at least the expiration date, but
other stuff like matching the domain of the cookie and the URL and "HTTP-only"
cookies seems important as well.

Even though I have confirmed that cookies are stored and restored correctly,
and also retrieved via the global cookie methods, I can see no change in browser
behaviour. For example enabling "Stay signed in" on googlemail.com does not work
in WebPositive, although BeZillaBrowser automatically logs in in a new session
when surfing to googlemail.com. No idea if this is even implemented with
cookies, although it seems like it should be.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@303 94f232f2-1747-11df-bad5-a5bfde151594


# 5c2095b4 04-Mar-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

* Link against liblocale.so and load app catalog.
* Took FontSelectionView from Haiku Fonts preflet, but almost rewrote it to
adapt for WebPositive needs. It's now a BHandler, so that it can actually
receive messages itself. The Fonts version is a BView which is never attached,
and only receives messages, because the window forwards them. Implemented
option to use separate style menu.
* Provide font settings in the Settings window.
* Wired everything to make it work, although I am not sure standard font is
applied. It does work for the serif font, though. Maybe I ought to install
more fonts and check with simpler HTML.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@284 94f232f2-1747-11df-bad5-a5bfde151594


# b5cd3e84 03-Mar-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

Reworked BrowserApp to use SettingsMessage.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@279 94f232f2-1747-11df-bad5-a5bfde151594


# d0417c56 03-Mar-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

Implemented basic settings window skeleton.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@277 94f232f2-1747-11df-bad5-a5bfde151594


# 0d3093e5 28-Feb-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

Implemented a neat new window management feature: When the app is asked to
open a new file or url, check if there is already a window open on the current
workspace, and if so, open a new tab in that window and bring it to front.
ArgReceived() now reuses RefsReceived(), which has been extended to handle
"url" string fields in the message, since ArgReceived() may also be asked to
open urls and not only local files. The LOAD_AT_STARTING mechanism, which
turned out to be broken for multiple args anyway, could be replaced, since
RefsReceived() already buffers the message when it has been called earlier
then ReadyToRun().

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@244 94f232f2-1747-11df-bad5-a5bfde151594


# a3b3ded5 03-Jul-2012 Alexandre Deckner <alexandre.deckner@uzzl.com>

Manually update to the r238 state, so that we can rebase next commits on top of it

Original commit message of r238:

Split up WebPositive from HaikuLauncher. HaikuLauncher is back to it's simple
self. WebPositive uses a new WebPositive folder in config/settings. Otherwise,
everything should be as before. LauncherWindow and LauncherApp have been renamed
and cleaned up for the Haiku coding style.


# 0b355b4e 03-Jul-2012 Alexandre Deckner <alexandre.deckner@uzzl.com>

Rename LauncherXXX files to their new WebPositive names

Edit history with this rename commit to preserve history as we will git-filter --subdirectory-filter the WebPositive directory. The HaikuLauncher directory was renamed to WebPositive trough the past history with git-filter.


# 8512f7b05659884cb4f2e5ddf68afe17ae133c53 16-Mar-2014 Zhuowei Zhang <zhuoweizhang@yahoo.com>

Added a simple window to display console messages (fixes #10410)

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 48af26c7d3d247d790fcd7531708aca4e83e7e94 14-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Don't reuse same tab for multiple bookmarks.

As WebKit is asynchronous to the window, when launching a request in a
BWebView, IsBlankTab() will keep returning true until it gets the
BMessage and updates its state.

When opening bookmarks or refs, we would send them too fast, not detect
this, and reuse the same tab for several items. Make sure the blank tab
is only used once when looping over the refs, and force opening all
remaining refs in new tabs of the same window.

Fixes #6625.

Also optimizes the ref loading by not looking up the window for each
ref. Pick one window, then use it for all the bookmarks in the loop.


# dd71f181755e323ef18a99b664d116d1d91e1891 14-Jan-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Open bookmarks in the current window

* Instead of looking for the first window in the workspace, add the
current one to the message.
* Fixes #6623.


# cb7df3b1da881c3fadef628b0a0d5a122f131bd0 15-Nov-2013 Adrien Destugues <pulkomandy@pulkomandy.tk>

Update webkit and cmake packages

* Some changes required in WebPositive to store the cookies on disk


# fd19c7366df2134106131c370c99c3ed7f38757f 30-Apr-2013 Adrien Destugues <pulkomandy@gmail.com>

Fix BAboutWindow lifecycle

BAboutWindow returned false in QuitRequested in order to hide instead of closing.
Not only this keeps a BLooper running for a rarely used window, but it also
prevents quitting an application in the window was not destroyed first.

* Remove aforementioned QuitRequested method,
* Add a static GetWindow method that returns the existing about window, if there
is one, or creates one if there is not. A boolean can be set to tell the caller
what happened,
* Adjust all callers to use that new method, instead of managing the window themselves.


# 6084a1e1a4df74cf4a915fb0a14e2ca63ee80f6a 14-Dec-2012 John Scipione <jscipione@gmail.com>

Update the about window of WebPositive.

Also update the version number to 1.1-alpha in the rdef file
matching the text on the old about window.


# ef6778d11e46ede4e674d30de71501627f90ad1f 03-Jul-2010 anevilyak <anevilyak@94f232f2-1747-11df-bad5-a5bfde151594>

Fix building Web+ against updated locale kit (currently requires manually placing liblocalestub.a from Haiku's build tree)

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@527 94f232f2-1747-11df-bad5-a5bfde151594


# e979801bf732ee2bab87b51fcce9a861a0d43043 19-May-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

Introduced --fullscreen and -f command line options.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@506 94f232f2-1747-11df-bad5-a5bfde151594


# 845ec8e102a5530f5a1e3037f7c6e0fe571438e3 07-Apr-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

* Revised the application startup to check how many windows have been created at
all. Open a blank page if no pages have been created from the arguments passed
to the application.
* If no pages have been created yet, don't offset the last known window frame.
This fixes windows shifting over the screen from session to session.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@397 94f232f2-1747-11df-bad5-a5bfde151594


# 7239ea752d0486bed93d1c3e97c26a8556822362 09-Mar-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

* Added a class CookieJarClient to WebCore's CookieJar.h which provides the
same functionality as the global methods for managing cookies. This is only
enabled for the Haiku platform. Since the global cookie methods get a Document
pointer, I envision, the CookieJarClient could eventually be a member of
Document instances. It would then be passed upon WebCore::Page creation.
Still waiting on feedback from other WebKit developers on this one. This change
is more elegant than what the Qt port does, which is to use WebKit classes in
WebCore (layering violation). Right now, a single global instance of a
CookieJarClient can be assigned.
* Implemented CookieJarClientHaiku which uses a BNetworkCookieJar to forward
the requests. Eventually, the behaviour could be browser specific.
* Added all the necessary wiring to BrowserApplication to make the cookie jar
persistent.
* TODO: Actually parse cookies and handle at least the expiration date, but
other stuff like matching the domain of the cookie and the URL and "HTTP-only"
cookies seems important as well.

Even though I have confirmed that cookies are stored and restored correctly,
and also retrieved via the global cookie methods, I can see no change in browser
behaviour. For example enabling "Stay signed in" on googlemail.com does not work
in WebPositive, although BeZillaBrowser automatically logs in in a new session
when surfing to googlemail.com. No idea if this is even implemented with
cookies, although it seems like it should be.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@303 94f232f2-1747-11df-bad5-a5bfde151594


# 5c2095b4b08c8ccbc8ad97a1a2cf30c241b979ea 04-Mar-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

* Link against liblocale.so and load app catalog.
* Took FontSelectionView from Haiku Fonts preflet, but almost rewrote it to
adapt for WebPositive needs. It's now a BHandler, so that it can actually
receive messages itself. The Fonts version is a BView which is never attached,
and only receives messages, because the window forwards them. Implemented
option to use separate style menu.
* Provide font settings in the Settings window.
* Wired everything to make it work, although I am not sure standard font is
applied. It does work for the serif font, though. Maybe I ought to install
more fonts and check with simpler HTML.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@284 94f232f2-1747-11df-bad5-a5bfde151594


# b5cd3e842fd3e758ea8fdb95ff00b38835ed8aec 03-Mar-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

Reworked BrowserApp to use SettingsMessage.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@279 94f232f2-1747-11df-bad5-a5bfde151594


# d0417c565a1a418ece0406d288dcd2e971b5d447 03-Mar-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

Implemented basic settings window skeleton.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@277 94f232f2-1747-11df-bad5-a5bfde151594


# 0d3093e5d8e31fe0d7ea1e86de09633b0bcb6589 28-Feb-2010 stippi <stippi@94f232f2-1747-11df-bad5-a5bfde151594>

Implemented a neat new window management feature: When the app is asked to
open a new file or url, check if there is already a window open on the current
workspace, and if so, open a new tab in that window and bring it to front.
ArgReceived() now reuses RefsReceived(), which has been extended to handle
"url" string fields in the message, since ArgReceived() may also be asked to
open urls and not only local files. The LOAD_AT_STARTING mechanism, which
turned out to be broken for multiple args anyway, could be replaced, since
RefsReceived() already buffers the message when it has been called earlier
then ReadyToRun().

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@244 94f232f2-1747-11df-bad5-a5bfde151594


# a3b3ded520bdf755cef087bfdb2323c0a832627d 03-Jul-2012 Alexandre Deckner <alexandre.deckner@uzzl.com>

Manually update to the r238 state, so that we can rebase next commits on top of it

Original commit message of r238:

Split up WebPositive from HaikuLauncher. HaikuLauncher is back to it's simple
self. WebPositive uses a new WebPositive folder in config/settings. Otherwise,
everything should be as before. LauncherWindow and LauncherApp have been renamed
and cleaned up for the Haiku coding style.


# 0b355b4e977e1c28512c3c60b9fb143e7a574ea1 03-Jul-2012 Alexandre Deckner <alexandre.deckner@uzzl.com>

Rename LauncherXXX files to their new WebPositive names

Edit history with this rename commit to preserve history as we will git-filter --subdirectory-filter the WebPositive directory. The HaikuLauncher directory was renamed to WebPositive trough the past history with git-filter.