Reviewed by Maciej.
authorzack <zack@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Dec 2006 01:27:19 +0000 (01:27 +0000)
committerzack <zack@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Dec 2006 01:27:19 +0000 (01:27 +0000)
Patch fixes compile of all Qt/KDE code after
the recent API changes.

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

37 files changed:
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/editing/qt/EditorQt.cpp [new file with mode: 0644]
WebCore/loader/NavigationAction.h
WebCore/loader/qt/FrameLoaderClientQt.cpp
WebCore/loader/qt/FrameLoaderClientQt.h
WebCore/loader/qt/FrameLoaderQt.cpp
WebCore/loader/qt/ResourceLoaderQt.cpp
WebCore/platform/ContextMenu.h
WebCore/platform/graphics/qt/GraphicsContextQt.cpp
WebCore/platform/graphics/qt/PathQt.cpp
WebCore/platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp
WebCore/platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp
WebCore/platform/network/ResourceHandle.h
WebCore/platform/network/ResourceHandleInternal.h
WebCore/platform/network/qt/ResourceHandleManager.cpp
WebCore/platform/network/qt/ResourceHandleQt.cpp
WebCore/platform/qt/ChromeClientQt.cpp
WebCore/platform/qt/ChromeClientQt.h
WebCore/platform/qt/ContextMenuClientQt.cpp
WebCore/platform/qt/ContextMenuClientQt.h
WebCore/platform/qt/ContextMenuItemQt.cpp [new file with mode: 0644]
WebCore/platform/qt/ContextMenuQt.cpp
WebCore/platform/qt/CursorQt.cpp
WebCore/platform/qt/EditorClientQt.cpp
WebCore/platform/qt/EditorClientQt.h
WebCore/platform/qt/FrameQt.cpp
WebCore/platform/qt/FrameQt.h
WebCore/platform/qt/FrameQtClient.cpp
WebCore/platform/qt/LoaderFunctionsQt.cpp
WebCore/platform/qt/PasteboardQt.cpp [new file with mode: 0644]
WebKitQt/ChangeLog
WebKitQt/QtLauncher/main.cpp
WebKitQt/WebKitPart/WebKitPart.cpp
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp
WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/main.cpp

index 58f61072462a935bc522667f9ed0fdc96499dd0b..40ac2a1eb5fc5059135f9161baf5d11514d9fa08 100644 (file)
@@ -17,6 +17,7 @@ include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}/css
    ${CMAKE_CURRENT_SOURCE_DIR}/dom
    ${CMAKE_CURRENT_SOURCE_DIR}/editing
+   ${CMAKE_CURRENT_SOURCE_DIR}/editing/qt
    ${CMAKE_CURRENT_BINARY_DIR}/html
    ${CMAKE_CURRENT_SOURCE_DIR}/html
    ${CMAKE_CURRENT_SOURCE_DIR}/ksvg2 
@@ -661,6 +662,7 @@ set (SVG_SOURCES
 
     rendering/RenderForeignObject.cpp
     rendering/RenderPath.cpp
+    rendering/RenderSVGBlock.cpp
     rendering/RenderSVGContainer.cpp
     rendering/RenderSVGImage.cpp
     rendering/RenderSVGInline.cpp
@@ -828,7 +830,6 @@ set(WebCore_SRCS
     editing/MergeIdenticalElementsCommand.cpp
     editing/ModifySelectionListLevel.cpp
     editing/MoveSelectionCommand.cpp
-    editing/RebalanceWhitespaceCommand.cpp
     editing/RemoveCSSPropertyCommand.cpp
     editing/RemoveNodeAttributeCommand.cpp
     editing/RemoveNodeCommand.cpp
@@ -846,6 +847,7 @@ set(WebCore_SRCS
     editing/VisiblePosition.cpp
     editing/visible_units.cpp
     editing/WrapContentsInDummySpanCommand.cpp
+    editing/qt/EditorQt.cpp
 
     html/CanvasGradient.cpp
     html/CanvasPattern.cpp
@@ -925,7 +927,7 @@ set(WebCore_SRCS
     html/HTMLTokenizer.cpp
     html/HTMLUListElement.cpp
     html/HTMLViewSourceDocument.cpp
+
 #   icon/IconDatabase.cpp
 #   icon/SiteIcon.cpp
 #   icon/SQLDatabase.cpp
@@ -968,7 +970,7 @@ set(WebCore_SRCS
     page/Chrome.cpp
     page/ContextMenuController.cpp
     page/DOMWindow.cpp
-    page/EventHandler.cpp   
+    page/EventHandler.cpp
     page/Frame.cpp
     page/FrameTree.cpp
     page/FrameView.cpp
@@ -976,7 +978,7 @@ set(WebCore_SRCS
     page/Page.cpp
     page/PageState.cpp
 
-    page/qt/EventHandlerQt.cpp   
+    page/qt/EventHandlerQt.cpp
 
     platform/Arena.cpp
     platform/ArrayImpl.cpp
@@ -998,6 +1000,7 @@ set(WebCore_SRCS
     platform/KURL.cpp
     platform/Logging.cpp
     platform/MimeTypeRegistry.cpp
+#    plafform/Pasteboard.cpp
     platform/RegularExpression.cpp
     platform/SegmentedString.cpp
     platform/String.cpp
@@ -1139,14 +1142,18 @@ set(WebCore_SRCS
     platform/image-decoders/xbm/XBMImageDecoder.cpp
 
     platform/network/FormData.cpp
+    platform/network/HTTPParsers.cpp
     platform/network/ResourceHandle.cpp
-    
+    platform/network/ResourceRequest.cpp
+    platform/network/ResourceResponse.cpp
+
     platform/network/qt/ResourceHandleManager.cpp
     platform/network/qt/ResourceHandleQt.cpp
-    
+
     platform/qt/ChromeClientQt.cpp
     platform/qt/ContextMenuClientQt.cpp
     platform/qt/ContextMenuQt.cpp
+    platform/qt/ContextMenuItemQt.cpp
     platform/qt/CookieJarQt.cpp
     platform/qt/CursorQt.cpp
     platform/qt/EditorClientQt.cpp
@@ -1162,6 +1169,7 @@ set(WebCore_SRCS
     platform/qt/LoaderFunctionsQt.cpp
     platform/qt/MimeTypeRegistryQt.cpp
     platform/qt/PageQt.cpp
+    platform/qt/PasteboardQt.cpp
     platform/qt/PlatformKeyboardEventQt.cpp
     platform/qt/PlatformMouseEventQt.cpp
     platform/qt/PopupMenuQt.cpp
index ea0b8969cca1e72346bca317ab67b4477f59c5b0..bb2340d213d6f60d16665c8815ce8b938737fb17 100644 (file)
@@ -1,3 +1,98 @@
+2006-12-08  Zack Rusin  <zack@kde.org>
+
+        Reviewed by Maciej.
+
+        Fix the Qt/KDE build after all the API changes.
+
+        * CMakeLists.txt:
+        * editing/qt/EditorQt.cpp: Added.
+        (WebCore::Editor::newGeneralClipboard):
+        (WebCore::Editor::ignoreSpelling):
+        (WebCore::Editor::learnSpelling):
+        (WebCore::Editor::advanceToNextMisspelling):
+        (WebCore::Editor::isSelectionMisspelled):
+        (WebCore::Editor::isSelectionUngrammatical):
+        (WebCore::Editor::guessesForUngrammaticalSelection):
+        (WebCore::Editor::guessesForMisspelledSelection):
+        (WebCore::Editor::markMisspellingsInAdjacentWords):
+        (WebCore::Editor::markMisspellings):
+        * loader/NavigationAction.h:
+        * loader/qt/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::frameLoaderDestroyed):
+        (WebCore::FrameLoaderClientQt::canHandleRequest):
+        * loader/qt/FrameLoaderClientQt.h:
+        * loader/qt/FrameLoaderQt.cpp:
+        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+        (WebCore::FrameLoader::load):
+        * loader/qt/ResourceLoaderQt.cpp:
+        * platform/ContextMenu.h:
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        * platform/graphics/qt/PathQt.cpp:
+        (WebCore::Path::addArc):
+        * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
+        (WebCore::SVGPaintServerLinearGradient::setup):
+        * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
+        (WebCore::setup):
+        * platform/network/ResourceHandle.h:
+        (WebCore::ResourceHandle::getInternal):
+        * platform/network/ResourceHandleInternal.h:
+        * platform/network/qt/ResourceHandleManager.cpp:
+        (WebCore::ResourceHandleManager::slotData):
+        (WebCore::ResourceHandleManager::remove):
+        * platform/network/qt/ResourceHandleQt.cpp:
+        (WebCore::ResourceHandle::~ResourceHandle):
+        (WebCore::ResourceHandle::start):
+        * platform/qt/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::addMessageToConsole):
+        (WebCore::ChromeClientQt::chromeDestroyed):
+        * platform/qt/ChromeClientQt.h:
+        * platform/qt/ContextMenuClientQt.cpp:
+        (WebCore::ContextMenuClientQt::copyLinkToClipboard):
+        (WebCore::ContextMenuClientQt::downloadURL):
+        (WebCore::ContextMenuClientQt::copyImageToClipboard):
+        (WebCore::ContextMenuClientQt::contextMenuDestroyed):
+        (WebCore::ContextMenuClientQt::contextMenuItemSelected):
+        * platform/qt/ContextMenuClientQt.h:
+        * platform/qt/ContextMenuItemQt.cpp: Added.
+        (WebCore::ContextMenuItem::ContextMenuItem):
+        (WebCore::ContextMenuItem::~ContextMenuItem):
+        (WebCore::ContextMenuItem::platformDescription):
+        (WebCore::ContextMenuItem::action):
+        (WebCore::ContextMenuItem::title):
+        (WebCore::ContextMenuItem::setAction):
+        (WebCore::ContextMenuItem::setTitle):
+        (WebCore::ContextMenuItem::setSubMenu):
+        * platform/qt/ContextMenuQt.cpp:
+        (WebCore::ContextMenu::ContextMenu):
+        (WebCore::ContextMenu::~ContextMenu):
+        (WebCore::ContextMenu::appendItem):
+        (WebCore::ContextMenu::itemCount):
+        (WebCore::ContextMenu::insertItem):
+        (WebCore::ContextMenu::setPlatformDescription):
+        * platform/qt/CursorQt.cpp:
+        (WebCore::copyCursor):
+        * platform/qt/EditorClientQt.cpp:
+        (WebCore::EditorClientQt::shouldInsertNode):
+        (WebCore::WebCore::EditorClientQt::pageDestroyed):
+        (WebCore::EditorClientQt::smartInsertDeleteEnabled):
+        * platform/qt/EditorClientQt.h:
+        * platform/qt/FrameQt.cpp:
+        (WebCore::FrameQt::FrameQt):
+        (WebCore::FrameQt::keyEvent):
+        * platform/qt/FrameQt.h:
+        * platform/qt/FrameQtClient.cpp:
+        (WebCore::FrameQtClientDefault::openURL):
+        (WebCore::FrameQtClientDefault::submitForm):
+        * platform/qt/LoaderFunctionsQt.cpp:
+        * platform/qt/PasteboardQt.cpp: Added.
+        (WebCore::Pasteboard::Pasteboard):
+        (WebCore::Pasteboard::generalPasteboard):
+        (WebCore::Pasteboard::clearTypes):
+        (WebCore::Pasteboard::writeSelection):
+        (WebCore::Pasteboard::canSmartReplace):
+        (WebCore::Pasteboard::plainText):
+        (WebCore::Pasteboard::documentFragment):
+
 === Safari-521.32 ===
 
 2006-12-08  Rob Buis  <buis@kde.org>
diff --git a/WebCore/editing/qt/EditorQt.cpp b/WebCore/editing/qt/EditorQt.cpp
new file mode 100644 (file)
index 0000000..2448e77
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2006 Zack Rusin <zack@kde.org>
+ * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+ *
+ * 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.
+ */
+
+#import "config.h"
+#import "Editor.h"
+
+#import "ClipboardAccessPolicy.h"
+#import "Clipboard.h"
+#import "Document.h"
+#import "Element.h"
+#import "Selection.h"
+#import "SelectionController.h"
+#import "TextIterator.h"
+#import "htmlediting.h"
+#import "visible_units.h"
+
+namespace WebCore {
+
+PassRefPtr<Clipboard> Editor::newGeneralClipboard(ClipboardAccessPolicy policy)
+{
+    return 0;
+}
+
+void Editor::ignoreSpelling()
+{
+    String text = frame()->selectedText();
+}
+
+void Editor::learnSpelling()
+{
+    String text = frame()->selectedText();
+}
+
+void Editor::advanceToNextMisspelling(bool startBeforeSelection)
+{
+
+}
+
+bool Editor::isSelectionMisspelled()
+{
+    return false;
+}
+
+bool Editor::isSelectionUngrammatical()
+{
+    return false;
+}
+
+Vector<String> Editor::guessesForUngrammaticalSelection()
+{
+    return Vector<String>();
+}
+
+Vector<String> Editor::guessesForMisspelledSelection()
+{
+    String selectedString = frame()->selectedText();
+    return Vector<String>();
+}
+
+void Editor::markMisspellingsInAdjacentWords(const VisiblePosition &p)
+{
+    if (!isContinuousSpellCheckingEnabled())
+        return;
+}
+
+void Editor::markMisspellings(const Selection& selection)
+{
+
+}
+
+} // namespace WebCore
index b037cc1ed996ec3231547b513d5d4956189e28c0..78cd3bc69558e1a0d42ef49b168711b37db416f2 100644 (file)
 #ifndef NavigationAction_h
 #define NavigationAction_h
 
+#include "Event.h"
 #include "FrameLoaderTypes.h"
 #include "KURL.h"
 #include <wtf/Forward.h>
 
 namespace WebCore {
 
-    class Event;
-
     class NavigationAction {
     public:
         NavigationAction();
index daaab039ff6f42e72697b44bef9e1b106d4b95a7..e157e25a8efd014a86dd86bbb759ea0d3a30ddfc 100644 (file)
@@ -503,5 +503,16 @@ void FrameLoaderClientQt::dispatchDidReceiveIcon()
     notImplemented();
 }
 
+void FrameLoaderClientQt::frameLoaderDestroyed()
+{
+
 }
 
+bool FrameLoaderClientQt::canHandleRequest(const WebCore::ResourceRequest&) const
+{
+
+}
+
+}
+
+
index 649e8ed64f2f433950ff4fbd33e8bcb90bdfaa2f..d41f8bffa34334c66d5216398a9ed8011695b014 100644 (file)
@@ -95,6 +95,9 @@ namespace WebCore {
 
         virtual void loadedFromPageCache();
 
+        virtual void frameLoaderDestroyed();
+        virtual bool canHandleRequest(const WebCore::ResourceRequest&) const;
+
         virtual void dispatchDidHandleOnloadEvents();
         virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
         virtual void dispatchDidCancelClientRedirect();
index f809f36987b16feb070f338357331da894650284..dc51d4911f2db598b622ac4a9a749ffd277a3b79 100644 (file)
@@ -169,37 +169,18 @@ String FrameLoader::referrer() const
 }
 
 
-void FrameLoader::detachFromParent()
-{
-    RefPtr<Frame> protect(m_frame);
-
-    closeDocument();
-    stopAllLoaders();
-    m_client->detachedFromParent1();
-    detachChildren();
-    m_client->detachedFromParent2();
-    setDocumentLoader(0);
-    m_client->detachedFromParent3();
-
-    if (Frame* parent = m_frame->tree()->parent())
-        parent->tree()->removeChild(m_frame);
-    m_frame->setView(0);
-    
-    m_client->detachedFromParent4();
-}
-
 
 void FrameLoader::checkLoadCompleteForThisFrame()
 {
     ASSERT(m_client->hasWebView());
     notImplemented();
-    
+
     switch (m_state) {
     case FrameStateProvisional: {
     }
-        
+
     case FrameStateCommittedPage: {
-        DocumentLoader* dl = m_documentLoader.get();            
+        DocumentLoader* dl = m_documentLoader.get();
         if (dl->isLoadingInAPISense())
             return;
 
@@ -282,6 +263,25 @@ void FrameLoader::redirectDataToPlugin(Widget* pluginWidget)
     notImplemented();
 }
 
+
+void FrameLoader::load(const KURL&, Event*)
+{
+}
+void FrameLoader::load(const FrameLoadRequest&, bool userGesture,
+                       Event*, Element* form, const HashMap<String, String>& formValues)
+{
+}
+void FrameLoader::load(const KURL&, const String& referrer, FrameLoadType, const String& target,
+                       Event*, Element* form, const HashMap<String, String>& formValues)
+{
+}
+void FrameLoader::load(DocumentLoader*)
+{
+}
+void FrameLoader::load(DocumentLoader*, FrameLoadType, PassRefPtr<FormState>)
+{
+}
+
 PolicyCheck::PolicyCheck()
     : m_contentFunction(0)
 {
index 572b185341b1e619c84aaa172c05ca379e443691..9b42d88c3ef90d8079f9cc250dbb62cb6b7e0d48 100644 (file)
 
 namespace WebCore {
 
-ResourceLoader::ResourceLoader(Frame* frame)
-    : m_reachedTerminalState(false)
-    , m_cancelled(false)
-    , m_calledDidFinishLoad(false)
-    , m_frame(frame)
-    , m_defersLoading(frame->page()->defersLoading())
-{
-}
-
-ResourceLoader::~ResourceLoader()
-{
-    ASSERT(m_reachedTerminalState);
-}
-
-void ResourceLoader::setDefersLoading(bool defers)
-{
-    notImplemented();
-    m_defersLoading = defers;
-}
-
 void ResourceLoader::cancel()
 {
     notImplemented();
index 603176e116df41249e98df4cc366b642f76508a1..c55039f9877127a00e239d91e2cf4cd301f74468 100644 (file)
@@ -34,6 +34,9 @@
 #include "PlatformString.h"
 #if PLATFORM(MAC)
 #include "RetainPtr.h"
+#elif PLATFORM(QT)
+#include <QMenu>
+typedef QMenu* PlatformMenuDescription;
 #endif
 
 namespace WebCore {
@@ -71,6 +74,8 @@ namespace WebCore {
 #if PLATFORM(MAC)
         // Keep this in sync with the PlatformMenuDescription typedef
         RetainPtr<NSMutableArray> m_platformDescription;
+#elif PLATFORM(QT)
+        QMenu *m_menu;
 #else
         PlatformMenuDescription m_platformDescription;
 #endif
index a8a4d62cc6fb3672324c7bd4b0167312beda9332..921e85a352dfe5ae8646a7f50e3bf446c100e665 100644 (file)
@@ -856,4 +856,5 @@ GraphicsContext* contextForImage(SVGResourceImage*)
     return 0;
 }
 
+}
 // vim: ts=4 sw=4 et
index b3f838b43877cc4e8675acb5aafffb493e13b874..7f2e99aa7f9212828ac46e8eb2bd8692c9be8a0a 100644 (file)
@@ -155,7 +155,7 @@ void Path::addArc(const FloatPoint& p, float r, float sar, float ear, bool antic
     // this is also due to switched coordinate system
     // we would end up with a 0 span instead of 360
     if (!(qFuzzyCompare(span + (ea - sa), 0.0) &&
-          qFuzzyCompare(abs(span), 360.0))) {
+          qFuzzyCompare(qAbs(span), 360.0))) {
         span += ea - sa;
     }
 
index 10e4960409b4067302a4de21ccc34193bc1d1c15..90954aca378576577c02e99c621ea921d9ce514f 100644 (file)
@@ -73,12 +73,13 @@ bool SVGPaintServerLinearGradient::setup(GraphicsContext*& context, const Render
 
     double opacity = 1.0;
 
-    // TODO: Gradient transform + opacity fixes!
+    // TODO: opacity fixes!
 
     if ((type & ApplyToFillTargetType) && renderStyle->svgStyle()->hasFill()) {
         fillColorArray(gradient, gradientStops(), opacity);
 
         QBrush brush(gradient);
+        brush.setTransform(QTransform(gradientTransform()));
 
         painter->setBrush(brush);
         context->setFillRule(renderStyle->svgStyle()->fillRule());
@@ -89,6 +90,7 @@ bool SVGPaintServerLinearGradient::setup(GraphicsContext*& context, const Render
 
         QPen pen;
         QBrush brush(gradient);
+        brush.setTransform(QTransform(gradientTransform()));
 
         setPenProperties(object, renderStyle, pen);
         pen.setBrush(brush);
index 5cd38d613623c5f775375f2116fca977849f6f64..08f0cb1323e575a5fa50c7cae596ee0003c45ab0 100644 (file)
@@ -111,6 +111,7 @@ bool SVGPaintServerRadialGradient:: setup(GraphicsContext*& context, const Rende
         fillColorArray(gradient, gradientStops(), opacity);
 
         QBrush brush(gradient);
+        brush.setTransform(QTransform(gradientTransform()));
 
         painter->setBrush(brush);
         context->setFillRule(renderStyle->svgStyle()->fillRule());
@@ -121,6 +122,7 @@ bool SVGPaintServerRadialGradient:: setup(GraphicsContext*& context, const Rende
 
         QPen pen;
         QBrush brush(gradient);
+        brush.setTransform(QTransform(gradientTransform()));
 
         setPenProperties(object, renderStyle, pen);
         pen.setBrush(brush);
index b6b67d4324e83979dfb85319095869813c1ebdf0..86be0ebf83e930459ec9a8dc88c677d3421d849d 100644 (file)
@@ -102,7 +102,7 @@ public:
 #endif
 
 #if PLATFORM(GDK) || PLATFORM(QT)
-    ResourceHandleInternal* getInternal() { return d; }
+    ResourceHandleInternal* getInternal() { return d.get(); }
 #endif
 
 #if PLATFORM(QT)
index 466dd880b93ef2314d7b91e615c5ced0782bd379..3b399161a3cd78914adc9e78fdde008003cfc58e 100644 (file)
@@ -128,7 +128,6 @@ namespace WebCore {
 #if PLATFORM(QT)
         QString m_charset;
         QString m_mimetype;
-        PlatformResponse m_response;
 #endif
         };
 
index 257ee1d199548cce2118f8328f9b6d973fd8e228..583a98674527e26f61450031a9dcb2e3b40f783b 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "FrameQt.h"
 #include "ResourceHandleManager.h"
+#include "ResourceResponse.h"
 #include "ResourceHandleInternal.h"
 
 namespace WebCore {
@@ -106,7 +107,7 @@ void ResourceHandleManager::slotData(KIO::Job* kioJob, const QByteArray& data)
     if (!d || !d->m_client)
         return;
 
-    d->m_client->didReceiveData(job, data.data(), data.size());
+    d->m_client->didReceiveData(job, data.data(), data.size(), data.size());
 }
 
 void ResourceHandleManager::slotMimetype(KIO::Job* kioJob, const QString& type)
@@ -175,14 +176,10 @@ void ResourceHandleManager::remove(ResourceHandle* job)
         // Will take care of informing our client...
         // This must be called before didFinishLoading(),
         // otherwhise assembleResponseHeaders() is called too early...
-        RefPtr<PlatformResponseQt> response(new PlatformResponseQt());
-        response->data = headers;
-        response->url = job->url().url();
-
-        job->receivedResponse(response);
+        ResourceResponse response(job->url(), String(), 0, String(), String());
+        d->m_client->didReceiveResponse(job, response);
     }
 
-    d->m_client->receivedAllData(job, 0);
     d->m_client->didFinishLoading(job);
 
     m_jobToKioMap.remove(job);
index aaec306a60492a75ca59528ae7e981201cfdd60b..c0bea838d47f16a1850dacb28e5d0d54759e966f 100644 (file)
@@ -49,13 +49,11 @@ ResourceHandleInternal::~ResourceHandleInternal()
 ResourceHandle::~ResourceHandle()
 {
     cancel();
-    delete d;
 }
 
 bool ResourceHandle::start(DocLoader* docLoader)
 {
     ref();
-    d->m_loading = true;
 
     FrameQt* frame = 0;
     if (docLoader) {
@@ -72,16 +70,6 @@ void ResourceHandle::cancel()
     ResourceHandleManager::self()->cancel(this);
 }
 
-void ResourceHandle::receivedResponse(PlatformResponse response)
-{
-    Q_ASSERT(method() == "POST");
-
-    d->m_response = response;
-
-    if (d->m_client)
-        d->m_client->receivedResponse(const_cast<ResourceHandle*>(this), response);
-}
-
 QString ResourceHandle::extractCharsetFromHeaders(QString headers) const
 {
     int pos = headers.find("content-type:", 0, false);
index 51d2dd779e41b1661fad1a2334dc955c7ed0422c..98c4c5b1f43d9b9c4f1e983a44bc23f1c5b487a0 100644 (file)
@@ -208,4 +208,15 @@ void ChromeClientQt::setResizable(bool)
     notImplemented();
 }
 
+void ChromeClientQt::addMessageToConsole(const String& message, unsigned int lineNumber,
+                                         const String& sourceID)
+{
+}
+
+void ChromeClientQt::chromeDestroyed()
+{
 }
+
+}
+
+
index e9409d3423bcaf8e3896c9ead93d2a81d4fde50e..84a7f934c08055d3427c120d31070993713c35c6 100644 (file)
@@ -42,6 +42,7 @@ namespace WebCore {
     public:
         ChromeClientQt();
         virtual ~ChromeClientQt();
+        virtual void chromeDestroyed();
 
         virtual void ref();
         virtual void deref();
@@ -76,8 +77,10 @@ namespace WebCore {
         virtual bool menubarVisible();
 
         virtual void setResizable(bool);
-    };
 
+        virtual void addMessageToConsole(const String& message, unsigned int lineNumber,
+                                         const String& sourceID);
+    };
 }
 
 #endif
index 34284a45b34a75c9fb865f066baeaa6350dc1398..5f6c7db8dd8b39dcf393195391ec05aa45cc6b78 100644 (file)
@@ -52,17 +52,17 @@ void ContextMenuClientQt::addCustomContextMenuItems(ContextMenu*)
     notImplemented();
 }
 
-void ContextMenuClientQt::copyLinkToClipboard(HitTestResult)
+void ContextMenuClientQt::copyLinkToClipboard(const HitTestResult&)
 {
     notImplemented();
 }
 
-void ContextMenuClientQt::downloadURL(KURL)
+void ContextMenuClientQt::downloadURL(const KURL&)
 {
     notImplemented();
 }
 
-void ContextMenuClientQt::copyImageToClipboard(HitTestResult)
+void ContextMenuClientQt::copyImageToClipboard(const HitTestResult&)
 {
     notImplemented();
 }
@@ -72,5 +72,15 @@ void ContextMenuClientQt::lookUpInDictionary(Frame*)
     notImplemented();
 }
 
+void ContextMenuClientQt::contextMenuDestroyed()
+{
+
+}
+
+void ContextMenuClientQt::contextMenuItemSelected(const ContextMenuItem*)
+{
+
+}
 
 }
+
index 1b456d8b5495db32e38b5a03bef285ae6b3077ee..c19365a4e2382fb733a92e5c3971edd2cf154a99 100644 (file)
@@ -39,10 +39,13 @@ namespace WebCore {
         virtual void ref();
         virtual void deref();
 
+        virtual void contextMenuDestroyed();
+        virtual void contextMenuItemSelected(const ContextMenuItem*);
+
         virtual void addCustomContextMenuItems(ContextMenu*);
-        virtual void copyLinkToClipboard(HitTestResult);
-        virtual void downloadURL(KURL);
-        virtual void copyImageToClipboard(HitTestResult);
+        virtual void copyLinkToClipboard(const HitTestResult&);
+        virtual void downloadURL(const KURL&);
+        virtual void copyImageToClipboard(const HitTestResult&);
         virtual void lookUpInDictionary(Frame*);
     };
 }
diff --git a/WebCore/platform/qt/ContextMenuItemQt.cpp b/WebCore/platform/qt/ContextMenuItemQt.cpp
new file mode 100644 (file)
index 0000000..3d77a94
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2006 Zack Rusin <zack@kde.org>
+ *
+ * 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 "ContextMenuItem.h"
+
+#include "ContextMenu.h"
+
+namespace WebCore {
+
+ContextMenuItem::ContextMenuItem(ContextMenu* parentMenu, ContextMenu* subMenu)
+    : m_parentMenu(parentMenu)
+    , m_subMenu(subMenu)
+    , m_type(SeparatorType)
+{
+}
+
+ContextMenuItem::ContextMenuItem(ContextMenuItemType type, ContextMenuAction action,
+                                 const String& title, ContextMenu* parentMenu,
+                                 ContextMenu* subMenu)
+    : m_parentMenu(parentMenu)
+    , m_subMenu(subMenu)
+    , m_type(type)
+{
+}
+
+ContextMenuItem::~ContextMenuItem()
+{
+}
+
+PlatformMenuItemDescription ContextMenuItem::platformDescription() const
+{
+    return PlatformMenuItemDescription();;
+}
+
+ContextMenuAction ContextMenuItem::action() const
+{ 
+    return ContextMenuAction();;
+}
+
+String ContextMenuItem::title() const 
+{
+    return String();
+}
+
+void ContextMenuItem::setAction(ContextMenuAction action)
+{
+}
+
+void ContextMenuItem::setTitle(String title)
+{
+}
+
+void ContextMenuItem::setSubMenu(ContextMenu* menu)
+{
+    m_subMenu.set(menu);
+}
+
+}
index f56be3cb627e35fdf66697a0f5940c99b2c5e7ca..fcf317d45fd62b75aaed72b33f0bb93cb600e8dd 100644 (file)
 #include <QAction>
 
 namespace WebCore {
-    
-void ContextMenu::appendItem(ContextMenuItem item)
+
+ContextMenu::ContextMenu(const HitTestResult& result)
+    : m_hitTestResult(result)
+{
+}
+
+ContextMenu::~ContextMenu()
+{
+}
+
+void ContextMenu::appendItem(const ContextMenuItem& item)
 {
     if (!m_menu)
         m_menu = new QMenu();
 
-    QAction* action  = m_menu->addAction(item.title);
+    QAction* action  = m_menu->addAction(item.title());
 }
 
 void ContextMenu::show()
@@ -47,19 +56,19 @@ void ContextMenu::show()
     m_menu->exec();
 }
 
-unsigned ContextMenu::itemCount()
+unsigned ContextMenu::itemCount() const
 {
     // FIXME: This method is silly
     return 1;
 }
 
-void ContextMenu::insertItem(unsigned position, ContextMenuItem item)
+void ContextMenu::insertItem(unsigned position, const ContextMenuItem& item)
 {
     // FIXME: Another silly method
     appendItem(item);
 }
 
-void ContextMenu::setPlatformMenuDescription(PlatformMenuDescription menu)
+void ContextMenu::setPlatformDescription(PlatformMenuDescription menu)
 {
     delete m_menu;
     m_menu = static_cast<QMenu*>(menu);
index 2833453bab11571eca95302ad052fc017e08111b..61f88953539b7865fcf77b13a95262fa21ed980b 100644 (file)
@@ -246,6 +246,11 @@ const Cursor& noDropCursor()
     return Cursors::self()->PointerCursor;
 }
 
+const Cursor& copyCursor()
+{
+    return Cursors::self()->PointerCursor;
+}
+
 const Cursor& progressCursor()
 {
     return Cursors::self()->PointerCursor;
index 3e8b08d21f72754ce415bd72adb692165ae7e54e..2ad0fa9f03d733892eba401b2ed4fbfb94f18e7a 100644 (file)
@@ -166,6 +166,22 @@ void EditorClientQt::redo()
     notImplemented();
 }
 
+bool EditorClientQt::shouldInsertNode(Node*, Range*, EditorInsertAction)
+{
+    notImplemented();
+}
+
+void WebCore::EditorClientQt::pageDestroyed()
+{
+    notImplemented();
+}
+
+bool EditorClientQt::smartInsertDeleteEnabled()
+{
+    notImplemented();
+    return false;
+}
+
 }
 
 // vim: ts=4 sw=4 et
index 9b761533c64337592df42bde386ec41c7605ac0d..c5318cb05e3fba8e1c343c23038e7c2ffdf66566 100644 (file)
@@ -41,6 +41,7 @@ class EditorClientQt : public EditorClient, public Shared<EditorClientQt> {
 public:
     virtual void ref();
     virtual void deref();
+    virtual void pageDestroyed();
 
     virtual bool shouldDeleteRange(Range*);
     virtual bool shouldShowDeleteInterface(HTMLElement*);
@@ -49,12 +50,14 @@ public:
     virtual bool isGrammarCheckingEnabled();
     virtual int  spellCheckerDocumentTag();
 
+    virtual bool smartInsertDeleteEnabled();
     virtual bool shouldBeginEditing(WebCore::Range*);
     virtual bool shouldEndEditing(WebCore::Range*);
     virtual bool shouldInsertText(String, Range*, EditorInsertAction);
+    virtual bool shouldInsertNode(Node*, Range*, EditorInsertAction);
     virtual bool shouldApplyStyle(WebCore::CSSStyleDeclaration*,
                                   WebCore::Range*);
-    
+
     virtual void didBeginEditing();
     virtual void respondToChangedContents();
     virtual void didEndEditing();
index b2be819138b25e6db0f61fef7dc56d15d00046a3..40b622a0e46b34dfde438acf70b5e2da91c392b6 100644 (file)
@@ -101,7 +101,7 @@ static void doScroll(const RenderObject* r, bool isHorizontal, int multiplier)
 FrameQt::FrameQt(Page* page, Element* ownerElement,
                  FrameQtClient* frameClient,
                  EditorClient* editorClient)
-    : Frame(page, ownerElement, (editorClient ? editorClient : new EditorClientQt()))
+    : Frame(page, ownerElement, new FrameLoaderClientQt() )
     , m_bindingRoot(0)
 {
     Settings* settings = new Settings;
@@ -122,8 +122,6 @@ FrameQt::FrameQt(Page* page, Element* ownerElement,
 
     m_client = frameClient;
     m_client->setFrame(this);
-    //FIXME: rework once frameloaderclientqt is even close to working
-    loader()->setClient(new FrameLoaderClientQt());
 }
 
 FrameQt::~FrameQt()
@@ -423,7 +421,7 @@ bool FrameQt::keyEvent(const PlatformKeyboardEvent& keyEvent)
     if (!doc)
         return false;
 
-    Node* node = doc->focusNode();
+    Node* node = doc->focusedNode();
     if (!node) {
         if (doc->isHTMLDocument())
             node = doc->body();
index af9a9ac54d61b8aaacc71387f211737794cf5482..53fe53f1b04f03deb3c6f2cef9caef100bbacbde 100644 (file)
@@ -41,6 +41,7 @@ class QWidget;
 class QPaintEvent;
 
 namespace WebCore {
+class EditorClient;
 
 class FrameQt : public Frame {
 public:
index 79addf8f5250af62cf007744715266c74de31f20..78af7c6bde87a82c5f6d459efb309f4442f89c02 100644 (file)
@@ -80,7 +80,7 @@ void FrameQtClientDefault::openURL(const KURL& url)
     ASSERT(m_frame->document());
 
     ResourceRequest request(url);
-    RefPtr<ResourceHandle> loader = ResourceHandle::create(request, this, m_frame->document()->docLoader());
+    RefPtr<ResourceHandle> loader = ResourceHandle::create(request, this, m_frame->document()->docLoader(), false);
 }
 
 void FrameQtClientDefault::submitForm(const String& method, const KURL& url, PassRefPtr<FormData> postData)
@@ -93,7 +93,7 @@ void FrameQtClientDefault::submitForm(const String& method, const KURL& url, Pas
     request.setHTTPMethod(method);
     request.setHTTPBody(postData);
 
-    RefPtr<ResourceHandle> loader = ResourceHandle::create(request, this, m_frame->document() ? m_frame->document()->docLoader() : 0);
+    RefPtr<ResourceHandle> loader = ResourceHandle::create(request, this, m_frame->document() ? m_frame->document()->docLoader() : 0, false);
 }
 
 void FrameQtClientDefault::checkLoaded()
index 129225b51220f865ee4560d8994c615bb7f78a29..45cae02c5459d176ffd2384fd727033ad7d78cb4 100644 (file)
@@ -152,11 +152,6 @@ time_t CacheObjectExpiresTime(DocLoader*, PlatformResponse)
     return 0;
 }
 
-void CachedResource::setPlatformResponse(PlatformResponse response)
-{
-    m_platformResponse = response;
-}
-
 void CachedResource::setAllData(PlatformData allData)
 {
     m_allData = allData;
diff --git a/WebCore/platform/qt/PasteboardQt.cpp b/WebCore/platform/qt/PasteboardQt.cpp
new file mode 100644 (file)
index 0000000..e60e83a
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2006 Zack Rusin <zack@kde.org>
+ *
+ * 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. 
+ */
+
+#import "config.h"
+#import "Pasteboard.h"
+
+#import "DocumentFragment.h"
+#import "Editor.h"
+#import "markup.h"
+
+namespace WebCore {
+
+Pasteboard::Pasteboard()
+{
+}
+
+Pasteboard* Pasteboard::generalPasteboard()
+{
+    static Pasteboard* pasteboard = new Pasteboard();
+    return pasteboard;
+}
+
+void Pasteboard::clearTypes()
+{
+}
+
+void Pasteboard::writeSelection(PassRefPtr<Range> selectedRange, bool canSmartCopyOrDelete, Frame* frame)
+{
+}
+
+bool Pasteboard::canSmartReplace()
+{
+    return false;
+}
+
+String Pasteboard::plainText(Frame* frame)
+{
+    return String();
+}
+
+PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefPtr<Range> context,
+                                                          bool allowPlainText, bool& chosePlainText)
+{
+    return 0;
+}
+
+}
index fdc8634d48c3ae56e51bc269e2d8e89d486e5a31..dbb3c201c99bd696a6c3b2fcf44ba56569a844cc 100644 (file)
@@ -1,3 +1,14 @@
+2006-12-08  Zack Rusin  <zack@kde.org>
+
+        Reviewed by Maciej.
+
+        Fix the build after the recent changes.
+
+        * QtLauncher/main.cpp:
+        (main):
+        * WebKitPart/WebKitPart.cpp:
+        (WebKitPart::initView):
+
 2006-11-19  Simon Hausmann  <hausmann@kde.org>
 
         Reviewed by Zack.
index d497bb63d08c4d49a9a7e6be3c50b07c598f712c..0d49e1b23391a02190fd4566964d3dd57ce1ff34 100644 (file)
@@ -41,6 +41,7 @@
 #include <FrameView.h>
 #include <ChromeClientQt.h>
 #include <ContextMenuClientQt.h>
+#include <EditorClientQt.h>
 #include <KURL.h>
 
 #include <FrameQt.h>
@@ -83,7 +84,7 @@ int main(int argc, char **argv)
     QBoxLayout *l = new QVBoxLayout(&topLevel);
  
     // Initialize WebCore in Qt platform mode...
-    Page* page = new Page(new ChromeClientQt(), new ContextMenuClientQt());
+    Page* page = new Page(new ChromeClientQt(), new ContextMenuClientQt(), new EditorClientQt());
     Frame* frame = new FrameQt(page, 0, new FrameQtClientDefault());
 
     FrameView* frameView = new FrameView(frame);
index d0d47e5440bd132a18f1e58fc248d7f1cd259943..ccb0db5bb6c666cb0dbf5711f89785130260741a 100644 (file)
@@ -33,6 +33,7 @@
 #include "FrameView.h"
 #include "ChromeClientQt.h"
 #include "ContextMenuClientQt.h"
+#include "EditorClientQt.h"
 #include "KURL.h"
 
 #include <QDebug>
@@ -106,7 +107,7 @@ void WebKitPart::initView(QWidget* parentWidget, GUIProfile prof)
     m_client = new WebKitPartClient(this);
  
     // Initialize WebCore in Qt platform mode...
-    Page* page = new Page(new ChromeClientQt(), new ContextMenuClientQt());
+    Page* page = new Page(new ChromeClientQt(), new ContextMenuClientQt(), new EditorClientQt());
     Frame* frame = new FrameQt(page, 0, m_client);
 
     m_frame = frame;
index 7c796fce32ba2a761c42b5e5edd284078e998a51..99e64e8df7dc2aac8069784d94f9768d0a4960de 100644 (file)
@@ -1,3 +1,14 @@
+2006-12-08  Zack Rusin  <zack@kde.org>
+
+        Reviewed by Maciej.
+
+        Fix the compile after recent API changes.
+
+        * DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.cpp:
+        (WebCore::DumpRenderTree::DumpRenderTree):
+        * DumpRenderTree/DumpRenderTree.qtproj/main.cpp:
+        (main):
+
 2006-12-08  George Staikos  <staikos@kde.org>
 
         Reviewed by Maciej.
index f7b4954d2587a07eaec2558563b8f1cb7ccf4b91..6639ef921b063f569074f73ed10f4a13a830c20b 100644 (file)
@@ -39,6 +39,7 @@
 #include "RenderTreeAsText.h"
 #include "ChromeClientQt.h"
 #include "ContextMenuClientQt.h"
+#include "EditorClientQt.h"
 
 #include <QDir>
 #include <QFile>
@@ -62,7 +63,7 @@ DumpRenderTree::DumpRenderTree()
     , m_notifier()
 {
     // Initialize WebCore in Qt platform mode...
-    Page* page = new Page(new ChromeClientQt(), new ContextMenuClientQt());
+    Page* page = new Page(new ChromeClientQt(), new ContextMenuClientQt(), new EditorClientQt());
     m_frame = new FrameQt(page, 0, m_client);
 
     FrameView* view = new FrameView(m_frame);
index e5fd8cf9431757a02d8ebff4547e153ba70a1f80..5b45aa47879dc76e3a6c15d0b0de8bf1644362d5 100644 (file)
@@ -51,7 +51,7 @@ int main(int argc, char* argv[])
 
     WebCore::DumpRenderTree dumper;
 
-    if (args->count() == 1 && args->arg(0) == QLatin1String("-"))
+    if (args->count() == 1 && args->arg(0) == QString::fromAscii("-"))
         dumper.open();
     else if (args->count() == 1)
         dumper.open(KURL(args->arg(0)));