Commit Graph

42948 Commits

Author SHA1 Message Date
stippi
6d93874469 * Add a flag "activate" to WindowFeatures and set it to true by default. It's
supposed to allow specifying whether the new window/page shall be activated
  or not.
* In ContextMenuController, when creating a new page from a link, specify that
  it shall not be activated.
* Handle the new flag in the WebKit layer.

-> "Open link in tab" from the context menu no longer selects the new tab, but
opens it "in the background".

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@414 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:40:33 +02:00
stippi
0ef19ef7e1 Fix the cmd-arrow left/right for go back/forward actions. Truncate the modifiers
to just the part that describes the modifier keys in general. What's left should
be exactly B_COMMAND_KEY. This fixes the workspace switching short-cut to trigger
page history navigation WebPositive.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@408 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:40:17 +02:00
stippi
a26e66b548 One more round of simplification and fixing.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@407 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:40:17 +02:00
stippi
f9977c07c1 strlcpy() takes buffer size, not char count, and will copy buffer size - 1 chars
at max and terminate the buffer.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@406 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:40:17 +02:00
stippi
560610f70e Don't overwrite memory when pressing return in the URL text input.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@405 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:40:17 +02:00
stippi
3aa3e03460 Adopt the URL also when requesting the URL, before it is commited.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@404 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:40:16 +02:00
stippi
ad7c99c0ca * Integrated the Go button into the URL text field.
* Added a context menu to the URL input for integration with the system
  clipboard when you want to use the mouse only.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@403 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:40:16 +02:00
stippi
312655fb6f * Renamed TextControlCompleter to TextViewCompleter, since it actually only
works with the BTextView.
* Factored out the URL text handling into a new class URLInputGroup, which is
  used instead of a plain BTextControl, but currently works much the same way.
  It's a BGroupView though and allows easy addition of other controls and items
  into the URL text field.
* Moved baseURL() method into it's own file, since it's used from multiple
  places now.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@402 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:40:11 +02:00
stippi
406b936322 Selecting the tab for which authentication was requested didn't work anymore.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@401 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:39:56 +02:00
stippi
1cad765a3b Maybe CurrentWebView() is NULL too...
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@400 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:39:56 +02:00
stippi
1137289fbc Simplify the code.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@399 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:39:56 +02:00
stippi
8061d9ebff In BrowserWindow::_TabChanged(), the BWebView could be NULL. Also check if there
is a focused view set at all.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@398 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:39:56 +02:00
stippi
845ec8e102 * 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
2012-07-03 15:39:56 +02:00
stippi
c373752f78 Fixed a spelling error.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@396 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:39:56 +02:00
stippi
3ae87b10f1 Replace the remaining places where the string was redefined.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@395 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:39:56 +02:00
stippi
27ddac2e6e Use the new SettingsKeys.h also in the DownloadsWindow.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@394 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:39:56 +02:00
stippi
d5f0e82b84 * Moved some settings keys into new files SettingsKeys.h/cpp to make it less
likely to introduce erros with spelling settings keys wrong somewhere.
* Introduced new setting for the behavior if tabs should show at all if only
  one page is showing in a window. Defaults to on, i.e. the previous behavior.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@393 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:39:51 +02:00
stippi
bb68c7f66d White space cleanup
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@392 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:39:45 +02:00
stippi
0145cf4349 Remember the currently focused view within a tab in the user data that can be
associated with a BWebView and restore the focus when the tab changes. This fixes
a number of annoying issues.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@391 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:39:45 +02:00
stippi
65e61cdca4 * Make use of the new svn revision jam magic to embed the current svn version
into the about window.
* Give access to the about window from the browser windows.
* Renamed the "Show *" entries in the Window menu to just "*".

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@387 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:39:39 +02:00
stippi
cb0b497952 Don't display the unit of the current size if it's the same as the unit of the
expected size in the download progress view.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@382 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:52 +02:00
stippi
92e8b344ac Added option and infrastructure to zoom the whole page instead of the text only.
(Currently not remembered, but the default (off) is often better than zooming
images.)

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@381 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:52 +02:00
stippi
062b237237 * Added optional BWebView parameter passed to BrowserWindow constructor, which
will be passed to CreateNewTab(), so that BrowserWindows can be created to
  embed a view which already exists.
* Extended NewPageCreated() hook with the additional information that
  BWebPage::createPage() already provides. It can be used to decide if new
  windows shall be created instead of creating another tab for the new page.
* Reworked BrowserWindow constructor with regards to the "DoNotHaveToolbar"
  policy. All views are always created, BLayoutItems are remembered for the
  various groups and are being turned invisible depending on policy. This way
  each BrowserWindow is fully valid and can be reconfigured easily during
  runtime. (Settings could be exposed as well now.)
* Changed ChromeClientHaiku::createWindow() implementation to not disregard
  the "window features" properties if only some of them are not set.

All this combined makes the Haiku User Guide translation page open a separate
window for editing the translations just like BeZillaBrowser. What does not
work (but apparently also not in BeZillaBrowser) is clicking another block and
having the editing window update to show that block instead. Don't know if this
is actually supposed to work that way, it just seems like it should.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@380 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:52 +02:00
stippi
ea8b6f3fd1 * Reworked closing a page programatically. BWebPage no longer sends a plain
B_QUIT_REQUESTED, instead BWebWindow has a new hook and derived classes can
  implement it.
* Some refactoring in BrowserWindow to move code from MessageReceived into
  separate methods for easier debugging and cleaner code.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@378 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:51 +02:00
stippi
f41f967668 Made method that returns the tab index for a contained view public.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@377 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:38:51 +02:00
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