diff options
Diffstat (limited to 'WebKit/wince/WebCoreSupport')
-rw-r--r-- | WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp | 91 | ||||
-rw-r--r-- | WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h | 57 | ||||
-rw-r--r-- | WebKit/wince/WebCoreSupport/DragClientWinCE.cpp | 72 | ||||
-rw-r--r-- | WebKit/wince/WebCoreSupport/DragClientWinCE.h | 48 | ||||
-rw-r--r-- | WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp | 315 | ||||
-rw-r--r-- | WebKit/wince/WebCoreSupport/EditorClientWinCE.h | 108 | ||||
-rw-r--r-- | WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp | 84 | ||||
-rw-r--r-- | WebKit/wince/WebCoreSupport/InspectorClientWinCE.h | 59 |
8 files changed, 834 insertions, 0 deletions
diff --git a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp new file mode 100644 index 0000000..011c2ea --- /dev/null +++ b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> + * + * 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 AND ITS CONTRIBUTORS "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 OR ITS 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 "ContextMenuClientWinCE.h" + +#include "ContextMenu.h" +#include "NotImplemented.h" + +using namespace WebCore; + +namespace WebKit { + +ContextMenuClient::ContextMenuClient(WebView *webView) + : m_webView(webView) +{ +} + +void ContextMenuClient::contextMenuDestroyed() +{ + delete this; +} + +PlatformMenuDescription ContextMenuClient::getCustomMenuFromDefaultItems(ContextMenu* menu) +{ + return menu->releasePlatformDescription(); +} + +void ContextMenuClient::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*) +{ + notImplemented(); +} + +void ContextMenuClient::downloadURL(const KURL& url) +{ + notImplemented(); +} + +void ContextMenuClient::copyImageToClipboard(const HitTestResult&) +{ + notImplemented(); +} + +void ContextMenuClient::searchWithGoogle(const Frame*) +{ + notImplemented(); +} + +void ContextMenuClient::lookUpInDictionary(Frame*) +{ + notImplemented(); +} + +void ContextMenuClient::speak(const String&) +{ + notImplemented(); +} + +void ContextMenuClient::stopSpeaking() +{ + notImplemented(); +} + +bool ContextMenuClient::isSpeaking() +{ + notImplemented(); + return false; +} + +} // namespace WebKit diff --git a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h new file mode 100644 index 0000000..3d51f3c --- /dev/null +++ b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> + * + * 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 AND ITS CONTRIBUTORS "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 OR ITS 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. + */ + +#ifndef ContextMenuClientWinCE_h +#define ContextMenuClientWinCE_h + +#include "ContextMenuClient.h" + +class WebView; + +namespace WebKit { + +class ContextMenuClient : public WebCore::ContextMenuClient { +public: + ContextMenuClient(WebView*); + + virtual void contextMenuDestroyed(); + + virtual WebCore::PlatformMenuDescription getCustomMenuFromDefaultItems(WebCore::ContextMenu*); + virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*); + + virtual void downloadURL(const WebCore::KURL&); + virtual void copyImageToClipboard(const WebCore::HitTestResult&); + virtual void searchWithGoogle(const WebCore::Frame*); + virtual void lookUpInDictionary(WebCore::Frame*); + virtual void speak(const WTF::String&); + virtual void stopSpeaking(); + virtual bool isSpeaking(); + +private: + WebView* m_webView; +}; + +} // namespace WebKit + +#endif // ContextMenuClientWinCE_h diff --git a/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp b/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp new file mode 100644 index 0000000..cd94547 --- /dev/null +++ b/WebKit/wince/WebCoreSupport/DragClientWinCE.cpp @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> + * + * 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 AND ITS CONTRIBUTORS "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 OR ITS 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 "DragClientWinCE.h" + +#include "NotImplemented.h" + +using namespace WebCore; + +namespace WebKit { + +void DragClient::willPerformDragDestinationAction(DragDestinationAction, DragData*) +{ + notImplemented(); +} + +void DragClient::willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*) +{ + notImplemented(); +} + +DragDestinationAction DragClient::actionMaskForDrag(DragData*) +{ + notImplemented(); + return DragDestinationActionAny; +} + +DragSourceAction DragClient::dragSourceActionMaskForPoint(const IntPoint&) +{ + notImplemented(); + return DragSourceActionAny; +} + +void DragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, Clipboard*, Frame*, bool) +{ + notImplemented(); +} + +DragImageRef DragClient::createDragImageForLink(KURL&, const String& label, Frame*) +{ + notImplemented(); + return 0; +} + +void DragClient::dragControllerDestroyed() +{ + delete this; +} + +} // namespace WebKit diff --git a/WebKit/wince/WebCoreSupport/DragClientWinCE.h b/WebKit/wince/WebCoreSupport/DragClientWinCE.h new file mode 100644 index 0000000..01dba3c --- /dev/null +++ b/WebKit/wince/WebCoreSupport/DragClientWinCE.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> + * + * 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 AND ITS CONTRIBUTORS "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 OR ITS 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. + */ + +#ifndef DragClientWinCE_h +#define DragClientWinCE_h + +#include "DragClient.h" + +namespace WebKit { + +class DragClient : public WebCore::DragClient { +public: + virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, WebCore::DragData*); + virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::Clipboard*); + virtual WebCore::DragDestinationAction actionMaskForDrag(WebCore::DragData*); + + virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&); + + virtual void startDrag(WebCore::DragImageRef, const WebCore::IntPoint&, const WebCore::IntPoint&, WebCore::Clipboard*, WebCore::Frame*, bool = false); + virtual WebCore::DragImageRef createDragImageForLink(WebCore::KURL&, const WTF::String&, WebCore::Frame*); + + virtual void dragControllerDestroyed(); +}; + +} // namespace WebKit + +#endif // DragClientWinCE_h diff --git a/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp b/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp new file mode 100644 index 0000000..d81fc02 --- /dev/null +++ b/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp @@ -0,0 +1,315 @@ +/* + * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> + * + * 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 AND ITS CONTRIBUTORS "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 OR ITS 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 "EditorClientWinCE.h" + +#include "EditCommand.h" +#include "NotImplemented.h" + +using namespace WebCore; + +namespace WebKit { + +EditorClient::EditorClient(WebView* webView) + : m_webView(webView) +{ +} + +EditorClient::~EditorClient() +{ +} + +void EditorClient::setInputMethodState(bool active) +{ + notImplemented(); +} + +bool EditorClient::shouldDeleteRange(Range*) +{ + notImplemented(); + return true; +} + +bool EditorClient::shouldShowDeleteInterface(HTMLElement*) +{ + return false; +} + +bool EditorClient::isContinuousSpellCheckingEnabled() +{ + notImplemented(); + return false; +} + +bool EditorClient::isGrammarCheckingEnabled() +{ + notImplemented(); + return false; +} + +int EditorClient::spellCheckerDocumentTag() +{ + notImplemented(); + return 0; +} + +bool EditorClient::shouldBeginEditing(WebCore::Range*) +{ + notImplemented(); + return true; +} + +bool EditorClient::shouldEndEditing(WebCore::Range*) +{ + notImplemented(); + return true; +} + +bool EditorClient::shouldInsertText(const String&, Range*, EditorInsertAction) +{ + notImplemented(); + return true; +} + +bool EditorClient::shouldChangeSelectedRange(Range*, Range*, EAffinity, bool) +{ + notImplemented(); + return true; +} + +bool EditorClient::shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*) +{ + notImplemented(); + return true; +} + +bool EditorClient::shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*) +{ + notImplemented(); + return true; +} + +void EditorClient::didBeginEditing() +{ + notImplemented(); +} + +void EditorClient::respondToChangedContents() +{ + notImplemented(); +} + +void EditorClient::respondToChangedSelection() +{ + notImplemented(); +} + +void EditorClient::didEndEditing() +{ + notImplemented(); +} + +void EditorClient::didWriteSelectionToPasteboard() +{ + notImplemented(); +} + +void EditorClient::didSetSelectionTypesForPasteboard() +{ + notImplemented(); +} + +bool EditorClient::isEditable() +{ + notImplemented(); + return false; +} + +void EditorClient::registerCommandForUndo(WTF::PassRefPtr<WebCore::EditCommand> command) +{ + notImplemented(); +} + +void EditorClient::registerCommandForRedo(WTF::PassRefPtr<WebCore::EditCommand> command) +{ + notImplemented(); +} + +void EditorClient::clearUndoRedoOperations() +{ + notImplemented(); +} + +bool EditorClient::canUndo() const +{ + notImplemented(); + return false; +} + +bool EditorClient::canRedo() const +{ + notImplemented(); + return false; +} + +void EditorClient::undo() +{ + notImplemented(); +} + +void EditorClient::redo() +{ + notImplemented(); +} + +bool EditorClient::shouldInsertNode(Node*, Range*, EditorInsertAction) +{ + notImplemented(); + return true; +} + +void EditorClient::pageDestroyed() +{ + delete this; +} + +bool EditorClient::smartInsertDeleteEnabled() +{ + notImplemented(); + return false; +} + +bool EditorClient::isSelectTrailingWhitespaceEnabled() +{ + notImplemented(); + return false; +} + +void EditorClient::toggleContinuousSpellChecking() +{ + notImplemented(); +} + +void EditorClient::toggleGrammarChecking() +{ + notImplemented(); +} + +void EditorClient::handleKeyboardEvent(KeyboardEvent* event) +{ + notImplemented(); +} + +void EditorClient::handleInputMethodKeydown(KeyboardEvent* event) +{ + notImplemented(); +} + +void EditorClient::textFieldDidBeginEditing(Element*) +{ +} + +void EditorClient::textFieldDidEndEditing(Element*) +{ +} + +void EditorClient::textDidChangeInTextField(Element*) +{ +} + +bool EditorClient::doTextFieldCommandFromEvent(Element*, KeyboardEvent*) +{ + return false; +} + +void EditorClient::textWillBeDeletedInTextField(Element*) +{ + notImplemented(); +} + +void EditorClient::textDidChangeInTextArea(Element*) +{ + notImplemented(); +} + +void EditorClient::ignoreWordInSpellDocument(const String& text) +{ + notImplemented(); +} + +void EditorClient::learnWord(const String& text) +{ + notImplemented(); +} + +void EditorClient::checkSpellingOfString(const UChar* text, int length, int* misspellingLocation, int* misspellingLength) +{ + notImplemented(); +} + +String EditorClient::getAutoCorrectSuggestionForMisspelledWord(const String& inputWord) +{ + // This method can be implemented using customized algorithms for the particular browser. + // Currently, it computes an empty string. + return String(); +} + +void EditorClient::checkGrammarOfString(const UChar*, int, Vector<GrammarDetail>&, int*, int*) +{ + notImplemented(); +} + +void EditorClient::updateSpellingUIWithGrammarString(const String&, const GrammarDetail&) +{ + notImplemented(); +} + +void EditorClient::updateSpellingUIWithMisspelledWord(const String&) +{ + notImplemented(); +} + +void EditorClient::showSpellingUI(bool) +{ + notImplemented(); +} + +bool EditorClient::spellingUIIsShowing() +{ + notImplemented(); + return false; +} + +void EditorClient::getGuessesForWord(const String& word, WTF::Vector<String>& guesses) +{ + notImplemented(); +} + +void EditorClient::willSetInputMethodState() +{ + notImplemented(); +} + +} // namespace WebKit diff --git a/WebKit/wince/WebCoreSupport/EditorClientWinCE.h b/WebKit/wince/WebCoreSupport/EditorClientWinCE.h new file mode 100644 index 0000000..943f591 --- /dev/null +++ b/WebKit/wince/WebCoreSupport/EditorClientWinCE.h @@ -0,0 +1,108 @@ +/* + * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> + * + * 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 AND ITS CONTRIBUTORS "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 OR ITS 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. + */ + +#ifndef EditorClientWinCE_h +#define EditorClientWinCE_h + +#include "EditorClient.h" + +class WebView; + +namespace WebKit { + +class EditorClient : public WebCore::EditorClient { +public: + EditorClient(WebView*); + ~EditorClient(); + + virtual void pageDestroyed(); + + virtual bool shouldDeleteRange(WebCore::Range*); + virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*); + virtual bool smartInsertDeleteEnabled(); + virtual bool isSelectTrailingWhitespaceEnabled(); + virtual bool isContinuousSpellCheckingEnabled(); + virtual void toggleContinuousSpellChecking(); + virtual bool isGrammarCheckingEnabled(); + virtual void toggleGrammarChecking(); + virtual int spellCheckerDocumentTag(); + + virtual bool isEditable(); + + virtual bool shouldBeginEditing(WebCore::Range*); + virtual bool shouldEndEditing(WebCore::Range*); + virtual bool shouldInsertNode(WebCore::Node*, WebCore::Range*, WebCore::EditorInsertAction); + virtual bool shouldInsertText(const WTF::String&, WebCore::Range*, WebCore::EditorInsertAction); + virtual bool shouldChangeSelectedRange(WebCore::Range*, WebCore::Range*, WebCore::EAffinity, bool); + + virtual bool shouldApplyStyle(WebCore::CSSStyleDeclaration*, WebCore::Range*); + virtual bool shouldMoveRangeAfterDelete(WebCore::Range*, WebCore::Range*); + + virtual void didBeginEditing(); + virtual void respondToChangedContents(); + virtual void respondToChangedSelection(); + virtual void didEndEditing(); + virtual void didWriteSelectionToPasteboard(); + virtual void didSetSelectionTypesForPasteboard(); + + virtual void registerCommandForUndo(WTF::PassRefPtr<WebCore::EditCommand>); + virtual void registerCommandForRedo(WTF::PassRefPtr<WebCore::EditCommand>); + virtual void clearUndoRedoOperations(); + + virtual bool canUndo() const; + virtual bool canRedo() const; + + virtual void undo(); + virtual void redo(); + + virtual void handleKeyboardEvent(WebCore::KeyboardEvent*); + virtual void handleInputMethodKeydown(WebCore::KeyboardEvent*); + + virtual void textFieldDidBeginEditing(WebCore::Element*); + virtual void textFieldDidEndEditing(WebCore::Element*); + virtual void textDidChangeInTextField(WebCore::Element*); + virtual bool doTextFieldCommandFromEvent(WebCore::Element*, WebCore::KeyboardEvent*); + virtual void textWillBeDeletedInTextField(WebCore::Element*); + virtual void textDidChangeInTextArea(WebCore::Element*); + + virtual void ignoreWordInSpellDocument(const WTF::String&); + virtual void learnWord(const WTF::String&); + virtual void checkSpellingOfString(const UChar*, int, int*, int*); + virtual WTF::String getAutoCorrectSuggestionForMisspelledWord(const WTF::String&); + virtual void checkGrammarOfString(const UChar*, int, WTF::Vector<WebCore::GrammarDetail>&, int*, int*); + virtual void updateSpellingUIWithGrammarString(const WTF::String&, const WebCore::GrammarDetail&); + virtual void updateSpellingUIWithMisspelledWord(const WTF::String&); + virtual void showSpellingUI(bool); + virtual bool spellingUIIsShowing(); + virtual void getGuessesForWord(const WTF::String&, WTF::Vector<WTF::String>&); + virtual void willSetInputMethodState(); + virtual void setInputMethodState(bool); + +private: + WebView* m_webView; +}; + +} // namespace WebKit + +#endif // EditorClientWinCE_h diff --git a/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp new file mode 100644 index 0000000..debc611 --- /dev/null +++ b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> + * + * 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 AND ITS CONTRIBUTORS "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 OR ITS 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 "InspectorClientWinCE.h" + +#include "NotImplemented.h" + +using namespace WebCore; + +namespace WebKit { + +InspectorClient::InspectorClient(WebView* webView) + : m_inspectedWebView(webView) +{ +} + +InspectorClient::~InspectorClient() +{ +} + +void InspectorClient::inspectorDestroyed() +{ + delete this; +} + +void InspectorClient::openInspectorFrontend(InspectorController* controller) +{ + notImplemented(); +} + +void InspectorClient::releaseFrontendPage() +{ + notImplemented(); +} + +void InspectorClient::highlight(Node* node) +{ + notImplemented(); +} + +void InspectorClient::hideHighlight() +{ + notImplemented(); +} + +void InspectorClient::populateSetting(const String& key, String* value) +{ + notImplemented(); +} + +void InspectorClient::storeSetting(const String& key, const String& value) +{ + notImplemented(); +} + +bool InspectorClient::sendMessageToFrontend(const String& message) +{ + notImplemented(); + return false; +} + +} // namespace WebKit diff --git a/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h new file mode 100644 index 0000000..45fcc5b --- /dev/null +++ b/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> + * + * 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 AND ITS CONTRIBUTORS "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 OR ITS 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. + */ + +#ifndef InspectorClientWinCE_h +#define InspectorClientWinCE_h + +#include "InspectorClient.h" + +class WebView; + +namespace WebKit { + +class InspectorClient : public WebCore::InspectorClient { +public: + InspectorClient(WebView* webView); + ~InspectorClient(); + + virtual void inspectorDestroyed(); + + virtual void openInspectorFrontend(WebCore::InspectorController*); + + virtual void highlight(WebCore::Node*); + virtual void hideHighlight(); + + virtual void populateSetting(const WTF::String& key, WTF::String* value); + virtual void storeSetting(const WTF::String& key, const WTF::String& value); + + virtual bool sendMessageToFrontend(const WTF::String&); + + void releaseFrontendPage(); + +private: + WebView* m_inspectedWebView; +}; + +} // namespace WebKit + +#endif // InspectorClientWinCE_h |