Commit Graph

43024 Commits

Author SHA1 Message Date
stippi
86007edfa7 Use Cmd-J for hiding the downloads window. (Ticket #37)
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@507 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:10 +02:00
stippi
e979801bf7 Introduced --fullscreen and -f command line options.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@506 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:10 +02:00
stippi
f94d5e2800 Don't store the last window frame with the full-screen window size...
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@505 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:10 +02:00
stippi
af7e6dd1a4 Display tool tips for browser tabs with the page title.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@504 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:10 +02:00
stippi
402459960e Fix empty URL input bar when switching to a tab after it loaded in the
background.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@503 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:10 +02:00
stippi
1f009b1e11 Tweaked the delays for the auto-hiding of the mouse pointer and the interface
in full-screen mode.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@502 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:10 +02:00
stippi
37876e4b33 Extend the auto-completion framework in order to support using page-up/down
to navigate the choices list.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@501 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:10 +02:00
stippi
90a69c8e1d The mechanism with which the TextViewCompleter detected changes (attaching a
BMessageFilter to the BTextView to pre-process key down events) missed changes
to the BTextView via other means, for example by pasting, or simply when
SetText() is invoked on the BTextView. -> Introduced an alternative method
of making the TextViewCompleter aware of changes, by invoking new method
TextModified(). To bypass the old method, one has to call
SetModificationsReported(true). URLInput::URLTextView now uses the new method
in InsertText() and DeleteText(), which catches any and all changes to the
text. Since the BAutoCompleter framework also controls the editor view contents,
it needs to protect against re-entering some methods when the editor view
reports the changes (fIgnoreEditViewStateChanges). Since we want the
BAutoCompleter to always be aware of the current editor view contents, but not
necessarily also running the choice mechanism (i.e. when you enter
"www.google.com", you don't want the auto-completion kick back in when it is
programmatically changed to "http://www.google.com" later on), the
EditViewStateChange() method gets a boolean now "updateChoices". All
programmatic changes to the URL will then not trigger displaying the choice
pop-up, but the BAutoCompleter is always aware of the current editor view
contents.

All this fixes numerous issues and inconsistencies with entering text in the
URL text view.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@500 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:10 +02:00
stippi
eb44597cd0 Revert r250, since CMD-0 for changing to the tenth tab conflicts with the
shortcut for resetting the page zoom, but that is also an established shortcut
from Firefox.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@499 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:10 +02:00
stippi
0e42079313 Remember the current URL input contents and selection when switching away from
a tab, and restore them when switching back.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@498 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:10 +02:00
stippi
208ecbcad5 * Moved auto-hiding the mouse pointer into BWebView::Pulse().
* Unhide the interface when the user invokes CMD-L (Open location).
* Make sure the progress bar is really hidden, sometimes it would be
  visible again after unhiding the rest of the interface.
* Added a setting for the auto-hiding the mouse pointer feature. It defaults
  to true, since I think it's useful for an app where the pointer would
  usually be in the way.
* Hide the mouse pointer in any case as soon as the user begins typing, also
  hide potentially showing tool tips in that case.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@496 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:10 +02:00
stippi
59b99c1229 Upated to use new B_TRANSLATE macros. Rene also send me a patch for this
(thanks!), but I've redone it to keep the 80 char/line limit.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@493 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:09 +02:00
stippi
17813bda8c Do not advertize support for types we don't actually support. These are handled
by the urlwrapper anyway.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@489 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:09 +02:00
stippi
e07fc6b71d * Changed the implementation of context menus in DownloadProgressViews. The views
were intercepting mouse messages even if the window was not showing. Now
  secondary clicks are intercepted in DownloadWindow and the target view is found,
  which makes this much cheaper.
* Offset context menus by 2 pixels, so the mouse does not start directly over
  an item.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@488 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:09 +02:00
stippi
e7c6e9f747 Reset the page icon in the URL input for new tabs.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@487 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:09 +02:00
stippi
ea40bbf2d1 * Moved "Auto-hide" menu item into Settings window, as a check box along the
"show tabs if single page only" option.
* Fixed problems with showing tabs when opening new tabs while the interface
  was hidden. Introduced a new flag which tracks the hidden state to make
  this easier.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@486 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:09 +02:00
stippi
c2227feb1e Implemented an "auto-hide the interface" feature for the full-screen mode. The
mouse cursor will automatically hide if you don't move it, unless it's over the
interface. The interface will disappear after three seconds if the cursor is
not above it. It will re-appear when you touch the top of the screen with the
mouse. I find this the best solution, since the mouse is also used for
navigation in the page, and showing the interface based on some virtual area
of the interface would just get in the way.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@485 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:09 +02:00
stippi
c0f79c0321 Added button besides main menu bar which is only visible in fullscreen mode and
allows to go back to window'ed mode. The icon is the window icon which Deskbar
uses also.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@484 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:09 +02:00
stippi
095c4241ef Moved BitmapButton into it's own file.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@483 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:44:03 +02:00
stippi
f157030d2e Implemented most basic fullscreen feature.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@482 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:56 +02:00
stippi
9a6307059a Moved handling/display of "main site error" alert into client.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@481 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:56 +02:00
stippi
9adbaa4378 Removed unneeded headers.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@480 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:56 +02:00
stippi
27dab3e5fe Make sure never to draw the favicon too big, in case we only got a big one from
the page, and use the proper drawing mode and filtering.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@479 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:56 +02:00
stippi
9f30678a67 Implemented a CredentialsStorage class with optional persistency. Two global
objects are used for session and persistent storage of credentials with the
appropriate locking. Passwords are stored on disk insecurely. If the user
uses the checkmark in the authentication window to remember the credentials,
the persistent storage will be used, otherwise the session storage. In another
words, even if not asked to remember the credentials, the same user/pass never
needs to be entered more than once per session, unlike before. WebCore already
contains a CredentialStorage class, but we don't use it. It could be used via
the CURL networking backend implementation, only the CF backend uses it at all.
Since we don't have a "keyring" OS level service, this solution was more
convenient for the time being.

Note all this has nothing to do with storage of form data entered by the user.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@478 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:51 +02:00
stippi
ea992272d7 Added a few utility classes from Haiku. To be removed when WebPositive moves
into Haiku. Added new file HashKeys.h which implements commonly used HashKey
classes. Additionally to the ones found in HashMap.h, it has a HashKeyString
class, which wraps a BString and provides the GetHashCode() method.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@477 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:41 +02:00
stippi
1a2246ccf9 Avoid loading the start page before loading the requested URL in new windows
by passing the url to the constructor already.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@476 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:41 +02:00
stippi
d5c4471790 * Fixed double click outside tabs to only be recognized when the first click
was outside as well.
* Single tertiary click outside tabs opens new tab on mouse up.
* Reset fClickCount always when the click was inside a tab.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@474 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:41 +02:00
stippi
b9d4b634f6 Use BStatusBar properly. The text in a BStatusBar is composed of four parts.
Label and trailing label are only specified in the constructor or in Reset().
By using SetText(), we were modifying another part of the text, while we meant
to set the label. This fixes updates on node monitor messages.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@472 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:41 +02:00
stippi
ef4f1b5533 Since fLastMouseEventTab is never updated in _MouseMoved() while fMouseDown is
true, we need to recheck it in MouseUp(). This would fix the problem with the
middle mouse button click to close tabs if we didn't move closing to the mouse
up event, and it also fixes other situations, like clicking on one tab, moving
the mouse over another tab's close button, releasing the mouse and clicking
again without moving it inbetween.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@471 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:41 +02:00
stippi
06ea485752 Add a context menu to the download progress view. It allows to open the
containing folder (and selects the file in it), and to copy the download URL
to the clipboard.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@470 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:41 +02:00
stippi
464aca712f Fix a bug with closing tabs by pressing the tertiary mouse button. fMouseDown
would be true, but the fLastMouseEventTab would have been reset when removing
the tab. Rather than fixing this problem, behave the same as Firefox and close
the tab on mouse up (when the mouse is still over the tab, which allows the
user a way back out). Avoids the above problem as a side effect.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@469 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:41 +02:00
stippi
99006ca0ae * Added page for proxy server configuration to the Settings window.
* Added necessary wiring in BWebSettings for proxy server configuration.

Actual proxy server usage untested, feedback welcome.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@468 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:41 +02:00
stippi
5913d4a98b * Invalidate layout only when necessary.
* Icon view needs to update completely on resize.
-> Fixes graphics glitch when switching between icon and no icon.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@467 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:41 +02:00
stippi
a4c1f6783d * After a recent commit, _TabChanged() was accessing "webView" when it really
meant CurrentWebView(). This also fixed the focus restoration, since it
  remembered the current focus for the wrong web view when the user data was
  already stored.
* Refactored _TabChanged() so that this code is now executed in the now
  virtual SetCurrentWebView(), which makes the features also work for new tabs.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@466 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:41 +02:00
stippi
65cc5e49ee The favicon is now also displayed in the URL input view. Mostly because one is
used to it, but also when only one page is open and tabs are not displayed as
per the user settings, the favicon would then not be visible.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@465 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:41 +02:00
stippi
50c66f3857 * Store the favicon in the PageUserData of any BWebView instance.
* Refactored setting the page icon so it always goes through the new
   BrowserWindow::_SetPageIcon().
 * Don't replace the PageUserData in _TabChanged() if it already exists
   (which would forget the favicon).
 * Write the favicon to the Bookmark file. At the moment, it writes the
   32x32 icon as upscaled version of the 16x16 icon. Color reduction makes
   the icons look not so nice, since Haiku does not yet support PNG icons...

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@464 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
969b9a9669 Give focus back to the web view when hiding the Find controls.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@463 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
34da959656 Cleanup the supported types. Claiming support for image/jpeg, gif and png is
not really useful. Neither is claiming support for text/*. Added support for
image/svg+xml, since I don't think anything else would handle it as good as
WebPositive (which will do better once BView supports affine transformations).

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@462 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
54cc547050 Make sure a filename derived from a bookmark title does not contain invalid
characters for a filename.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@461 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
a0fcf3c05e Never apply the new page policy if we already have the BWebView. If we already
have it, it was created by the ChromeClient and navigation is soon going to
happen with it.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@460 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
3cba4f1616 Optimize default window size for 1024x768. Actually I would like to optimize
for 800x600 by default, but then the Welcome page opens with horizontal scroll
bar.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@459 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
b1957a61f6 * The current max history age was not read from the BrowsingHistory in
SettingsWindow::_RevertSettings().
 * Made all necessary refactoring in order to support _CanApplySettings().
 * Adjust the Apply and Revert button enabled state whenever settings change.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@458 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
b0240c4936 Allow setting a listener target and a modification message.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@457 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
1547f92b8e * Improved the layout of the Settings window general page.
* Allow specifying a start and a search page in the Settings window.
* Separated the "New page" policy into "New window" and "New tab" policies.
  For a new window, the user can chose to "Open start page", "Open search page"
  and "Open blank page". The default changed to "Open start page" and the
  default start page points to the "Welcome" readme. For new tabs, there is
  an additional choice "Clone current page". The default stayed with opening
  a blank page.
* Implemented the new page policies in BrowserWindow.
* Listen for changes of the new settings in BrowserWindow.
* Added the new settings keys and default values to SettingsKeys.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@456 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
a8d1c85daa Fixed looking up uint32 values.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@455 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
f7530134b1 Don't set the text if it's the same, allows to keep selection.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@454 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
88b25a7da9 Add a small hack to fix the invalidation glitches in the menu bar when resizing
the window.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@453 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
fa485bda23 When removing the currently selected tab, temporarily unset the current BWebView,
since we did not delete the BWebView directly, but in the application thread,
this was a race condition that would only crash sometimes (in _TabChanged(),
when we tried to attach user data to the current tab before switching it). This
should fix the last known (to me) crash.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@452 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:40 +02:00
stippi
25057e59b7 When selecting choices in the auto-completion pop-up, insert the current choice
into the text view, so the user can continue typing from that choice, or modify
it. For example, one can type "dev.haiku-os.org", select a choice
"http://dev.haiku-os.org/ticket/1234" and then replace just the last chunk with
another ticket number and press enter.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@447 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:09 +02:00
stippi
9d15059974 Make the base URL show in bold font in the URL input field, and the rest of the
text in dark gray.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@445 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:09 +02:00