Commit Graph

42944 Commits

Author SHA1 Message Date
stippi
7cbf0e1d7e Fix the history restoration for real... duh!
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@325 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:18 +02:00
stippi
e405ff6af7 * Improved the Go menu by sorting items into sub-menus for each day, five days
into the past, and the rest of them into "Earlier".
 * Moved the "Clear history" item to the top.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@324 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:18 +02:00
stippi
2e8e305ebc * Fixed bug that would save the history for each item in the history when loading
the history from disk...
 * Don't touch items when loading them from disk, messing up their visited time.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@323 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:17 +02:00
stippi
e4b86f6ceb * Improved API for more convenience.
* Fixed comparison operators.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@322 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:17 +02:00
stippi
193f6b806f Small cleanup.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@321 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:17 +02:00
stippi
c1f8fe4de1 Improvements in bookmark handling:
* Search for existing bookmarks recursively.
 * Open all bookmarks at once, when the user clicks a bookmark folder in
   the menu (thanks Axel). But do ask for confirmation if there are more
   than ten bookmarks.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@318 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:17 +02:00
stippi
3760e5d868 * Added Tracker Kit NavMenu.h and SlowMenu.h which ought to be removed when
WebPositive is moved into the Haiku repo.
 * Convert the Bookmarks menu into a BNavMenu, make sure it updates to the
   current folder contens each time it opens.
 * Wire everything to complete the bookmark support. Managing bookmarks is
   fairly nice by re-using Tracker. One can even put anything into the book
   mark folder and WebPositive will launch the respective app if it doesn't
   have a META:url attribute. The most immediate benefit is that clicking
   sub-folders in the Bookmarks folder will also open that folder in Tracker.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@315 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:12 +02:00
stippi
e509fd60c1 Added code for bookmarking the current page and opening the Bookmarks folder
in Tracker (or the preferred file manager). Populating the Bookmarks menu is
still missing.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@314 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:03 +02:00
stippi
88e373028c * Made BWebPage download related methods and listener member static.
* Introduced BWebPage::RequestDownload() public API (expected to run
   synchronous).
 * Added necessary wiring for "Download this link" in context menus.
 * Restarting downloads works in principle, although with some quirks.
   (Sometimes it appears the "Desktop" is being downloaded...)

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@310 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:03 +02:00
stippi
dcad381777 Bugfixes for tab view click events:
* When adding/removing tabs, process a fake mouse moved event to synchronize
   with the new tab layout.
 * Count the mouse clicks for the "double click into empty area opens new tab"
   feature in such a way that clicks into tabs never count (closing a tab was
   the first click before, the second would immediately open a new tab and
   similar issues).

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@309 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:03 +02:00
stippi
7239ea752d * 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
2012-07-03 15:37:51 +02:00
stippi
6faa5c3d74 Use the "bytes" member from the keydown message in order to get mapped keys.
The 8 and 2 on the number pad would not work in the URL bar otherwise, since
those map to "B_UP_ARROW" and "B_DOWN_ARROW" as raw char.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@302 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:37:36 +02:00
stippi
c108caf865 * Use a different deletion strategy for the BWebView. Since the BWebPage will
delete itself in the application thread, we cannot delete the BWebView before
   this happens in the window thread. Now BWebPage is repsonsible for deleting
   the view.
 * Also make sure that there are not still loaders running on the frame. Since
   the timer messages arrive in a different handler than the BWebPage handler,
   the timer functions being called could operate on stale pointers. I am not
   sure why WebCore doesn't make sure of this itself. Perhaps we are not supposed
   to delete something directly, but via reference counting. Though I am not sure
   what it would be, since WebCore::Page is not reference countable. Maybe the
   frame... need to investigate. After all, there could be other timers in the
   queue besides loading related ones.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@295 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:37:12 +02:00
stippi
0fe64862b7 Changed how auto-completion fills the choices. It doesn't remove choices with the
same base URL anymore, but simply uses a lower priority for every less recent
choice with the same base URL, and then sorts the result list after fetching.
Previously, you would only get one choice for a given base URL, and that one was
more likely a longer URL, since it was visited more recently than the start page
of the respective site.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@286 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:36:34 +02:00
stippi
5c2095b4b0 * 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
2012-07-03 15:36:18 +02:00
stippi
b5cd3e842f Reworked BrowserApp to use SettingsMessage.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@279 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:33:51 +02:00
stippi
75c44a83ca Moved some utility stuff into new subfolder "support". Some of these needs to be
removed too, once WebPositive is moved into Haiku. SettingsMessage comes straight
from MediaPlayer. Should be moved into src/kits/shared eventually.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@278 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:33:46 +02:00
stippi
d0417c565a Implemented basic settings window skeleton.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@277 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:33:10 +02:00
stippi
c6662bd928 PatternSelector has a default implementation...
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@276 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:32:58 +02:00
stippi
c1bbe7400c Improved coding style and the looks of the matched pattern in choices.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@275 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:32:58 +02:00
stippi
dad87be6e5 Better to darken the match color, this makes it visible also in non-selected
choice items.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@274 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:32:58 +02:00
stippi
e25584f3c5 Wrap main thread in try-catch-block, in order to get a stack trace next time
we hit that recursive init exception.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@273 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:32:58 +02:00
stippi
572a465779 Fixed header guards, thanks Ryan!
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@271 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:32:58 +02:00
stippi
b943093b1b 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.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@270 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:32:58 +02:00
stippi
0cf34b77b1 Ok, the most simplistic way to avoid having too many similars in the autocompletion
choices is to find the "base url" (I am taking the string between :// and the
next /) and avoid adding any more urls with the same base URL. Seems to work
reasonably well. If anyone has any smarter ideas, please speak up! :-)

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@269 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:32:58 +02:00
stippi
1a52acbc07 Wired everything and improved the TextControlCompleter behavior a bit with
regards to eating the B_RETURN key before we can dispatch in BrowserWindow. So
autocompletion for URLs basically works. What's missing is:

* Much better grouping of matches.
* Fix the delay when the BrowsingHistory is first accessed (lazy loads itself
  from disk just then, ought to do it in the application thread after startup,
  which probably makes it unnoticable before the user starts typing a URL).

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@268 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:32:58 +02:00
stippi
fd5768c40d Imported Beam auto completion framework, converted license to MIT (with
permission from Oliver) and applied Haiku coding style. The base classes have
been named such that they could become official Haiku API in the future.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@266 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:32:42 +02:00
stippi
39274de5a3 Double clicking beside the tabs opens a new tab.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@264 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:30:48 +02:00
stippi
ea77068a8e Added shortcuts Cmd-Left/Right for going back/forward.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@263 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:30:48 +02:00
stippi
85fc02b33d Use 18x18 as standard icon size, as it seems more common. Position the icon
slightly more pleasing.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@261 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:30:48 +02:00
stippi
6063974734 Finished all the wiring necessary for favicon support. Send the
NAVIGATION_REQUESTED notification again from the FrameLoaderClient, this way
we can try to fetch the icon even earlier.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@259 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:30:48 +02:00
stippi
10d5754b92 Added BWebSettings and BPrivate::WebSettingsPrivate. Added all the wiring
necessary. The only usable effect as of yet is that favicons arrive at the
BrowserWindow. Favicons are stored in a database and are not fetched when they
alreary exist. The application is expected to try and fetch an icon for a given
url. This is currently done in BWebWindow when the URL for loading has been
initiated. Otherwise it fetches the URL upon the new ICON_RECEIVED notification
from the FrameLoaderClientHaiku. In any case it ends up at BWebWindow::IconReceived(),
so derived classes don't have to worry about the difference. In any case, via
BWebSettings, icons can also be fetched manually, like for the forthcomming
autocompletion text control.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@257 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:30:48 +02:00
stippi
ddb431ba21 Made the integrated menu bar a build time configuration feature. I don't like
it so much, since it somehow looks alien for no /really/ good reason. Maybe
I'll integrate this option into the settings, when I get to those.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@253 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:30:47 +02:00
leavengood
08d60e5886 Shortcut Alt-0 selects the 10th tab (index 9.)
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@250 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:30:47 +02:00
leavengood
e64e6d933a Add shortcuts for using Alt-[1-9] to select that tab.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@249 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:30:47 +02:00
stippi
e6809b325a Experimental integration of the main menu into the tab bar. Please tell me what
you think, I am not 100% it's nicer than before. Can be easily reverted in any
case.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@248 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:30:47 +02:00
stippi
e335cb654c Missing break in switch, but harmless in this case.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@245 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:30:47 +02:00
stippi
0d3093e5d8 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
2012-07-03 15:30:47 +02:00
stippi
df6c7e475d The BWebDownload was using BWebPage for stuff, but the BWebPage can be long
gone when a BWebDownload wanted to use it. Now the class is more self-sufficient.
One example of the problem was clicking a link that opens a blank page, then
closing that page while the download was still loading. 1) The download finished
notification never arrived and 2) clicking to cancel the download would crash
after the download finished, since really it had already selfdestructed...

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@240 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:30:46 +02:00
Alexandre Deckner
a3b3ded520 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.
2012-07-03 15:05:29 +02:00
Alexandre Deckner
0b355b4e97 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.
2012-07-03 14:58:51 +02:00
Rene Gollent
7f7b659ec5 Use safer but slower approach to copying the string. 2012-07-02 20:17:03 -04:00
Rene Gollent
29291c8c92 Cleanups/optimizations. 2012-07-02 19:42:20 -04:00
Rene Gollent
dc5a16bb70 Add TODO note with respect to needed asm implementations. 2012-07-02 15:42:38 -04:00
Rene Gollent
8695be5049 Fix regressions in arch_cpu_user_strlcpy().
- repnz movsb turns out to not actually be a legal instruction,
  resulting in various strings being copied incorrectly, leading to
  random crashes in various places. Rework to use loop instead.
  Thanks to Alex Smith for helping review changes and offering
  improvements.
- Minor cleanups.
- Fixes #8650 properly.
2012-07-02 15:07:17 -04:00
Rene Gollent
fb8447d595 Fix ticket #8650.
- Replace arch_cpu_user_strlcpy() and arch_cpu_user_memset() with x86 assembly
  versions. These correctly handle the fault handler, which had broken again
  on gcc4 for the C versions, causing stack corruption in certain error cases.
  The other architectures will still need to have corresponding asm variants
  added in order for them to not run into the same issue though.
2012-07-02 02:06:29 -04:00
Michael Lotz
5dc5dbbbb4 Allow more chars to be sent unencoded and encode space as '+'.
While this produces not strictly valid query strings, it reduces the
encoding overhead significantly.
2012-07-01 20:30:35 +02:00
Michael Lotz
39a26a0aa5 Ensure that the qrencode caches are cleared when aborting.
The caches contain pointers into memory allocated by debug_malloc()
that come from a pool that is destroied once the command returns.
We therefore have to ensure that all such pointers are cleared in all
cases before returning from the command or we will run into errors
when executing the next commands.
2012-07-01 20:27:35 +02:00
Michael Lotz
2a80abaa7a Use a shorter URL and query to maximize payload space. 2012-07-01 19:36:41 +02:00
Humdinger
f437c10c48 Small visual changes to left scroll view. Fixes #8659.
Fixed width of left scroll view.
Added padding to list items.
Thanks yourpalal for your hints.
2012-07-01 19:06:16 +02:00