Commit Graph

207 Commits

Author SHA1 Message Date
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
stippi
c53bbc329d Implementing MenusEnded() is not needed anymore, since we enable Cut/Copy/Paste
by default now.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@444 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:09 +02:00
stippi
0e7170b49e Handling shortcut is wrappedd inside MenusBeginning() and MenusEnded(), so we
need to always enable the standard shortcut items in MenusBeginning(), if we
would otherwise enable them only asynchronously. Fixes Cut/Copy/Paste via
shortcuts.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@443 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:09 +02:00
stippi
d5e2e814a4 No need to block the BApplication thread when showing the About window.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@442 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:09 +02:00
stippi
a150602b0f Return early in BrowserWindow::DispatchMessage(), if the message was already
handled. This would also fix return keys ending up in the URLTextView.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@441 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:09 +02:00
stippi
ae82400bb4 The return key is never supposed to reach the BTextView implementation, even if
we don't have to invoke in the URLTextView.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@440 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:09 +02:00
stippi
9b70fc27d2 * Implemented a mechanism to ask the BWebPage about it's editing capabilities.
This needs to be asynchronous, as always. BrowserWindow asks when menus are
  opened, but the result arrives so fast, that the user never sees invalid
  items. The Cut/Copy/Paste items are now always enabled according to what's
  currently really possible.
* Enable and disable the Back/Forward History menu items along with the buttons.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@436 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:08 +02:00
stippi
62c697303a * Separated Text menu into Edit and View menus.
* Added Cut/Copy/Paste items. Enabled status is updated when a text view has
  focus, but not yet with the selection of the BWebView, when that has focus.
* Dispatch B_CUT/COPY/PASTE either to a focused BTextView or to the BWebView.
* Enable the Find next/previous items according to contents of the Find text
  input.
* Refactored MenusBeginning() hook.
* Renamed Go menu to History.
* Added Back/Forward menu items to History menu, now the shortcuts are visible.
  (Command key plus cursor left/right)
* Added Reload item to View menu, now that shortcut is visible too.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@435 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:43:08 +02:00
stippi
3e2f25ae9f Fixed Maxime's name in the About window. Really sorry about that!
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@422 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:41:28 +02:00
stippi
8421f16ef1 Fix the build.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@418 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:40:43 +02:00
stippi
a72e997ab0 Improved the design of the Go button graphics.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@417 94f232f2-1747-11df-bad5-a5bfde151594
2012-07-03 15:40:43 +02:00
stippi
029353b44c * Reworded defines in Jamfiles to make them more readable.
* Split WebTabView into several files in a new sub-folder "tabview".
* Implemented scrolling the tab view left/right when there are more tabs than
  fit into the view.
* Fixed graphic glitches in the TabContainerView when the window is resized,
  the space behind the last tab was not managed properly.

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