Reviewed by Mitz.
authorweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Oct 2006 12:53:53 +0000 (12:53 +0000)
committerweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Oct 2006 12:53:53 +0000 (12:53 +0000)
        Fix Qt/Linux build & some little fixes:

        - Adapt to Maciej's FrameLoadRequest changes.
        - Fix response handling - don't try to compare with '0' - for us it's a non-ptr QString object.
        - Actually call setAllData from loader/loader.cpp (David Carson forgot that in his last commit)
        - Fix CacheObjectExpiresTime/ResponseIsMultipart signature.

        * loader/CachedCSSStyleSheet.cpp:
        (WebCore::CachedCSSStyleSheet::checkNotify):
        * loader/CachedResource.h:
        (WebCore::CachedResource::CachedResource):
        * loader/loader.cpp:
        (WebCore::Loader::receivedAllData):
        (WebCore::Loader::receivedResponse):
        * platform/qt/BrowserExtensionQt.cpp:
        (WebCore::BrowserExtensionQt::createNewWindow):
        * platform/qt/BrowserExtensionQt.h:
        * platform/qt/FrameQt.cpp:
        (WebCore::FrameQt::submitForm):
        (WebCore::FrameQt::urlSelected):
        (WebCore::FrameQt::openURLRequest):
        * platform/qt/FrameQt.h:
        * platform/qt/GraphicsContextQt.cpp:
        (WebCore::GraphicsContext::setURLForRect):
        * platform/qt/TemporaryLinkStubs.cpp:
        (WebCore::CacheObjectExpiresTime):
        (WebCore::ResponseIsMultipart):
        (WebCore::CachedResource::setResponse):
        (WebCore::CachedResource::setAllData):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17057 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/CachedCSSStyleSheet.cpp
WebCore/loader/CachedResource.h
WebCore/loader/loader.cpp
WebCore/platform/qt/BrowserExtensionQt.cpp
WebCore/platform/qt/BrowserExtensionQt.h
WebCore/platform/qt/FrameQt.cpp
WebCore/platform/qt/FrameQt.h
WebCore/platform/qt/GraphicsContextQt.cpp
WebCore/platform/qt/TemporaryLinkStubs.cpp

index 4be18e2667f512ebc0f2f870be207d6ac432f784..2508f1bce404dd2817482bb5c40eab282bd3b0d7 100644 (file)
@@ -1,3 +1,37 @@
+2006-10-14  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed by Mitz.
+
+        Fix Qt/Linux build & some little fixes:
+
+        - Adapt to Maciej's FrameLoadRequest changes.
+        - Fix response handling - don't try to compare with '0' - for us it's a non-ptr QString object.
+        - Actually call setAllData from loader/loader.cpp (David Carson forgot that in his last commit)
+        - Fix CacheObjectExpiresTime/ResponseIsMultipart signature.
+
+        * loader/CachedCSSStyleSheet.cpp:
+        (WebCore::CachedCSSStyleSheet::checkNotify):
+        * loader/CachedResource.h:
+        (WebCore::CachedResource::CachedResource):
+        * loader/loader.cpp:
+        (WebCore::Loader::receivedAllData):
+        (WebCore::Loader::receivedResponse):
+        * platform/qt/BrowserExtensionQt.cpp:
+        (WebCore::BrowserExtensionQt::createNewWindow):
+        * platform/qt/BrowserExtensionQt.h:
+        * platform/qt/FrameQt.cpp:
+        (WebCore::FrameQt::submitForm):
+        (WebCore::FrameQt::urlSelected):
+        (WebCore::FrameQt::openURLRequest):
+        * platform/qt/FrameQt.h:
+        * platform/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::setURLForRect):
+        * platform/qt/TemporaryLinkStubs.cpp:
+        (WebCore::CacheObjectExpiresTime):
+        (WebCore::ResponseIsMultipart):
+        (WebCore::CachedResource::setResponse):
+        (WebCore::CachedResource::setAllData):
+
 2006-10-14  David Carson  <dacarson@gmail.com>
 
         Reviewed by Maciej.
index 3860f370b8a50f5714a559fb6e8432147c69462f..ec94f31243284e47892243602be9e0ea947b7bd9 100644 (file)
@@ -95,7 +95,11 @@ void CachedCSSStyleSheet::checkNotify()
 
     CachedResourceClientWalker w(m_clients);
     while (CachedResourceClient *c = w.next()) {
+#if !PLATFORM(QT)
         if (m_response && !IsResponseURLEqualToURL(m_response, m_url))
+#else 
+        if (!m_response.isEmpty() && !IsResponseURLEqualToURL(m_response, m_url))
+#endif
             c->setCSSStyleSheet(ResponseURL(m_response), m_decoder->encoding().name(), m_sheet);
         else
             c->setCSSStyleSheet(m_url, m_decoder->encoding().name(), m_sheet);
index 9590b6a17d3e994701a2005245e08202d15acb82..b136440044cd5089cc253b4a1fa457b870236034 100644 (file)
@@ -79,7 +79,9 @@ namespace WebCore {
             m_free = false;
             m_cachePolicy = cachePolicy;
             m_request = 0;
+#if !PLATFORM(QT)
             m_response = 0;
+#endif
             m_allData = 0;
             m_expireDate = expireDate;
             m_deleted = false;
index 4b2a3267362bca3c7617ff6271b8f081c442b82b..0a6632f6c60454f3805a13566a15d1cf15ef532f 100644 (file)
@@ -107,9 +107,7 @@ void Loader::receivedAllData(ResourceLoader* job, PlatformData allData)
     } else {
         docLoader->setLoadInProgress(true);
         object->data(req->buffer(), true);
-#if PLATFORM(MAC)
         object->setAllData(allData);
-#endif
         docLoader->setLoadInProgress(false);
         object->finish();
     }
@@ -123,7 +121,12 @@ void Loader::receivedResponse(ResourceLoader* job, PlatformResponse response)
 {
     Request* req = m_requestsLoading.get(job);
     ASSERT(req);
+#if !PLATFORM(QT)
     ASSERT(response);
+#else
+    ASSERT(!response.isEmpty());
+#endif
+
     req->cachedObject()->setResponse(response);
     req->cachedObject()->setExpireDate(CacheObjectExpiresTime(req->docLoader(), response), false);
     
index b24bd37025c8de7f4830140c506241a670413eb5..3c95cdf97fb948bf5310de0cd716bac6ae4199d3 100644 (file)
@@ -45,11 +45,11 @@ bool BrowserExtensionQt::canRunModal()
     return false;
 }
 
-void BrowserExtensionQt::createNewWindow(const ResourceRequest& request)
+void BrowserExtensionQt::createNewWindow(const FrameLoadRequest& request)
 {
 }
 
-void BrowserExtensionQt::createNewWindow(const ResourceRequest& request, const WindowArgs& args, Frame*& frame)
+void BrowserExtensionQt::createNewWindow(const FrameLoadRequest& request, const WindowArgs& args, Frame*& frame)
 {
     notImplemented();
 }
index b7790a526e25912c9888f33184aee2f87165420a..ae89f57c30b90a4b9418dcb14740b686fbb6a77d 100644 (file)
@@ -38,8 +38,8 @@ class BrowserExtensionQt : public BrowserExtension {
 public:
     BrowserExtensionQt(Frame*);
 
-    virtual void createNewWindow(const ResourceRequest&);
-    virtual void createNewWindow(const ResourceRequest&, const WindowArgs&, Frame*&);
+    virtual void createNewWindow(const FrameLoadRequest&);
+    virtual void createNewWindow(const FrameLoadRequest&, const WindowArgs&, Frame*&);
 
     virtual void setIconURL(const KURL&);
     virtual void setTypedIconURL(const KURL&, const String& type);
index d9a0d473f08683162d75ef703ce6fe7333140b3f..9c4cc836d79e7179ed4888c98e40b902b7ed9fcf 100644 (file)
@@ -40,6 +40,7 @@
 #include "Document.h"
 #include "HTMLElement.h"
 #include "DOMWindow.h"
+#include "FrameLoadRequest.h"
 #include "DOMImplementation.h"
 #include "BrowserExtensionQt.h"
 #include "ResourceLoaderInternal.h"
@@ -127,8 +128,10 @@ bool FrameQt::openURL(const KURL& url)
     return true;
 }
 
-void FrameQt::submitForm(const ResourceRequest& request)
+void FrameQt::submitForm(const FrameLoadRequest& frameLoadRequest)
 {
+    ResourceRequest request = frameLoadRequest.m_request;
+
     // FIXME: this is a hack inherited from FrameMac, and should be pushed into Frame
     if (d->m_submittedFormURL == request.url())
         return;
@@ -141,8 +144,10 @@ void FrameQt::submitForm(const ResourceRequest& request)
     clearRecordedFormValues();
 }
 
-void FrameQt::urlSelected(const ResourceRequest& request)
+void FrameQt::urlSelected(const FrameLoadRequest& frameLoadRequest)
 {
+    ResourceRequest request = frameLoadRequest.m_request;
+
     if (!m_client)
         return;
 
@@ -298,7 +303,7 @@ void FrameQt::restoreDocumentState()
     // FIXME: Implement this as soon a KPart is created...
 }
 
-void FrameQt::openURLRequest(const ResourceRequest&)
+void FrameQt::openURLRequest(const FrameLoadRequest&)
 {
     notImplemented();
 }
index 862d734b9503b06e1e4a1ad60d4ce1d85d23bb87..744fb6a33136410bae15907f27472c66f8376577 100644 (file)
@@ -47,9 +47,9 @@ public:
     virtual ~FrameQt();
 
     virtual bool openURL(const KURL&);
-    virtual void openURLRequest(const ResourceRequest&);
-    virtual void submitForm(const ResourceRequest&);
-    virtual void urlSelected(const ResourceRequest&);
+    virtual void openURLRequest(const FrameLoadRequest&);
+    virtual void submitForm(const FrameLoadRequest&);
+    virtual void urlSelected(const FrameLoadRequest&);
 
     virtual void setTitle(const String&);
 
index 59387201384df9a7e0908447f47e5b0eb3dcadfe..54ea79809b67cc4a65ec93161c23b9eca8b642b7 100644 (file)
@@ -777,6 +777,11 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     m_data->p().setMatrix(transform, true);
 }
 
+void GraphicsContext::setURLForRect(const KURL& link, const IntRect& destRect)
+{
+    notImplemented();
+}
+
 #ifdef SVG_SUPPORT
 KRenderingDeviceContext* GraphicsContext::createRenderingDeviceContext()
 {
index 0e295562b777f311678a57ac093ffa3afad00e25..f924183c8c8c1178a922a757523b055f1ef68f76 100644 (file)
@@ -47,6 +47,7 @@
 #include "KURL.h"
 #include "ScrollBar.h"
 #include "PlatformScrollBar.h"
+#include "CachedResource.h"
 #include "ScrollBar.h"
 #include "Path.h"
 #include "PlatformMouseEvent.h"
@@ -148,13 +149,13 @@ bool IconDatabase::setIconURLForPageURL(const String& iconURL, const String& pag
 void CheckCacheObjectStatus(DocLoader*, CachedResource*) { }
 bool CheckIfReloading(WebCore::DocLoader*) { return false; }
 Vector<char> ServeSynchronousRequest(Loader*, DocLoader*, ResourceLoader*, KURL&, DeprecatedString&) { notImplemented(); return Vector<char>(); }
-time_t CacheObjectExpiresTime(DocLoader*, PlatformResponse*) { return 0; }
-bool ResponseIsMultipart(PlatformResponse*) { return false; }
+time_t CacheObjectExpiresTime(DocLoader*, PlatformResponse) { return 0; }
+bool ResponseIsMultipart(PlatformResponse) { return false; }
 DeprecatedString ResponseMIMEType(PlatformResponse) { return DeprecatedString(); }
 bool IsResponseURLEqualToURL(PlatformResponse , const String& URL) { return false; }
 DeprecatedString ResponseURL(PlatformResponse) { return DeprecatedString(); }
-CachedResource::setResponse(PlatformResponse) { notImplemented(); }
-CachedResource::setAllData(PlatformData) { notImplemented(); }
+void CachedResource::setResponse(PlatformResponse) { notImplemented(); }
+void CachedResource::setAllData(PlatformData) { notImplemented(); }
 }
 
 bool WebCore::historyContains(DeprecatedString const&) { return false; }