Commit Graph

88 Commits

Author SHA1 Message Date
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
stippi
50c04c441d Actually, the authentication challenge needs to know for which page it is,
otherwise we may display the login panel above an unrelated page. Tested by
clicking Login on dev.haiku-os.org and Cmd-T to open a new tab before the
login panel shows. Works.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@237 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-27 13:31:29 +00:00
stippi
3d6558b6ca Coding style fix.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@236 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-27 13:20:50 +00:00
stippi
ce1641f62c Hide the implementation details of BWebWindow::AuthenticationChallenge() from
clients.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@235 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-27 13:20:24 +00:00
stippi
b3a723711e Added tool tip to Add tab button...
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@234 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-27 13:09:57 +00:00
stippi
bf0181bd00 Instead of hiding the tab view when there is only one tab, make the tab close
buttons only available when there is more than one tab. This gives a more
consistent interface and doesn't hide features, most importantly the "Add tab"
button. For users that wish the most minimalistic UI, this behavior could
later be configurable (along with opening new windows versus new tabs).


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@233 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-27 12:26:17 +00:00
stippi
1cba0fd63a * Use the proper channels for reloading. (Added BWebView/BWebPage::Reload().)
* Catch B_RETURN key down messages, when the target is the URL text view.
  Don't let the text view send a message, but react on B_RETURN only, in the
  window, also letting the Go button flash for a bonus. This fixes unprovoked
  (re-)loading of pages when the text control went out of focus and thought the
  text had changed, sending GOTO_URL. This could happen when just grabbing the
  scrollbar so that the text control looses focus. Also makes the m_loadedURL
  string superfluous, which I added for the same purpose.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@232 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-27 11:01:36 +00:00
anevilyak
507875ecb1 Add Cmd+R as a shortcut for reload page.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@231 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-27 01:48:18 +00:00
stippi
f44756cf46 Middle click anywhere into a tab closes that page.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@230 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-27 00:05:33 +00:00
stippi
84c9928e40 * Added small symbol buttons to tab container view. Currently only "New tab" is
added and works.
* Added "Open location" shortcut Cmd-L as in Firefox.
* Moved "Show downloads" shortcut to Cmd-J, again as in Firefox. It uses Cmd-D
  for "Bookmark this page". Though I have no idea why we simply shouldn't use
  Cmd-D for Downloads and Cmd-B for Bookmark this page.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@229 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-26 23:17:51 +00:00
stippi
72664707fa Implemented a completely new tab view framework:
* Tabs are only visible when there are more than one.
* Tabs have close buttons.
* Much more flexible, adding scrolling and left/right buttons when there are
  more tabs than room will be easy. Also drag&drop of tabs.
I've tested this quite a bit, hopefully there are no regressions.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@228 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-26 19:02:24 +00:00
stippi
1c3a676322 Fixed comment, the TODO was already resolved.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@226 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-26 08:55:29 +00:00
stippi
64f8c06735 Fix crash on program exit. Always good to use defensive programming techniques...
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@225 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-26 08:53:10 +00:00
stippi
4978460d4c Implement creating new pages properly. This fixes content submission on
haiku-os.org and probably a few other things. Basically, we were creating
the new pages ourselves in dispatchDecidePolicyForNewWindowAction(), but
we were meant to implement dispatchCreatePage() instead. Now, what we do is
similar for the Qt port, only better (found a bug in Arora): When the user
clicked with the tertiary mouse button, we create the window ourselves, as
before, and otherwise always have WebCore create the page instead.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@218 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-25 18:50:51 +00:00
anevilyak
5afb1a0f0c Spelling fix.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@216 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-25 15:33:01 +00:00
stippi
9397a29aaf Use the document look for the LauncherWindow and adjust the layout accordinly.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@214 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-25 14:16:06 +00:00
stippi
f16ed908be What the heck... use the correct weighting for calculating the average grey.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@213 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-25 12:49:38 +00:00
stippi
9db22c336b Make it much more obvious when icon buttons are disabled.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@212 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-25 12:46:28 +00:00
stippi
1da75c0bed Implemented "Stop Loading" feature, designed icon, added button and necessary
wiring to arrive at BWebFrame::StopLoading().


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@211 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-25 12:30:39 +00:00
stippi
16ccf622ab Removed forgotten debug output.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@207 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-25 09:20:53 +00:00
stippi
ce869c629b Selecting or not selecting the newly opened tab never worked, since the "select"
field was added to the NEW_WINDOW_REQUESTED message, and not passed on to the
internal NEW_TAB message. Fixed this, and also added a check for the tertiary
mouse button for regular navigation actions. This means clicking links with
the middle mouse button opens in a background tab regard less if it would have
opened a new page when clicked with the primary button.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@199 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-24 21:00:55 +00:00
stippi
c516096e8e * Refactored WebDownload into BWebDownload and BPrivate::WebDownloadPrivate.
* Fixed a bug where the "Remove Finished" button in the downloads window would
  be wrongly disabled whenever a new download started.
* Implemented cancelling downloads.
* Prepared restarting downloads as far as the GUI goes. Need to research this
  first how a download can be triggered independently from anything else in
  WebCore...


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@196 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-24 19:48:35 +00:00
stippi
054c42b1b9 Renamed WebViewWindow to BWebWindow and converted the API to Haiku coding guide
lines.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@195 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-24 18:33:22 +00:00
stippi
feba54b70c Invalidate the BTabView when new tabs are added. Works around new tabs not
showing immediately after they have been created, some pages don't set the
title either, so then the tab still would't show.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@193 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-24 10:39:17 +00:00
stippi
d54c477ad1 Properly set the download listener on new tabs. This fixes the Downloads window
not popping up for subsequent tabs.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@192 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-24 10:34:53 +00:00
stippi
57b6a0fc1b * The next round of API cleanup. WebView was renamed to BWebView. Some API needed
be ChromeClientHaiku has been moved to BWebPage. WebView.h is now clean and
  would be ready for the Haiku tree.
* BWebPage no longer invalidates the BWebView when a resize happens, WebCore
  already takes care of that.
* BWebView draws a white area in Draw() when the offscreen view is not clean.
  since no unnecessary invalidation happens, this doesn't result in any flicker
  and basically only speeds up perceived loading speed, since the web page is
  immediately white upon program launch.
* Since WebTabView does not draw a frame, it removes B_FULL_UPDATE_ON_RESIZE
  and thereby completely avoids flickering upon window resize.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@190 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-24 10:20:33 +00:00
stippi
58a9dd9dfe * Moved exposed classes from WebCore out of WebFrame.h, reintroduced
WebFramePrivate to hide WebCore internals from the public API.

FrameLoadClientHaiku:
* Don't send load requested in policy decision method
  dispatchDecidePolicyForNavigationAction(). Calling the policy function with
  PolicyUse will already trigger the load correctly. Ignore the request when
  we want to load it into a new window/frame instead.
* Subframes returned false in canHandleRequest(). This was what stopped stuff
  being loaded into sub frames! Finally frames and iframes are working. Praise
  Ingo's Debugger once more!
* Renamed LOAD_TRANSFERING to LOAD_COMMITED, since WebCore means that the loader
  and policy stuff have come to the conclusion to finally load the URL. So that's
  also the event which needs to update the URL text control.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@182 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-23 15:52:17 +00:00
stippi
e7bd43d9ca Place the thread priority tweak somewhere where it actually works. This makes
HaikuLauncher totally usable under heavy system load.


git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@174 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-22 13:36:46 +00:00
stippi
0bcb05f98d Forgot to commit this. Polishes no-border BTabView look.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@173 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-22 13:30:54 +00:00
stippi
7a9d9c2cf8 Set the "no border" look to avoid the double frame around the WebView.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@169 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-22 13:23:55 +00:00
anevilyak
d05b8e1a31 Change window/tab management shortcuts:
- cmd+w now closes the active tab. If the tab is the only one remaining, the window is closed.
- cmd+shift+w closes the window, regardless of tab count.

Whitespace cleanups.



git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@167 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-21 16:16:46 +00:00
stippi
b6ffb2048f Removed stray debug output.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@166 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-21 15:31:11 +00:00
stippi
df621688c5 Fix closing tabs.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@165 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-21 15:30:49 +00:00
stippi
d3d066c322 BTabView doesn't properly trigger a relayout when adding a new tab.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@164 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-21 13:48:07 +00:00
stippi
714edff6e1 Select the new tab when creating it via the menu.
git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@163 94f232f2-1747-11df-bad5-a5bfde151594
2010-02-21 13:43:27 +00:00