${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
rendering/RenderForeignObject.cpp
rendering/RenderPath.cpp
+ rendering/RenderSVGBlock.cpp
rendering/RenderSVGContainer.cpp
rendering/RenderSVGImage.cpp
rendering/RenderSVGInline.cpp
editing/MergeIdenticalElementsCommand.cpp
editing/ModifySelectionListLevel.cpp
editing/MoveSelectionCommand.cpp
- editing/RebalanceWhitespaceCommand.cpp
editing/RemoveCSSPropertyCommand.cpp
editing/RemoveNodeAttributeCommand.cpp
editing/RemoveNodeCommand.cpp
editing/VisiblePosition.cpp
editing/visible_units.cpp
editing/WrapContentsInDummySpanCommand.cpp
+ editing/qt/EditorQt.cpp
html/CanvasGradient.cpp
html/CanvasPattern.cpp
html/HTMLTokenizer.cpp
html/HTMLUListElement.cpp
html/HTMLViewSourceDocument.cpp
-
+
# icon/IconDatabase.cpp
# icon/SiteIcon.cpp
# icon/SQLDatabase.cpp
page/Chrome.cpp
page/ContextMenuController.cpp
page/DOMWindow.cpp
- page/EventHandler.cpp
+ page/EventHandler.cpp
page/Frame.cpp
page/FrameTree.cpp
page/FrameView.cpp
page/Page.cpp
page/PageState.cpp
- page/qt/EventHandlerQt.cpp
+ page/qt/EventHandlerQt.cpp
platform/Arena.cpp
platform/ArrayImpl.cpp
platform/KURL.cpp
platform/Logging.cpp
platform/MimeTypeRegistry.cpp
+# plafform/Pasteboard.cpp
platform/RegularExpression.cpp
platform/SegmentedString.cpp
platform/String.cpp
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
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
+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>
--- /dev/null
+/*
+ * 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
#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();
notImplemented();
}
+void FrameLoaderClientQt::frameLoaderDestroyed()
+{
+
}
+bool FrameLoaderClientQt::canHandleRequest(const WebCore::ResourceRequest&) const
+{
+
+}
+
+}
+
+
virtual void loadedFromPageCache();
+ virtual void frameLoaderDestroyed();
+ virtual bool canHandleRequest(const WebCore::ResourceRequest&) const;
+
virtual void dispatchDidHandleOnloadEvents();
virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
virtual void dispatchDidCancelClientRedirect();
}
-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;
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)
{
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();
#include "PlatformString.h"
#if PLATFORM(MAC)
#include "RetainPtr.h"
+#elif PLATFORM(QT)
+#include <QMenu>
+typedef QMenu* PlatformMenuDescription;
#endif
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
return 0;
}
+}
// vim: ts=4 sw=4 et
// 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;
}
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());
QPen pen;
QBrush brush(gradient);
+ brush.setTransform(QTransform(gradientTransform()));
setPenProperties(object, renderStyle, pen);
pen.setBrush(brush);
fillColorArray(gradient, gradientStops(), opacity);
QBrush brush(gradient);
+ brush.setTransform(QTransform(gradientTransform()));
painter->setBrush(brush);
context->setFillRule(renderStyle->svgStyle()->fillRule());
QPen pen;
QBrush brush(gradient);
+ brush.setTransform(QTransform(gradientTransform()));
setPenProperties(object, renderStyle, pen);
pen.setBrush(brush);
#endif
#if PLATFORM(GDK) || PLATFORM(QT)
- ResourceHandleInternal* getInternal() { return d; }
+ ResourceHandleInternal* getInternal() { return d.get(); }
#endif
#if PLATFORM(QT)
#if PLATFORM(QT)
QString m_charset;
QString m_mimetype;
- PlatformResponse m_response;
#endif
};
#include "FrameQt.h"
#include "ResourceHandleManager.h"
+#include "ResourceResponse.h"
#include "ResourceHandleInternal.h"
namespace WebCore {
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)
// 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);
ResourceHandle::~ResourceHandle()
{
cancel();
- delete d;
}
bool ResourceHandle::start(DocLoader* docLoader)
{
ref();
- d->m_loading = true;
FrameQt* frame = 0;
if (docLoader) {
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);
notImplemented();
}
+void ChromeClientQt::addMessageToConsole(const String& message, unsigned int lineNumber,
+ const String& sourceID)
+{
+}
+
+void ChromeClientQt::chromeDestroyed()
+{
}
+
+}
+
+
public:
ChromeClientQt();
virtual ~ChromeClientQt();
+ virtual void chromeDestroyed();
virtual void ref();
virtual void deref();
virtual bool menubarVisible();
virtual void setResizable(bool);
- };
+ virtual void addMessageToConsole(const String& message, unsigned int lineNumber,
+ const String& sourceID);
+ };
}
#endif
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();
}
notImplemented();
}
+void ContextMenuClientQt::contextMenuDestroyed()
+{
+
+}
+
+void ContextMenuClientQt::contextMenuItemSelected(const ContextMenuItem*)
+{
+
+}
}
+
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*);
};
}
--- /dev/null
+/*
+ * 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);
+}
+
+}
#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()
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);
return Cursors::self()->PointerCursor;
}
+const Cursor& copyCursor()
+{
+ return Cursors::self()->PointerCursor;
+}
+
const Cursor& progressCursor()
{
return Cursors::self()->PointerCursor;
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
public:
virtual void ref();
virtual void deref();
+ virtual void pageDestroyed();
virtual bool shouldDeleteRange(Range*);
virtual bool shouldShowDeleteInterface(HTMLElement*);
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();
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;
m_client = frameClient;
m_client->setFrame(this);
- //FIXME: rework once frameloaderclientqt is even close to working
- loader()->setClient(new FrameLoaderClientQt());
}
FrameQt::~FrameQt()
if (!doc)
return false;
- Node* node = doc->focusNode();
+ Node* node = doc->focusedNode();
if (!node) {
if (doc->isHTMLDocument())
node = doc->body();
class QPaintEvent;
namespace WebCore {
+class EditorClient;
class FrameQt : public Frame {
public:
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)
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()
return 0;
}
-void CachedResource::setPlatformResponse(PlatformResponse response)
-{
- m_platformResponse = response;
-}
-
void CachedResource::setAllData(PlatformData allData)
{
m_allData = allData;
--- /dev/null
+/*
+ * 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;
+}
+
+}
+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.
#include <FrameView.h>
#include <ChromeClientQt.h>
#include <ContextMenuClientQt.h>
+#include <EditorClientQt.h>
#include <KURL.h>
#include <FrameQt.h>
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);
#include "FrameView.h"
#include "ChromeClientQt.h"
#include "ContextMenuClientQt.h"
+#include "EditorClientQt.h"
#include "KURL.h"
#include <QDebug>
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;
+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.
#include "RenderTreeAsText.h"
#include "ChromeClientQt.h"
#include "ContextMenuClientQt.h"
+#include "EditorClientQt.h"
#include <QDir>
#include <QFile>
, 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);
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)));