Changeset 18765 in webkit


Ignore:
Timestamp:
Jan 11, 2007 4:34:26 AM (17 years ago)
Author:
lars
Message:

Start using the loader in the Qt port.

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r18764 r18765  
     12007-01-11  Lars Knoll <lars@trolltech.com>
     2
     3        Reviewed by Darin.
     4
     5        Start using the loader in the Qt port.
     6
     7        * loader/FrameLoader.cpp:
     8        (WebCore::FrameLoader::clear):
     9        (WebCore::FrameLoader::URL):
     10        (WebCore::FrameLoader::createEmptyDocument):
     11        * loader/qt/FrameLoaderQt.cpp:
     12        (WebCore::FrameLoader::setTitle):
     13        (WebCore::FrameLoader::originalRequestURL):
     14        (WebCore::FrameLoader::referrer):
     15        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
     16        * page/qt/FrameQtClient.cpp:
     17        (WebCore::FrameQtClient::openURL):
     18
    1192007-01-11  Darin Adler  <darin@apple.com>
    220
  • trunk/WebCore/loader/FrameLoader.cpp

    r18764 r18765  
    719719    m_needsClear = false;
    720720
    721 #if !PLATFORM(MAC)
     721#if !PLATFORM(MAC) && !PLATFORM(QT)
    722722    // FIXME: Remove this after making other platforms do loading more like Mac.
    723723    detachChildren();
    724724#endif
    725 
     725   
    726726    if (m_frame->document()) {
    727727        m_frame->document()->cancelParsing();
     
    25152515KURL FrameLoader::URL() const
    25162516{
    2517 #if PLATFORM(QT)
    2518     if (!activeDocumentLoader())
    2519         return KURL();
    2520 #endif
    25212517    return activeDocumentLoader()->URL();
    25222518}
     
    26942690}
    26952691
    2696 #if PLATFORM(MAC)
     2692#if PLATFORM(MAC) || PLATFORM(QT)
    26972693void FrameLoader::submitForm(const FrameLoadRequest& request, Event* event)
    26982694{
     
    27322728}
    27332729#endif
    2734 
     2730   
    27352731String FrameLoader::userAgent() const
    27362732{
     
    27432739    // it does nothing if we already have a document, and just creates an
    27442740    // empty one if we have no document at all.
    2745 #if PLATFORM(MAC)
     2741#if PLATFORM(MAC) || PLATFORM(QT)
    27462742    if (!m_frame->document()) {
    27472743        loadEmptyDocumentSynchronously();
    27482744        updateBaseURLForEmptyDocument();
    2749     }
    2750 #elif PLATFORM(QT)
    2751     if (!m_frame->document()) {
    2752         begin();
    2753         end();
    27542745    }
    27552746#endif
  • trunk/WebCore/loader/qt/FrameLoaderQt.cpp

    r18744 r18765  
    5353#include "HTMLElement.h"
    5454#include "HTMLFormElement.h"
     55#include "HistoryItem.h"
    5556#include "JSLock.h"
    5657#include "MouseEventWithHitTestResults.h"
     
    7980namespace WebCore {
    8081
    81 void FrameLoader::submitForm(const FrameLoadRequest& frameLoadRequest, Event*)
    82 {
    83 #ifdef MULTIPLE_FORM_SUBMISSION_PROTECTION
    84     // FIXME: We'd like to remove this altogether and fix the multiple form submission issue another way.
    85     // We do not want to submit more than one form from the same page,
    86     // nor do we want to submit a single form more than once.
    87     // This flag prevents these from happening; not sure how other browsers prevent this.
    88     // The flag is reset in each time we start handle a new mouse or key down event, and
    89     // also in setView since this part may get reused for a page from the back/forward cache.
    90     // The form multi-submit logic here is only needed when we are submitting a form that affects this frame.
    91     // FIXME: Frame targeting is only one of the ways the submission could end up doing something other
    92     // than replacing this frame's content, so this check is flawed. On the other hand, the check is hardly
    93     // needed any more now that we reset m_submittedFormURL on each mouse or key down event.
    94     Frame* target = m_frame->tree()->find(frameLoadRequest.frameName());
    95     if (m_frame->tree()->isDescendantOf(target)) {
    96         if (m_submittedFormURL == frameLoadRequest.resourceRequest().url())
    97             return;
    98         m_submittedFormURL = frameLoadRequest.resourceRequest().url();
    99     }
    100 #endif
    101 
    102     RefPtr<FormData> formData = frameLoadRequest.resourceRequest().httpBody();
    103     if (formData && !formData->isEmpty() && QtFrame(m_frame)->client())
    104         QtFrame(m_frame)->client()->submitForm(frameLoadRequest.resourceRequest().httpMethod(),
    105                                                frameLoadRequest.resourceRequest().url(),
    106                                                formData);
    107 
    108     clearRecordedFormValues();
    109 }
    110 
    111 void FrameLoader::urlSelected(const FrameLoadRequest& frameLoadRequest, Event*)
    112 {
    113     const ResourceRequest& request = frameLoadRequest.resourceRequest();
    114 
    115     if (!QtFrame(m_frame)->client())
    116         return;
    117 
    118     QtFrame(m_frame)->client()->openURL(request.url());
    119 }
    12082
    12183void FrameLoader::setTitle(const String& title)
    12284{
    123     client()->setTitle(title, URL());
     85    documentLoader()->setTitle(title);
    12486}
    12587
     
    150112KURL FrameLoader::originalRequestURL() const
    151113{
    152     notImplemented();
    153     return KURL();
     114    return activeDocumentLoader()->initialRequest().url();
    154115}
    155116
     
    162123String FrameLoader::referrer() const
    163124{
    164     notImplemented();
    165     return String();
     125    return documentLoader()->request().httpReferrer();
    166126}
    167127
     
    171131{
    172132    ASSERT(m_client->hasWebView());
    173     //notImplemented();
    174133
    175134    switch (m_state) {
    176     case FrameStateProvisional: {
     135        case FrameStateProvisional: {
     136            if (m_delegateIsHandlingProvisionalLoadError)
     137                return;
     138
     139            RefPtr<DocumentLoader> pdl = m_provisionalDocumentLoader;
     140            if (!pdl)
     141                return;
     142               
     143            // If we've received any errors we may be stuck in the provisional state and actually complete.
     144            const ResourceError& error = pdl->mainDocumentError();
     145            if (error.isNull())
     146                return;
     147
     148            // Check all children first.
     149            RefPtr<HistoryItem> item;
     150            if (isBackForwardLoadType(loadType()) && m_frame == m_frame->page()->mainFrame())
     151                item = m_currentHistoryItem;
     152               
     153            bool shouldReset = true;
     154            if (!pdl->isLoadingInAPISense()) {
     155                m_delegateIsHandlingProvisionalLoadError = true;
     156                m_client->dispatchDidFailProvisionalLoad(error);
     157                m_delegateIsHandlingProvisionalLoadError = false;
     158
     159                // FIXME: can stopping loading here possibly have any effect, if isLoading is false,
     160                // which it must be to be in this branch of the if? And is it OK to just do a full-on
     161                // stopAllLoaders instead of stopLoadingSubframes?
     162                stopLoadingSubframes();
     163                pdl->stopLoading();
     164
     165                // Finish resetting the load state, but only if another load hasn't been started by the
     166                // delegate callback.
     167                if (pdl == m_provisionalDocumentLoader)
     168                    clearProvisionalLoad();
     169                else if (m_documentLoader) {
     170                    KURL unreachableURL = m_documentLoader->unreachableURL();
     171                    if (!unreachableURL.isEmpty() && unreachableURL == pdl->request().url())
     172                        shouldReset = false;
     173                }
     174            }
     175            if (shouldReset && item && m_frame->page())
     176                 m_frame->page()->backForwardList()->goToItem(item.get());
     177
     178            return;
     179        }
     180       
     181        case FrameStateCommittedPage: {
     182            DocumentLoader* dl = m_documentLoader.get();           
     183            if (dl->isLoadingInAPISense())
     184                return;
     185
     186            markLoadComplete();
     187
     188            // FIXME: Is this subsequent work important if we already navigated away?
     189            // Maybe there are bugs because of that, or extra work we can skip because
     190            // the new page is ready.
     191
     192            m_client->forceLayoutForNonHTML();
     193             
     194            // If the user had a scroll point, scroll to it, overriding the anchor point if any.
     195            if ((isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload)
     196                    && m_frame->page() && m_frame->page()->backForwardList())
     197                restoreScrollPositionAndViewState();
     198
     199            const ResourceError& error = dl->mainDocumentError();
     200            if (!error.isNull())
     201                m_client->dispatchDidFailLoad(error);
     202            else
     203                m_client->dispatchDidFinishLoad();
     204
     205            m_client->progressCompleted();
     206            return;
     207        }
     208       
     209        case FrameStateComplete:
     210            // Even if already complete, we might have set a previous item on a frame that
     211            // didn't do any data loading on the past transaction. Make sure to clear these out.
     212            m_client->frameLoadCompleted();
     213            return;
    177214    }
    178215
    179     case FrameStateCommittedPage: {
    180         DocumentLoader* dl = m_documentLoader.get();
    181         if (!dl || dl->isLoadingInAPISense())
    182             return;
    183 
    184         markLoadComplete();
    185 
    186         // FIXME: Is this subsequent work important if we already navigated away?
    187         // Maybe there are bugs because of that, or extra work we can skip because
    188         // the new page is ready.
    189 
    190         m_client->forceLayoutForNonHTML();
    191              
    192         // If the user had a scroll point, scroll to it, overriding the anchor point if any.
    193 //         if ((isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload)
    194 //             && m_client->hasBackForwardList())
    195 //             m_client->restoreScrollPositionAndViewState();
    196 
    197 //         if (error)
    198 //             m_client->dispatchDidFailLoad(error);
    199 //         else
    200             m_client->dispatchDidFinishLoad();
    201            
    202         m_client->progressCompleted();
    203         return;
    204     }
    205        
    206     case FrameStateComplete:
    207         // Even if already complete, we might have set a previous item on a frame that
    208         // didn't do any data loading on the past transaction. Make sure to clear these out.
    209         m_client->frameLoadCompleted();
    210         return;
    211     }
    212 
     216    ASSERT_NOT_REACHED();
    213217}
    214218
  • trunk/WebCore/page/qt/FrameQtClient.cpp

    r18744 r18765  
    7373    ASSERT(m_frame);
    7474
    75 //     m_frame->loader()->load(url);
    76     m_frame->loader()->didOpenURL(url);
    77 
    78     if (!m_frame->document()) {
    79         m_frame->loader()->createEmptyDocument();
    80         m_frame->loader()->didOpenURL(url);
    81     }
    82 
    83 
    84     ASSERT(m_frame->document());
    85 
    86     ResourceRequest request(url);
    87     RefPtr<ResourceHandle> loader = ResourceHandle::create(request, this, m_frame, false);
    88     loader.get()->ref();
     75    m_frame->loader()->load(url);
    8976}
    9077
  • trunk/WebKitQt/ChangeLog

    r18757 r18765  
     12007-01-11  Lars Knoll <lars@trolltech.com>
     2
     3        Reviewed by Darin
     4
     5        Start using the loader in the Qt port.
     6
     7        * QtLauncher/main.cpp:
     8        (main):
     9        * WebCoreSupport/FrameLoaderClientQt.cpp:
     10        (WebCore::FrameLoaderClientQt::FrameLoaderClientQt):
     11        (WebCore::FrameLoaderClientQt::~FrameLoaderClientQt):
     12        (WebCore::FrameLoaderClientQt::setFrame):
     13        (WebCore::FrameLoaderClientQt::detachFrameLoader):
     14        (WebCore::FrameLoaderClientQt::makeDocumentView):
     15        (WebCore::FrameLoaderClientQt::makeRepresentation):
     16        (WebCore::FrameLoaderClientQt::setCopiesOnScroll):
     17        (WebCore::FrameLoaderClientQt::dispatchDidStartProvisionalLoad):
     18        (WebCore::FrameLoaderClientQt::cancelPolicyCheck):
     19        (WebCore::FrameLoaderClientQt::dispatchWillSubmitForm):
     20        (WebCore::FrameLoaderClientQt::progressStarted):
     21        (WebCore::FrameLoaderClientQt::progressCompleted):
     22        (WebCore::FrameLoaderClientQt::setMainFrameDocumentReady):
     23        (WebCore::FrameLoaderClientQt::clearArchivedResources):
     24        (WebCore::FrameLoaderClientQt::canShowMIMEType):
     25        (WebCore::FrameLoaderClientQt::representationExistsForURLScheme):
     26        (WebCore::FrameLoaderClientQt::provisionalLoadStarted):
     27        (WebCore::FrameLoaderClientQt::prepareForDataSourceReplacement):
     28        (WebCore::FrameLoaderClientQt::frameLoaderDestroyed):
     29        (WebCore::FrameLoaderClientQt::canHandleRequest):
     30        (WebCore::FrameLoaderClientQt::shouldGoToHistoryItem):
     31        (WebCore::FrameLoaderClientQt::canCachePage):
     32        (WebCore::FrameLoaderClientQt::committedLoad):
     33        (WebCore::FrameLoaderClientQt::cancelledError):
     34        (WebCore::FrameLoaderClientQt::cannotShowURLError):
     35        (WebCore::FrameLoaderClientQt::interruptForPolicyChangeError):
     36        (WebCore::FrameLoaderClientQt::cannotShowMIMETypeError):
     37        (WebCore::FrameLoaderClientQt::fileDoesNotExistError):
     38        (WebCore::FrameLoaderClientQt::shouldFallBack):
     39        (WebCore::FrameLoaderClientQt::createDocumentLoader):
     40        (WebCore::FrameLoaderClientQt::dispatchWillSendRequest):
     41        (WebCore::FrameLoaderClientQt::dispatchDidReceiveResponse):
     42        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForMIMEType):
     43        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction):
     44        (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction):
     45        (WebCore::FrameLoaderClientQt::willUseArchive):
     46        * WebCoreSupport/FrameLoaderClientQt.h:
     47
    1482007-01-11  George Staikos  <staikos@kde.org>
    249
  • trunk/WebKitQt/QtLauncher/main.cpp

    r18196 r18765  
    8989    Page* page = new Page(new ChromeClientQt(), new ContextMenuClientQt(),
    9090                          new EditorClientQt());
    91     Frame* frame = new FrameQt(page, 0, new FrameQtClient(), new FrameLoaderClientQt());
     91    FrameLoaderClientQt *frameLoaderClient = new FrameLoaderClientQt();
     92    FrameQt* frame = new FrameQt(page, 0, new FrameQtClient(), frameLoaderClient);
     93    frameLoaderClient->setFrame(frame);
    9294
    9395    FrameView* frameView = new FrameView(frame);
  • trunk/WebKitQt/WebCoreSupport/FrameLoaderClientQt.cpp

    r18650 r18765  
    3030#include "FrameLoaderClientQt.h"
    3131#include "DocumentLoader.h"
     32#include "ResourceResponse.h"
     33#include "qdebug.h"
    3234
    3335#define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d (%s)\n", __FILE__, __LINE__, __FUNCTION__); } while(0)
    3436
     37
    3538namespace WebCore
    3639{
    3740
    3841FrameLoaderClientQt::FrameLoaderClientQt()
    39 {
    40     notImplemented();
     42    : m_frame(0)
     43{
    4144}
    4245
     
    4447FrameLoaderClientQt::~FrameLoaderClientQt()
    4548{
    46     notImplemented();
    47 }
    48 
     49}
     50
     51void FrameLoaderClientQt::setFrame(FrameQt *frame)
     52{
     53    m_frame = frame;
     54}
    4955
    5056void FrameLoaderClientQt::detachFrameLoader()
    5157{
    52     notImplemented();
     58    m_frame = 0;
    5359}
    5460
     
    119125void FrameLoaderClientQt::makeDocumentView()
    120126{
    121     notImplemented();
     127    qDebug() << "FrameLoaderClientQt::makeDocumentView" << m_frame->document();
     128   
     129//     if (!m_frame->document())
     130//         m_frame->loader()->createEmptyDocument();
    122131}
    123132
     
    125134void FrameLoaderClientQt::makeRepresentation(DocumentLoader*)
    126135{
    127     notImplemented();
     136    // don't need this for now I think.
    128137}
    129138
     
    179188void FrameLoaderClientQt::setCopiesOnScroll()
    180189{
    181     notImplemented();
     190    // apparently mac specific
    182191}
    183192
     
    278287void FrameLoaderClientQt::dispatchDidStartProvisionalLoad()
    279288{
    280     notImplemented();
     289    // we're not interested in this neither I think
    281290}
    282291
     
    314323void FrameLoaderClientQt::cancelPolicyCheck()
    315324{
    316     notImplemented();
    317 }
    318 
    319 
    320 void FrameLoaderClientQt::dispatchWillSubmitForm(FramePolicyFunction,
     325    // don't need to do anything here as long as we don't start doing asyncronous policy checks
     326}
     327
     328
     329void FrameLoaderClientQt::dispatchWillSubmitForm(FramePolicyFunction function,
    321330                                                 PassRefPtr<FormState>)
    322331{
    323     notImplemented();
     332    // FIXME: This is surely too simple
     333    if (!m_frame)
     334        return;
     335    (m_frame->loader()->*function)(PolicyUse);
    324336}
    325337
     
    358370void FrameLoaderClientQt::progressStarted()
    359371{
    360     notImplemented();
     372    // no progress notification for now
    361373}
    362374
     
    364376void FrameLoaderClientQt::progressCompleted()
    365377{
    366     notImplemented();
    367 }
    368 
    369 
    370 void FrameLoaderClientQt::setMainFrameDocumentReady(bool)
    371 {
    372     notImplemented();
     378    // no progress notification for now
     379}
     380
     381
     382void FrameLoaderClientQt::setMainFrameDocumentReady(bool b)
     383{
     384    // this is only interesting once we provide an external API for the DOM
    373385}
    374386
     
    419431void FrameLoaderClientQt::clearArchivedResources()
    420432{
    421     notImplemented();
     433    // don't think we need to do anything here currently
    422434}
    423435
     
    425437bool FrameLoaderClientQt::canShowMIMEType(const String& MIMEType) const
    426438{
    427     notImplemented();
    428     return false;
    429 }
    430 
    431 
    432 bool FrameLoaderClientQt::representationExistsForURLScheme(
    433     const String& URLScheme) const
    434 {
    435     notImplemented();
     439    // FIXME: This is not good enough in the general case
     440    qDebug() << "FrameLoaderClientQt::canShowMIMEType" << MIMEType;
     441    return true;
     442}
     443
     444
     445bool FrameLoaderClientQt::representationExistsForURLScheme(const String& URLScheme) const
     446{
     447    notImplemented();
     448    qDebug() << "    scheme is" << URLScheme;
    436449    return false;
    437450}
     
    459472void FrameLoaderClientQt::provisionalLoadStarted()
    460473{
    461     notImplemented();
     474    // don't need to do anything here
    462475}
    463476
     
    484497void FrameLoaderClientQt::prepareForDataSourceReplacement()
    485498{
    486     notImplemented();
     499    m_frame->loader()->detachChildren();
    487500}
    488501
     
    506519void FrameLoaderClientQt::frameLoaderDestroyed()
    507520{
    508     notImplemented();
     521    m_frame = 0;
     522    delete this;
    509523}
    510524
    511525bool FrameLoaderClientQt::canHandleRequest(const WebCore::ResourceRequest&) const
    512526{
    513     notImplemented();
     527    return true;
    514528}
    515529
     
    537551{
    538552    notImplemented();
     553    return false;
    539554}
    540555
     
    551566bool FrameLoaderClientQt::canCachePage() const
    552567{
    553     notImplemented();
     568    // don't do any caching for now
     569    return false;
    554570}
    555571
     
    559575}
    560576
    561 void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader*, const char*, int)
    562 {
    563     notImplemented();
     577void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length)
     578{
     579    qDebug() << "FrameLoaderClientQt::committedLoad" << length;
     580    if (!m_frame)
     581        return;
     582    FrameLoader *fl = loader->frameLoader();
     583    fl->setEncoding(m_response.textEncodingName(), false);
     584    fl->addData(data, length);
    564585}
    565586
     
    567588{
    568589    notImplemented();
     590    return ResourceError();
    569591}
    570592
     
    572594{
    573595    notImplemented();
     596    return ResourceError();
    574597}
    575598
     
    577600{
    578601    notImplemented();
     602    return ResourceError();
    579603}
    580604
     
    582606{
    583607    notImplemented();
     608    return ResourceError();
    584609}
    585610
     
    587612{
    588613    notImplemented();
     614    return ResourceError();
    589615}
    590616
     
    592618{
    593619    notImplemented();
    594 }
    595 
    596 WTF::PassRefPtr<WebCore::DocumentLoader> FrameLoaderClientQt::createDocumentLoader(const WebCore::ResourceRequest&)
    597 {
    598     notImplemented();
     620    return false;
     621}
     622
     623WTF::PassRefPtr<WebCore::DocumentLoader> FrameLoaderClientQt::createDocumentLoader(const WebCore::ResourceRequest& request)
     624{
     625    RefPtr<DocumentLoader> loader = new DocumentLoader(request);
     626    return loader.release();
    599627}
    600628
     
    604632}
    605633
    606 void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, void*, WebCore::ResourceRequest&, const WebCore::ResourceResponse&)
    607 {
    608     notImplemented();
    609 }
    610 
    611 void FrameLoaderClientQt::dispatchDidReceiveResponse(WebCore::DocumentLoader*, void*, const WebCore::ResourceResponse&)
    612 {
    613     notImplemented();
     634void FrameLoaderClientQt::dispatchWillSendRequest(WebCore::DocumentLoader*, void*, WebCore::ResourceRequest& request, const WebCore::ResourceResponse& response)
     635{
     636    // seems like the Mac code doesn't do anything here by default neither
     637    qDebug() << "FrameLoaderClientQt::dispatchWillSendRequest" << request.isNull() << request.url().url();
     638}
     639
     640void FrameLoaderClientQt::dispatchDidReceiveResponse(WebCore::DocumentLoader*, void*, const WebCore::ResourceResponse& response)
     641{
     642
     643    m_response = response;
     644    m_firstData = true;
     645    qDebug() << "    got response from" << response.url().url();
    614646}
    615647
     
    649681}
    650682
    651 void FrameLoaderClientQt::dispatchDecidePolicyForMIMEType(void (WebCore::FrameLoader::*)(WebCore::PolicyAction), const WebCore::String&, const WebCore::ResourceRequest&)
    652 {
    653     notImplemented();
    654 }
    655 
    656 void FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction(void (WebCore::FrameLoader::*)(WebCore::PolicyAction), const WebCore::NavigationAction&, const WebCore::ResourceRequest&, const WebCore::String&)
    657 {
    658     notImplemented();
    659 }
    660 
    661 void FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction(void (WebCore::FrameLoader::*)(WebCore::PolicyAction), const WebCore::NavigationAction&, const WebCore::ResourceRequest&)
    662 {
    663     notImplemented();
     683void FrameLoaderClientQt::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const WebCore::String&, const WebCore::ResourceRequest&)
     684{
     685    if (!m_frame)
     686        return;
     687    // FIXME: This is maybe too simple
     688    (m_frame->loader()->*function)(PolicyUse);
     689}
     690
     691void FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, const WebCore::String&)
     692{
     693    if (!m_frame)
     694        return;
     695    // FIXME: This is maybe too simple
     696    (m_frame->loader()->*function)(PolicyIgnore);
     697}
     698
     699void FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&)
     700{
     701    if (!m_frame)
     702        return;
     703    // FIXME: This is maybe too simple
     704    (m_frame->loader()->*function)(PolicyUse);
    664705}
    665706
     
    692733{
    693734    notImplemented();
    694 }
    695 
    696 
    697 }
    698 
    699 
     735    return false;
     736}
     737
     738
     739}
     740
     741
  • trunk/WebKitQt/WebCoreSupport/FrameLoaderClientQt.h

    r18650 r18765  
    3434#include "FrameLoader.h"
    3535#include "Shared.h"
     36#include "ResourceResponse.h"
    3637
    3738namespace WebCore {
     
    5051        FrameLoaderClientQt();
    5152        ~FrameLoaderClientQt();
     53        void setFrame(FrameQt *frame);
    5254        virtual void detachFrameLoader();
    5355
     
    179181        virtual void dispatchDidFailLoad(const WebCore::ResourceError&);
    180182        virtual WebCore::Frame* dispatchCreatePage();
    181         virtual void dispatchDecidePolicyForMIMEType(void (WebCore::FrameLoader::*)(WebCore::PolicyAction), const WebCore::String&, const WebCore::ResourceRequest&);
    182         virtual void dispatchDecidePolicyForNewWindowAction(void (WebCore::FrameLoader::*)(WebCore::PolicyAction), const WebCore::NavigationAction&, const WebCore::ResourceRequest&, const WebCore::String&);
    183         virtual void dispatchDecidePolicyForNavigationAction(void (WebCore::FrameLoader::*)(WebCore::PolicyAction), const WebCore::NavigationAction&, const WebCore::ResourceRequest&);
     183        virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction function, const WebCore::String&, const WebCore::ResourceRequest&);
     184        virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, const WebCore::String&);
     185        virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction function, const WebCore::NavigationAction&, const WebCore::ResourceRequest&);
    184186        virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
    185187        virtual void incrementProgress(void*, const WebCore::ResourceResponse&);
     
    191193        // FIXME: This should probably not be here, but it's needed for the tests currently
    192194        virtual void partClearedInBegin();
    193        
     195
     196
     197    private:
     198        Frame *m_frame;
     199        ResourceResponse m_response;
     200        bool m_firstData;
    194201    };
    195202
  • trunk/WebKitTools/ChangeLog

    r18640 r18765  
     12007-01-11  Lars Knoll <lars@trolltech.com>
     2
     3        Reviewed by Darin.
     4
     5        Adjust to loader changes.
     6
     7        * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
     8        (WebCore::DumpRenderTree::DumpRenderTree):
     9
    1102007-01-06  George Staikos  <staikos@kde.org>
    211
  • trunk/WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp

    r18519 r18765  
    7979    Page* page = new Page(new ChromeClientQt(), new ContextMenuClientQt(), new EditorClientQt());
    8080    m_frame = new FrameQt(page, 0, new FrameQtClient(), m_client);
     81    m_client->setFrame(m_frame);
    8182
    8283    FrameView* view = new FrameView(m_frame);
Note: See TracChangeset for help on using the changeset viewer.