diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/page/EditorClient.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/page/EditorClient.h')
-rw-r--r-- | Source/WebCore/page/EditorClient.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/Source/WebCore/page/EditorClient.h b/Source/WebCore/page/EditorClient.h index 8623994e4..f4132109f 100644 --- a/Source/WebCore/page/EditorClient.h +++ b/Source/WebCore/page/EditorClient.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006-2016 Apple Inc. All rights reserved. * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) * * Redistribution and use in source and binary forms, with or without @@ -11,10 +11,10 @@ * 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 + * THIS SOFTWARE IS PROVIDED BY APPLE 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 + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE 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 @@ -24,19 +24,16 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EditorClient_h -#define EditorClient_h +#pragma once #include "EditorInsertAction.h" -#include "FloatRect.h" #include "TextAffinity.h" #include "TextChecking.h" #include "UndoStep.h" #include <wtf/Forward.h> #include <wtf/Vector.h> -#if PLATFORM(MAC) -OBJC_CLASS NSAttributedString; +#if PLATFORM(COCOA) OBJC_CLASS NSString; OBJC_CLASS NSURL; #endif @@ -55,6 +52,7 @@ class Element; class Frame; class HTMLElement; class KeyboardEvent; +class LayoutRect; class Node; class Range; class SharedBuffer; @@ -63,12 +61,12 @@ class TextCheckerClient; class VisibleSelection; class VisiblePosition; +struct GapRects; struct GrammarDetail; class EditorClient { public: virtual ~EditorClient() { } - virtual void pageDestroyed() = 0; virtual bool shouldDeleteRange(Range*) = 0; virtual bool smartInsertDeleteEnabled() = 0; @@ -86,18 +84,28 @@ public: virtual bool shouldChangeSelectedRange(Range* fromRange, Range* toRange, EAffinity, bool stillSelecting) = 0; virtual bool shouldApplyStyle(StyleProperties*, Range*) = 0; + virtual void didApplyStyle() = 0; virtual bool shouldMoveRangeAfterDelete(Range*, Range*) = 0; virtual void didBeginEditing() = 0; virtual void respondToChangedContents() = 0; virtual void respondToChangedSelection(Frame*) = 0; + virtual void didChangeSelectionAndUpdateLayout() = 0; + virtual void updateEditorStateAfterLayoutIfEditabilityChanged() = 0; virtual void didEndEditing() = 0; virtual void willWriteSelectionToPasteboard(Range*) = 0; virtual void didWriteSelectionToPasteboard() = 0; virtual void getClientPasteboardDataForRange(Range*, Vector<String>& pasteboardTypes, Vector<RefPtr<SharedBuffer>>& pasteboardData) = 0; - - virtual void registerUndoStep(PassRefPtr<UndoStep>) = 0; - virtual void registerRedoStep(PassRefPtr<UndoStep>) = 0; + virtual void requestCandidatesForSelection(const VisibleSelection&) { } + virtual void handleAcceptedCandidateWithSoftSpaces(TextCheckingResult) { } + + // Notify an input method that a composition was voluntarily discarded by WebCore, so that it could clean up too. + // This function is not called when a composition is closed per a request from an input method. + virtual void discardedComposition(Frame*) = 0; + virtual void canceledComposition() = 0; + + virtual void registerUndoStep(UndoStep&) = 0; + virtual void registerRedoStep(UndoStep&) = 0; virtual void clearUndoRedoOperations() = 0; virtual bool canCopyCut(Frame*, bool defaultValue) const = 0; @@ -117,10 +125,9 @@ public: virtual bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*) = 0; virtual void textWillBeDeletedInTextField(Element*) = 0; virtual void textDidChangeInTextArea(Element*) = 0; + virtual void overflowScrollPositionChanged() = 0; #if PLATFORM(IOS) - virtual void suppressSelectionNotifications() = 0; - virtual void restoreSelectionNotifications() = 0; virtual void startDelayingAndCoalescingContentChangeNotifications() = 0; virtual void stopDelayingAndCoalescingContentChangeNotifications() = 0; virtual void writeDataToPasteboard(NSDictionary*) = 0; @@ -128,17 +135,16 @@ public: virtual NSArray* readDataFromPasteboard(NSString* type, int index) = 0; virtual bool hasRichlyEditableSelection() = 0; virtual int getPasteboardItemsCount() = 0; - virtual DocumentFragment* documentFragmentFromDelegate(int index) = 0; + virtual RefPtr<DocumentFragment> documentFragmentFromDelegate(int index) = 0; virtual bool performsTwoStepPaste(DocumentFragment*) = 0; virtual int pasteboardChangeCount() = 0; #endif -#if PLATFORM(MAC) - virtual NSString* userVisibleString(NSURL*) = 0; - virtual DocumentFragment* documentFragmentFromAttributedString(NSAttributedString*, Vector< RefPtr<ArchiveResource>>&) = 0; +#if PLATFORM(COCOA) + virtual NSString *userVisibleString(NSURL *) = 0; virtual void setInsertionPasteboard(const String& pasteboardName) = 0; - virtual NSURL* canonicalizeURL(NSURL*) = 0; - virtual NSURL* canonicalizeURLString(NSString*) = 0; + virtual NSURL *canonicalizeURL(NSURL *) = 0; + virtual NSURL *canonicalizeURLString(NSString *) = 0; #endif #if USE(APPKIT) @@ -163,10 +169,6 @@ public: virtual void toggleAutomaticSpellingCorrection() = 0; #endif -#if ENABLE(DELETION_UI) - virtual bool shouldShowDeleteInterface(HTMLElement*) = 0; -#endif - #if PLATFORM(GTK) virtual bool shouldShowUnicodeMenu() = 0; #endif @@ -186,5 +188,3 @@ public: }; } - -#endif // EditorClient_h |