Commit Graph

43038 Commits

Author SHA1 Message Date
stippi
979c4b319d Replace the previous resize request implementation by a more advanced one:
* Ignore resize requests when the window has more than one tab at all.
* Make sure the new size is not larger than the screen and shift the window so
  everything is visible.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@368 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:51 +02:00
stippi
5a9074bc17 * Added static method BWebPage::ShutdownOnce(), which the application can call
for any at-exit-cleanup. Moved the closing of the favicon database from
  BWebSettings there, since I wasn't sure if closing the icon database happened
  at the right time, or perhaps too late if it was done via global destructors.
* Temporarily disabled the native cookie support, as it only delays application
  startup time right now. We are really using the cURL cookies at the moment
  and they work just fine it seems.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@362 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:50 +02:00
stippi
bef126e25e white space cleanup.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@360 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:50 +02:00
stippi
5d164e55a5 Use a better algorithm to figure out the final favicon display size. Icons which
can be scaled down by an even factor will now be displayed better. Also enable
smooth scaling and use a better drawing mode. The net result is that icons will
be displayed between 14x14 and 18x18 with the best suitable scaling factor.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@358 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:50 +02:00
stippi
ec7e3b29c4 Move variable declaration into proper scope and where it's first needed.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@357 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:50 +02:00
stippi
98b056e146 * Scroll the downloads which just started into view.
* Delete the progress view when init fails.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@356 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:50 +02:00
stippi
2232d801e0 Canceling a download needs to unset the info text.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@355 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:50 +02:00
stippi
c5d7a6c949 Manually removing downloads needs to trigger checking the button enabled status
in the download window.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@354 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:50 +02:00
stippi
3b7f919fb8 Removed commented out code which wasn't needed after all.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@353 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:50 +02:00
stippi
90ac9c309c Implemented displaying the download speed and estimated finish time. Looks and
behaves the same as in Tracker's status window.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@352 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:43 +02:00
stippi
7998882116 Imported StringForSize utility function from Haiku. To be removed when
WebPositive is integrated into the Haiku source tree.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@351 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:35 +02:00
stippi
7ac6b59c33 Moved DownloadProgressView and related private classes out into their own source
file.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@350 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:27 +02:00
stippi
34c5cb8c83 Following another suggestion by Axel: Check if a download file is being moved
into the trash. If it's still in progress, cancel it. Dim the icon in any case.
Undim the icon if a download is moved back out of the trash (restarting still
has to happen manually).

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@348 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:19 +02:00
stippi
f65c57d54e Removing finished or missing downloads may have to disable the respective
other button.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@347 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:19 +02:00
stippi
f28abe9d24 * An unfinished download is no longer considered finished, just because it isn't
currently in progress anymore.
* Added feature to remove "missing" downloads, i.e. those for which no
  corresponding file exists.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@346 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:19 +02:00
stippi
b65e0ec04e Just follow a moved download file, as Axel suggested.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@345 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:19 +02:00
stippi
61c96f4e5e Added node monitoring to downloads window.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@344 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:19 +02:00
stippi
2e70c4bf9b Adjust the steps of the downloads window scrollbar.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@343 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:19 +02:00
stippi
0430f93fe3 * Finished testing of downloads interaction with listener and removed debug
output.
 * Optimized download restoration at program start and moved it into download
   window thread in order not to block app startup.
 * Downloads which have been removed meanwhile, are displayed with dimmed icon,
   and the option to Restart it is given.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@342 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:19 +02:00
stippi
636f175b15 Work in progress on better download management...
* Allow to specify the downloads folder in the General settings page.
 * Added necessary wiring.
 * The listener notification was not synchronous anymore because of mixed
   up default function params in BWebPage.
 * Added temporary debug output to WebDownloadPrivate.cpp... the restarting
   downloads code path needs testing yet.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@341 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:19 +02:00
stippi
1beb8c8035 Whoops... should not have been part of the commit...
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@340 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:19 +02:00
stippi
6463044ee7 Add the value to the notification message as well.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@339 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:19 +02:00
stippi
0ba16dd4c1 Added support for attaching listeners to the SettingsMessage, to be notified
when a named value changes.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@338 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:19 +02:00
stippi
9ccfda9c50 Converted to Haiku coding style.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@337 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:18 +02:00
stippi
aa5ba348ea * Added General page in Settings window with option to specify the maximum
age (in days) of items in the browsing history.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@336 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:18 +02:00
stippi
e91fdd924a * Converted BrowsingHistory.h/cpp to Haiku coding style.
* Probably fixed a race condition on program launch. If you started typing
   into the URL field really fast, the static instance in
   BrowsingHistory::DefaultInstance() could be created by two threads, which
   may be responsible for the "recursive init" exception that GCC throws in
   this situation. It's not easy to trigger, maybe this was it.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@335 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:18 +02:00
stippi
cb8b9e4ffd Some notifications are now channeled through BWebPage, the loading progress and
status. This allows the browser to set those properties to the current page
when switching pages.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@333 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:18 +02:00
stippi
0fc94bdcbc At the common submenu at the location where the item was removed.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@331 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:18 +02:00
stippi
f1dcf19d1d Sort items in the Go menu into submenus per base URL. This further reduces the
clutter there. I'm quite happy now, but one issue could be that the Go menu is
not stable: Any URL will always appear only once, somewhere in the hierarchy,
depending on when you last visited it. The BrowsingHistory could be changed,
though, feedback welcome.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@330 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:18 +02:00
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