1/* 2 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 23 * THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#import "config.h" 27#import "WebEditorClient.h" 28 29#if PLATFORM(IOS) 30 31#import "WebPage.h" 32#import <WebCore/KeyboardEvent.h> 33#import <WebCore/NotImplemented.h> 34 35using namespace WebCore; 36 37namespace WebKit { 38 39void WebEditorClient::handleKeyboardEvent(KeyboardEvent* event) 40{ 41 if (m_page->handleEditingKeyboardEvent(event)) 42 event->setDefaultHandled(); 43} 44 45void WebEditorClient::handleInputMethodKeydown(KeyboardEvent* event) 46{ 47 notImplemented(); 48} 49 50NSString *WebEditorClient::userVisibleString(NSURL *) 51{ 52 notImplemented(); 53 return nil; 54} 55 56NSURL *WebEditorClient::canonicalizeURL(NSURL *) 57{ 58 notImplemented(); 59 return nil; 60} 61 62NSURL *WebEditorClient::canonicalizeURLString(NSString *) 63{ 64 notImplemented(); 65 return nil; 66} 67 68DocumentFragment* WebEditorClient::documentFragmentFromAttributedString(NSAttributedString *, Vector<RefPtr<ArchiveResource> >&) 69{ 70 notImplemented(); 71 return 0; 72} 73 74void WebEditorClient::setInsertionPasteboard(const String&) 75{ 76 // This is used only by Mail, no need to implement it now. 77 notImplemented(); 78} 79 80void WebEditorClient::startDelayingAndCoalescingContentChangeNotifications() 81{ 82 notImplemented(); 83} 84 85void WebEditorClient::stopDelayingAndCoalescingContentChangeNotifications() 86{ 87 notImplemented(); 88} 89 90void WebEditorClient::writeDataToPasteboard(NSDictionary*) 91{ 92 notImplemented(); 93} 94 95NSArray* WebEditorClient::supportedPasteboardTypesForCurrentSelection() 96{ 97 notImplemented(); 98 return 0; 99} 100 101NSArray* WebEditorClient::readDataFromPasteboard(NSString*, int) 102{ 103 notImplemented(); 104 return 0; 105} 106 107bool WebEditorClient::hasRichlyEditableSelection() 108{ 109 notImplemented(); 110 return false; 111} 112 113int WebEditorClient::getPasteboardItemsCount() 114{ 115 notImplemented(); 116 return 0; 117} 118 119WebCore::DocumentFragment* WebEditorClient::documentFragmentFromDelegate(int) 120{ 121 notImplemented(); 122 return 0; 123} 124 125bool WebEditorClient::performsTwoStepPaste(WebCore::DocumentFragment*) 126{ 127 notImplemented(); 128 return false; 129} 130 131int WebEditorClient::pasteboardChangeCount() 132{ 133 notImplemented(); 134 return 0; 135} 136 137void WebEditorClient::overflowScrollPositionChanged() 138{ 139 m_page->didChangeSelection(); 140} 141 142} // namespace WebKit 143 144#endif // PLATFORM(IOS) 145