From 58a9dd9dfe861e69bc05fccb868a4180ed276a88 Mon Sep 17 00:00:00 2001 From: stippi Date: Tue, 23 Feb 2010 15:52:17 +0000 Subject: [PATCH] * 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 --- src/apps/webpositive/IconButton.cpp | 2 -- src/apps/webpositive/LauncherWindow.cpp | 10 +++++----- src/apps/webpositive/LauncherWindow.h | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/apps/webpositive/IconButton.cpp b/src/apps/webpositive/IconButton.cpp index 317754aecd..36cc142bac 100644 --- a/src/apps/webpositive/IconButton.cpp +++ b/src/apps/webpositive/IconButton.cpp @@ -373,12 +373,10 @@ IconButton::SetIcon(int32 resourceID) if (status != B_OK) return status; -printf("check\n"); size_t size; const void* data = resources.LoadResource(B_VECTOR_ICON_TYPE, resourceID, &size); if (data != NULL) { -printf("found resource\n"); BBitmap bitmap(BRect(0, 0, 31, 31), B_BITMAP_NO_SERVER_LINK, B_RGBA32); status = bitmap.InitCheck(); if (status != B_OK) diff --git a/src/apps/webpositive/LauncherWindow.cpp b/src/apps/webpositive/LauncherWindow.cpp index 1f979bfe63..3c74d2422c 100644 --- a/src/apps/webpositive/LauncherWindow.cpp +++ b/src/apps/webpositive/LauncherWindow.cpp @@ -431,10 +431,6 @@ void LauncherWindow::newTab(const BString& url, bool select) void LauncherWindow::navigationRequested(const BString& url, WebView* view) { - // TODO: Move elsewhere, doesn't belong here. - m_loadedURL = url; - if (m_url) - m_url->SetText(url.String()); } void LauncherWindow::newWindowRequested(const BString& url) @@ -458,8 +454,12 @@ void LauncherWindow::loadNegotiating(const BString& url, WebView* view) statusChanged(status, view); } -void LauncherWindow::loadTransfering(const BString& url, WebView* view) +void LauncherWindow::loadCommited(const BString& url, WebView* view) { + // This hook is invoked when the load is commited. + if (m_url) + m_url->SetText(url.String()); + BString status("Loading: "); status << url; statusChanged(status, view); diff --git a/src/apps/webpositive/LauncherWindow.h b/src/apps/webpositive/LauncherWindow.h index e660d8d1df..745cf70189 100644 --- a/src/apps/webpositive/LauncherWindow.h +++ b/src/apps/webpositive/LauncherWindow.h @@ -74,7 +74,7 @@ private: virtual void navigationRequested(const BString& url, WebView* view); virtual void newWindowRequested(const BString& url); virtual void loadNegotiating(const BString& url, WebView* view); - virtual void loadTransfering(const BString& url, WebView* view); + virtual void loadCommited(const BString& url, WebView* view); virtual void loadProgress(float progress, WebView* view); virtual void loadFailed(const BString& url, WebView* view); virtual void loadFinished(const BString& url, WebView* view);