Fix the Qt build
authorlars <lars@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jan 2007 12:04:40 +0000 (12:04 +0000)
committerlars <lars@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jan 2007 12:04:40 +0000 (12:04 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18545 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
WebCore/ChangeLog
WebCore/WebCore.pro
WebCore/history/qt/PageCacheQt.cpp [new file with mode: 0644]
WebCore/loader/qt/DocumentLoaderQt.cpp
WebCore/loader/qt/FrameLoaderQt.cpp
WebCore/platform/network/qt/ResourceHandleQt.cpp
WebKit.pri
WebKitQt/ChangeLog
WebKitQt/WebCoreSupport/FrameLoaderClientQt.cpp
WebKitQt/WebCoreSupport/FrameLoaderClientQt.h

index a57225f..d3b29e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-03  Lars Knoll <lars@trolltech.com>
+
+        Fix the Qt build
+
+        * WebKit.pri:
+
 2006-12-17  Simon Hausmann  <hausmann@kde.org>
 
         Reviewed by Rob Buis.
index d8f28d7..716fd20 100644 (file)
@@ -1,3 +1,24 @@
+2007-01-03  Lars Knoll <lars@trolltech.com>
+
+        Fix the Qt build
+
+        * WebCore.pro:
+        * history/qt/PageCacheQt.cpp: Added.
+        (WebCore::PageCache::close):
+        * loader/qt/DocumentLoaderQt.cpp:
+        (WebCore::DocumentLoader::getResponseRefreshAndModifiedHeaders):
+        (WebCore::DocumentLoader::urlForHistory):
+        * loader/qt/FrameLoaderQt.cpp:
+        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+        (WebCore::FrameLoader::didFirstLayout):
+        (WebCore::FrameLoader::load):
+        (WebCore::FrameLoader::opened):
+        (WebCore::FrameLoader::dataURLBaseFromRequest):
+        (WebCore::FrameLoader::applyUserAgent):
+        * platform/network/qt/ResourceHandleQt.cpp:
+        (WebCore::ResourceHandle::loadsBlocked):
+        (WebCore::ResourceHandle::willLoadFromCache):
+
 2007-01-02  Brady Eidson  <beidson@apple.com>
 
         Reviewed extensively and repeatedly by Darin
index 826b6d6..87f5f6b 100644 (file)
@@ -59,6 +59,7 @@ INCLUDEPATH +=  $$PWD \
                 $$PWD/editing \
                 $$PWD/kwq \
                 $$PWD/rendering \
+                $$PWD/history \
                 $$PWD/xml \
                 $$PWD/html \
                 $$PWD/bindings/js \
@@ -845,6 +846,7 @@ contains(DEFINES, SVG_SUPPORT=1) {
         ksvg2/svg/SVGFECompositeElement.cpp \
         ksvg2/svg/SVGImageElement.cpp \
         ksvg2/svg/SVGAnimateElement.cpp \
+        ksvg2/svg/SVGAnimateMotionElement.cpp \
         ksvg2/svg/SVGURIReference.cpp \
         ksvg2/svg/SVGLength.cpp \
         ksvg2/svg/SVGPathSegCurvetoCubic.cpp \
@@ -1001,7 +1003,12 @@ contains(DEFINES, SVG_SUPPORT=1) {
         rendering/RenderSVGText.cpp \
         rendering/RenderSVGTSpan.cpp \
         rendering/SVGInlineFlowBox.cpp \
-        rendering/SVGRootInlineBox.cpp
+        rendering/SVGRootInlineBox.cpp \
+        history/BackForwardList.cpp \
+        history/HistoryItem.cpp \
+        history/HistoryItemTimer.cpp \
+        history/PageCache.cpp \
+        history/qt/PageCacheQt.cpp \
 
         # GENERATOR 5-B:
         svgnames_a.output = tmp/SVGNames.cpp
diff --git a/WebCore/history/qt/PageCacheQt.cpp b/WebCore/history/qt/PageCacheQt.cpp
new file mode 100644 (file)
index 0000000..a64b9db
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2006 Trolltech ASA
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "PageCache.h"
+
+namespace WebCore {
+
+void PageCache::close()
+{
+    if (!m_pageState)
+        return;
+    
+    // FIXME: <rdar://problem/4886844>
+    // The current method of tracking the "document view" is messy and quite platform specific
+    // Having a WebCore-way to track this would be great.
+//     if (m_documentView)
+//         objc_msgSend(m_documentView.get(), @selector(closeIfNotCurrentView));
+
+    m_pageState->clear();
+    
+    // Setting these to null is how the PageCache object knows it's been closed
+    m_pageState = 0;
+    m_documentLoader = 0;
+}
+
+} //namespace WebCore
+
index abdf398..97d9a3d 100644 (file)
@@ -408,14 +408,15 @@ void DocumentLoader::setTitle(const String& title)
     }
 }
 
-KURL DocumentLoader::URLForHistory() const
+bool DocumentLoader::getResponseRefreshAndModifiedHeaders(WebCore::String&, WebCore::String&) const
 {
-    // Return the URL to be used for history and B/F list.
-    // Returns nil for WebDataProtocol URLs that aren't alternates 
-    // for unreachable URLs, because these can't be stored in history.
-    KURL url;
     notImplemented();
-    return url;
+}
+
+KURL DocumentLoader::urlForHistory() const
+{
+    notImplemented();
+    return KURL();
 }
 
 }
index f806183..74b1cd5 100644 (file)
@@ -195,9 +195,9 @@ void FrameLoader::checkLoadCompleteForThisFrame()
         m_client->forceLayoutForNonHTML();
              
         // If the user had a scroll point, scroll to it, overriding the anchor point if any.
-        if ((isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload)
-            && m_client->hasBackForwardList())
-            m_client->restoreScrollPositionAndViewState();
+//         if ((isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload)
+//             && m_client->hasBackForwardList())
+//             m_client->restoreScrollPositionAndViewState();
 
 //         if (error)
 //             m_client->dispatchDidFailLoad(error);
@@ -217,11 +217,6 @@ void FrameLoader::checkLoadCompleteForThisFrame()
 
 }
 
-void FrameLoader::goBackOrForward(int distance)
-{
-    notImplemented();
-}
-
 KURL FrameLoader::historyURL(int distance)
 {
     notImplemented();
@@ -230,8 +225,8 @@ KURL FrameLoader::historyURL(int distance)
 
 void FrameLoader::didFirstLayout()
 {
-    if (isBackForwardLoadType(m_loadType) && m_client->hasBackForwardList())
-        m_client->restoreScrollPositionAndViewState();
+//     if (isBackForwardLoadType(m_loadType) && m_client->hasBackForwardList())
+//         m_client->restoreScrollPositionAndViewState();
 
     m_firstLayoutDone = true;
     m_client->dispatchDidFirstLayout();
@@ -249,17 +244,6 @@ void FrameLoader::partClearedInBegin()
         static_cast<FrameLoaderClientQt*>(m_client)->partClearedInBegin();
 }
 
-void FrameLoader::saveDocumentState()
-{
-    // Do not save doc state if the page has a password field and a form that would be submitted via https.
-    //notImplemented();
-}
-
-void FrameLoader::restoreDocumentState()
-{
-    //notImplemented();
-}
-
 void FrameLoader::didChangeTitle(DocumentLoader* loader)
 {
     notImplemented();
@@ -299,11 +283,44 @@ void FrameLoader::load(DocumentLoader* loader, FrameLoadType type, PassRefPtr<Fo
     notImplemented();
 }
 
+
+void FrameLoader::load(const ResourceRequest& request)
+{
+    notImplemented();
+}
+
+void FrameLoader::load(const ResourceRequest& request, const String& frameName)
+{
+    notImplemented();
+}
+
+void FrameLoader::load(const ResourceRequest& request, const NavigationAction& action, FrameLoadType type, PassRefPtr<FormState> formState)
+{
+    notImplemented();
+}
+    
 void FrameLoader::loadResourceSynchronously(const ResourceRequest& request, ResourceResponse& r, Vector<char>& data) {
     notImplemented();
 }
 
+void FrameLoader::opened()
+{
+    notImplemented();
+}
+
+KURL FrameLoader::dataURLBaseFromRequest(const ResourceRequest& request) const
+{
+    notImplemented();
+    return KURL();
+}
 
+void FrameLoader::applyUserAgent(ResourceRequest& request)
+{
+    String userAgent = client()->userAgent();
+    ASSERT(!userAgent.isNull());
+    request.setHTTPUserAgent(userAgent);
+}
+    
 PolicyCheck::PolicyCheck()
     : m_contentFunction(0)
 {
index 280d8ff..4e658ed 100644 (file)
@@ -71,7 +71,13 @@ void ResourceHandle::cancel()
 bool ResourceHandle::loadsBlocked()
 {
     notImplemented();
+    return false;
 }
 
+bool ResourceHandle::willLoadFromCache(ResourceRequest& request)
+{
+    notImplemented();
+    return false;
+}
 
 } // namespace WebCore
index 06686c6..379de9e 100644 (file)
@@ -10,6 +10,7 @@ INCLUDEPATH += $$PWD/JavaScriptCore \
                $$PWD/WebCore/page \
                $$PWD/WebCore/dom \
                $$PWD/WebCore/html \
+               $$PWD/WebCore/history \
                $$PWD/WebCore/rendering \
                $$PWD/WebCore/loader \
                $$PWD/WebCore/loader/qt \
index c636e7e..2e333c3 100644 (file)
@@ -1,3 +1,17 @@
+2007-01-03  Lars Knoll <lars@trolltech.com>
+
+        Fix the Qt build
+
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::setDocumentViewFromPageCache):
+        (WebCore::FrameLoaderClientQt::updateGlobalHistoryForStandardLoad):
+        (WebCore::FrameLoaderClientQt::updateGlobalHistoryForReload):
+        (WebCore::FrameLoaderClientQt::shouldGoToHistoryItem):
+        (WebCore::FrameLoaderClientQt::saveScrollPositionAndViewStateToItem):
+        (WebCore::FrameLoaderClientQt::saveDocumentViewToPageCache):
+        (WebCore::FrameLoaderClientQt::canCachePage):
+        * WebCoreSupport/FrameLoaderClientQt.h:
+
 2006-12-29  George Staikos  <staikos@kde.org>
 
         Add missing notimplemented.
index 4303f64..81f82cb 100644 (file)
@@ -518,6 +518,42 @@ void FrameLoaderClientQt::partClearedInBegin()
     notImplemented();
 }
 
+void FrameLoaderClientQt::setDocumentViewFromPageCache(WebCore::PageCache*)
+{
+    notImplemented();
+}
+
+void FrameLoaderClientQt::updateGlobalHistoryForStandardLoad(const WebCore::KURL&)
+{
+    notImplemented();
+}
+
+void FrameLoaderClientQt::updateGlobalHistoryForReload(const WebCore::KURL&)
+{
+    notImplemented();
+}
+
+bool FrameLoaderClientQt::shouldGoToHistoryItem(WebCore::HistoryItem*) const
+{
+    notImplemented();
+}
+
+void FrameLoaderClientQt::saveScrollPositionAndViewStateToItem(WebCore::HistoryItem*)
+{
+    notImplemented();
+}
+
+void FrameLoaderClientQt::saveDocumentViewToPageCache(WebCore::PageCache*)
+{
+    notImplemented();
+}
+
+bool FrameLoaderClientQt::canCachePage() const
+{
+    notImplemented();
+}
+
+
 }
 
 
index c22f6e6..2f51a14 100644 (file)
@@ -150,8 +150,18 @@ namespace WebCore {
 
         virtual String userAgent();
 
+
+        virtual void setDocumentViewFromPageCache(WebCore::PageCache*);
+        virtual void updateGlobalHistoryForStandardLoad(const WebCore::KURL&);
+        virtual void updateGlobalHistoryForReload(const WebCore::KURL&);
+        virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const;
+        virtual void saveScrollPositionAndViewStateToItem(WebCore::HistoryItem*);
+        virtual void saveDocumentViewToPageCache(WebCore::PageCache*);
+        virtual bool canCachePage() const;
+        
         // FIXME: This should probably not be here, but it's needed for the tests currently
         virtual void partClearedInBegin();
+        
     };
 
 }