Commit ae8922c4 authored by ggaren's avatar ggaren

Rolling out my last change because it broke the world.

        * bridge/mac/FrameMac.h:
        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::openURL):
        (WebCore::FrameMac::openURLRequest):
        (WebCore::FrameMac::urlSelected):
        * page/Frame.cpp:
        (WebCore::Frame::openURL):
        (WebCore::Frame::frameLoader):
        (WebCore::Frame::requestFrame):
        (WebCore::Frame::redirectionTimerFired):
        * page/Frame.h:
        * platform/gdk/FrameGdk.cpp:
        (WebCore::FrameGdk::openURL):
        * platform/gdk/FrameGdk.h:
        * platform/gdk/TemporaryLinkStubs.cpp:
        * platform/qt/FrameQt.cpp:
        (WebCore::FrameQt::openURL):
        (WebCore::FrameQt::openURLRequest):
        * platform/qt/FrameQt.h:
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::FrameWin::openURL):
        (WebCore::FrameWin::openURLRequest):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent afbe4a9f
2006-10-24 Geoffrey Garen <ggaren@apple.com>
Rolling out my last change because it broke the world.
* bridge/mac/FrameMac.h:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::openURL):
(WebCore::FrameMac::openURLRequest):
(WebCore::FrameMac::urlSelected):
* page/Frame.cpp:
(WebCore::Frame::openURL):
(WebCore::Frame::frameLoader):
(WebCore::Frame::requestFrame):
(WebCore::Frame::redirectionTimerFired):
* page/Frame.h:
* platform/gdk/FrameGdk.cpp:
(WebCore::FrameGdk::openURL):
* platform/gdk/FrameGdk.h:
* platform/gdk/TemporaryLinkStubs.cpp:
* platform/qt/FrameQt.cpp:
(WebCore::FrameQt::openURL):
(WebCore::FrameQt::openURLRequest):
* platform/qt/FrameQt.h:
* platform/win/TemporaryLinkStubs.cpp:
(WebCore::FrameWin::openURL):
(WebCore::FrameWin::openURLRequest):
2006-10-24 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Adam.
......@@ -119,6 +119,8 @@ public:
~FrameMac();
// FIXME: Merge these and move them into WebFrameLoader.
virtual bool openURL(const KURL&);
virtual void openURLRequest(const FrameLoadRequest&);
void loadRequest(const FrameLoadRequest&, bool userGesture, NSEvent* triggeringEvent = 0, ObjCDOMElement* submitForm = 0, NSMutableDictionary* formValues = 0);
virtual void urlSelected(const FrameLoadRequest&, const Event* triggeringEvent);
virtual Frame* createFrame(const KURL&, const String& name, Element* ownerElement, const String& referrer);
......
......@@ -263,13 +263,33 @@ void FrameMac::submitForm(const FrameLoadRequest& request)
END_BLOCK_OBJC_EXCEPTIONS;
}
bool FrameMac::openURL(const KURL &url)
{
// FIXME: The lack of args here to get the reload flag from
// indicates a problem in how we use Frame::processObjectRequest,
// where we are opening the URL before the args are set up.
FrameLoadRequest request;
request.m_request.setURL(url);
request.m_request.setHTTPReferrer(referrer());
loadRequest(request, userGestureHint());
return true;
}
void FrameMac::openURLRequest(const FrameLoadRequest& request)
{
loadRequest(request, userGestureHint());
}
void FrameMac::urlSelected(const FrameLoadRequest& request, const Event* /*triggeringEvent*/)
{
FrameLoadRequest copy = request;
if (copy.m_request.httpReferrer().isEmpty())
copy.m_request.setHTTPReferrer(referrer());
loadRequest(copy, userGestureHint(), _currentEvent);
loadRequest(copy, true, _currentEvent);
}
void FrameMac::openURLFromPageCache(WebCorePageState *state)
......
......@@ -238,7 +238,13 @@ Frame::~Frame()
d = 0;
}
#pragma mark BEGIN LOADING FUNCTIONS
#pragma mark END LOADING FUNCTIONS
bool Frame::openURL(const KURL& URL)
{
ASSERT_NOT_REACHED();
return true;
}
void Frame::changeLocation(const DeprecatedString& URL, const String& referrer, bool lockHistory, bool userGesture)
{
......@@ -290,6 +296,11 @@ void Frame::urlSelected(const ResourceRequest& request, const String& _target, c
urlSelected(frameRequest, triggeringEvent);
}
FrameLoader* Frame::frameLoader()
{
return d->m_frameLoader;
}
bool Frame::requestFrame(Element* ownerElement, const String& urlParam, const AtomicString& frameName)
{
DeprecatedString _url = urlParam.deprecatedString();
......@@ -308,7 +319,7 @@ bool Frame::requestFrame(Element* ownerElement, const String& urlParam, const At
ResourceRequest request(url, d->m_referrer, policy);
FrameLoadRequest frameRequest;
frameRequest.m_request = request;
frame->urlSelected(frameRequest, 0);
frame->openURLRequest(frameRequest);
} else
frame = loadSubframe(ownerElement, url, frameName, d->m_referrer);
......@@ -530,11 +541,6 @@ void Frame::cancelRedirection(bool cancelWithLoadInProgress)
#pragma mark END LOADING FUNCTIONS
FrameLoader* Frame::frameLoader()
{
return d->m_frameLoader;
}
KURL Frame::iconURL()
{
// If this isn't a top level frame, return nothing
......@@ -1316,8 +1322,8 @@ void Frame::redirectionTimerFired(Timer<Frame>*)
// go(i!=0) from a frame navigates into the history of the frame only,
// in both IE and NS (but not in Mozilla).... we can't easily do that
// in Konqueror...
if (d->m_scheduledHistoryNavigationSteps == 0)
urlSelected(url(), "", 0);
if (d->m_scheduledHistoryNavigationSteps == 0) // add && parent() to get only frames, but doesn't matter
openURL(url()); /// ## need args.reload=true?
else {
if (d->m_extension) {
goBackOrForward(d->m_scheduledHistoryNavigationSteps);
......
......@@ -109,6 +109,8 @@ public:
virtual ~Frame();
// FIXME: Merge these methods and move them into FrameLoader.
virtual bool openURL(const KURL&);
virtual void openURLRequest(const FrameLoadRequest&) = 0;
void changeLocation(const DeprecatedString& URL, const String& referrer, bool lockHistory = true, bool userGesture = false);
virtual void urlSelected(const ResourceRequest&, const String& target, const Event* triggeringEvent, bool lockHistory = false);
virtual void urlSelected(const FrameLoadRequest&, const Event* triggeringEvent) = 0;
......
......@@ -197,6 +197,15 @@ FrameGdk::~FrameGdk()
cancelAndClear();
}
bool FrameGdk::openURL(const KURL& url)
{
if (!m_client)
return false;
m_client->openURL(url);
return true;
}
void FrameGdk::submitForm(const FrameLoadRequest& frameLoadRequest)
{
ResourceRequest request = frameLoadRequest.m_request;
......
......@@ -78,6 +78,8 @@ public:
virtual ~FrameGdk();
void handleGdkEvent(GdkEvent*);
virtual bool openURL(const KURL&);
virtual void openURLRequest(const FrameLoadRequest&);
virtual void submitForm(const FrameLoadRequest&);
virtual void urlSelected(const FrameLoadRequest&);
......
......@@ -162,6 +162,7 @@ KJS::Bindings::Instance* FrameGdk::getAppletInstanceForWidget(Widget*) { notImpl
bool FrameGdk::passMouseDownEventToWidget(Widget*) { notImplemented(); return 0; }
void FrameGdk::issueCutCommand() { notImplemented(); }
void FrameGdk::issueCopyCommand() { notImplemented(); }
void FrameGdk::openURLRequest(struct WebCore::FrameLoadRequest const&) { notImplemented(); }
void FrameGdk::issueUndoCommand() { notImplemented(); }
String FrameGdk::mimeTypeForFileName(String const&) const { notImplemented(); return String(); }
void FrameGdk::issuePasteCommand() { notImplemented(); }
......
......@@ -126,6 +126,15 @@ FrameQt::~FrameQt()
cancelAndClear();
}
bool FrameQt::openURL(const KURL& url)
{
if (!m_client)
return false;
m_client->openURL(url);
return true;
}
void FrameQt::submitForm(const FrameLoadRequest& frameLoadRequest)
{
ResourceRequest request = frameLoadRequest.m_request;
......@@ -297,6 +306,11 @@ void FrameQt::restoreDocumentState()
// FIXME: Implement this as soon a KPart is created...
}
void FrameQt::openURLRequest(const FrameLoadRequest& request)
{
urlSelected(request, 0);
}
void FrameQt::scheduleClose()
{
// no-op
......
......@@ -48,6 +48,8 @@ public:
FrameQt(Page*, Element*, FrameQtClient*, EditorClient* client = 0);
virtual ~FrameQt();
virtual bool openURL(const KURL&);
virtual void openURLRequest(const FrameLoadRequest&);
virtual void submitForm(const FrameLoadRequest&);
virtual void urlSelected(const FrameLoadRequest&, const Event*);
......
......@@ -166,11 +166,13 @@ void FrameWin::registerCommandForUndo(PassRefPtr<WebCore::EditCommand>) { notImp
void FrameWin::registerCommandForRedo(PassRefPtr<WebCore::EditCommand>) { notImplemented(); }
bool FrameWin::runJavaScriptPrompt(String const&, String const&, String &) { notImplemented(); return 0; }
bool FrameWin::shouldInterruptJavaScript() { notImplemented(); return false; }
bool FrameWin::openURL(KURL const&) { notImplemented(); return 0; }
void FrameWin::print() { notImplemented(); }
KJS::Bindings::Instance* FrameWin::getAppletInstanceForWidget(Widget*) { notImplemented(); return 0; }
bool FrameWin::passMouseDownEventToWidget(Widget*) { notImplemented(); return 0; }
void FrameWin::issueCutCommand() { notImplemented(); }
void FrameWin::issueCopyCommand() { notImplemented(); }
void FrameWin::openURLRequest(const FrameLoadRequest&) { notImplemented(); }
bool FrameWin::passWheelEventToChildWidget(Node*) { notImplemented(); return 0; }
void FrameWin::issueUndoCommand() { notImplemented(); }
String FrameWin::mimeTypeForFileName(String const&) const { notImplemented(); return String(); }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment