Commit c68cb259 authored by ggaren's avatar ggaren

Rolling back in, now fixed:

        
        Nixed a few more redundant loading functions in Frame. Did my best to update
        the non-Mac builds.

        * bridge/mac/FrameMac.h:
        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::urlSelected): Kept always 'true' argument for userGesture
        always 'true', because changing it broke the world, and testing seems to
        indicate that the one caller that might have passed 'false' didn't need to.
        * page/Frame.cpp:
        (WebCore::Frame::requestFrame):
        (WebCore::Frame::frameLoader):
        (WebCore::Frame::redirectionTimerFired):
        * page/Frame.h:
        * platform/gdk/FrameGdk.cpp:
        * platform/gdk/FrameGdk.h:
        * platform/gdk/TemporaryLinkStubs.cpp:
        (FrameGdk::issueCopyCommand):
        * platform/qt/FrameQt.cpp:
        * platform/qt/FrameQt.h:
        * platform/win/TemporaryLinkStubs.cpp:
        (WebCore::FrameWin::shouldInterruptJavaScript):
        (WebCore::FrameWin::issueCopyCommand):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c7a4ff21
2006-10-24 Geoffrey Garen <ggaren@apple.com>
Rolling back in, now fixed:
Nixed a few more redundant loading functions in Frame. Did my best to update
the non-Mac builds.
* bridge/mac/FrameMac.h:
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::urlSelected): Kept always 'true' argument for userGesture
always 'true', because changing it broke the world, and testing seems to
indicate that the one caller that might have passed 'false' didn't need to.
* page/Frame.cpp:
(WebCore::Frame::requestFrame):
(WebCore::Frame::frameLoader):
(WebCore::Frame::redirectionTimerFired):
* page/Frame.h:
* platform/gdk/FrameGdk.cpp:
* platform/gdk/FrameGdk.h:
* platform/gdk/TemporaryLinkStubs.cpp:
(FrameGdk::issueCopyCommand):
* platform/qt/FrameQt.cpp:
* platform/qt/FrameQt.h:
* platform/win/TemporaryLinkStubs.cpp:
(WebCore::FrameWin::shouldInterruptJavaScript):
(WebCore::FrameWin::issueCopyCommand):
2006-10-24 Anders Carlsson <acarlsson@apple.com>
Fix the build (Update for changes to ResourceLoader)
......@@ -119,8 +119,6 @@ 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,32 +263,13 @@ 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());
// FIXME: How do we know that userGesture is always true?
loadRequest(copy, true, _currentEvent);
}
......
......@@ -238,13 +238,7 @@ Frame::~Frame()
d = 0;
}
#pragma mark END LOADING FUNCTIONS
bool Frame::openURL(const KURL& URL)
{
ASSERT_NOT_REACHED();
return true;
}
#pragma mark BEGIN LOADING FUNCTIONS
void Frame::changeLocation(const DeprecatedString& URL, const String& referrer, bool lockHistory, bool userGesture)
{
......@@ -296,11 +290,6 @@ 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();
......@@ -319,7 +308,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->openURLRequest(frameRequest);
frame->urlSelected(frameRequest, 0);
} else
frame = loadSubframe(ownerElement, url, frameName, d->m_referrer);
......@@ -541,6 +530,11 @@ 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
......@@ -1322,8 +1316,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) // add && parent() to get only frames, but doesn't matter
openURL(url()); /// ## need args.reload=true?
if (d->m_scheduledHistoryNavigationSteps == 0)
urlSelected(url(), "", 0);
else {
if (d->m_extension) {
goBackOrForward(d->m_scheduledHistoryNavigationSteps);
......
......@@ -109,8 +109,6 @@ 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;
......
......@@ -200,15 +200,6 @@ 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,8 +78,6 @@ 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,7 +162,6 @@ 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,15 +126,6 @@ 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;
......@@ -306,11 +297,6 @@ 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,8 +48,6 @@ 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,13 +166,11 @@ 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