Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: third_party/WebKit/Source/core/editing/Editor.h

Issue 2151353002: [InputEvent] Replace |EditAction| with |InputType| (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inputevent-text-styling
Patch Set: Replaced |EditAction| with |InputType| Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 16 matching lines...) Expand all
27 #define Editor_h 27 #define Editor_h
28 28
29 #include "core/CoreExport.h" 29 #include "core/CoreExport.h"
30 #include "core/clipboard/DataTransferAccessPolicy.h" 30 #include "core/clipboard/DataTransferAccessPolicy.h"
31 #include "core/editing/EditingBehavior.h" 31 #include "core/editing/EditingBehavior.h"
32 #include "core/editing/EphemeralRange.h" 32 #include "core/editing/EphemeralRange.h"
33 #include "core/editing/FindOptions.h" 33 #include "core/editing/FindOptions.h"
34 #include "core/editing/FrameSelection.h" 34 #include "core/editing/FrameSelection.h"
35 #include "core/editing/VisibleSelection.h" 35 #include "core/editing/VisibleSelection.h"
36 #include "core/editing/WritingDirection.h" 36 #include "core/editing/WritingDirection.h"
37 #include "core/editing/commands/EditAction.h"
38 #include "core/editing/iterators/TextIterator.h" 37 #include "core/editing/iterators/TextIterator.h"
39 #include "core/editing/markers/DocumentMarker.h" 38 #include "core/editing/markers/DocumentMarker.h"
39 #include "core/events/InputEvent.h"
40 #include "platform/PasteMode.h" 40 #include "platform/PasteMode.h"
41 #include "platform/heap/Handle.h" 41 #include "platform/heap/Handle.h"
42 #include <memory> 42 #include <memory>
43 43
44 namespace blink { 44 namespace blink {
45 45
46 class CompositeEditCommand; 46 class CompositeEditCommand;
47 class DummyPageHolder; 47 class DummyPageHolder;
48 class EditCommandComposition; 48 class EditCommandComposition;
49 class EditorClient; 49 class EditorClient;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 TriState selectionHasStyle(CSSPropertyID, const String& value) const; 102 TriState selectionHasStyle(CSSPropertyID, const String& value) const;
103 String selectionStartCSSPropertyValue(CSSPropertyID); 103 String selectionStartCSSPropertyValue(CSSPropertyID);
104 104
105 void removeFormattingAndStyle(); 105 void removeFormattingAndStyle();
106 106
107 void clearLastEditCommand(); 107 void clearLastEditCommand();
108 108
109 bool deleteWithDirection(SelectionDirection, TextGranularity, bool killRing, bool isTypingAction); 109 bool deleteWithDirection(SelectionDirection, TextGranularity, bool killRing, bool isTypingAction);
110 void deleteSelectionWithSmartDelete(bool smartDelete); 110 void deleteSelectionWithSmartDelete(bool smartDelete);
111 111
112 void applyStyle(StylePropertySet*, EditAction = EditActionUnspecified); 112 void applyStyle(StylePropertySet*, InputEvent::InputType);
113 void applyParagraphStyle(StylePropertySet*, EditAction = EditActionUnspecifi ed); 113 void applyParagraphStyle(StylePropertySet*, InputEvent::InputType);
114 void applyStyleToSelection(StylePropertySet*, EditAction); 114 void applyStyleToSelection(StylePropertySet*, InputEvent::InputType);
115 void applyParagraphStyleToSelection(StylePropertySet*, EditAction); 115 void applyParagraphStyleToSelection(StylePropertySet*, InputEvent::InputType );
116 116
117 void appliedEditing(CompositeEditCommand*); 117 void appliedEditing(CompositeEditCommand*);
118 void unappliedEditing(EditCommandComposition*); 118 void unappliedEditing(EditCommandComposition*);
119 void reappliedEditing(EditCommandComposition*); 119 void reappliedEditing(EditCommandComposition*);
120 120
121 void setShouldStyleWithCSS(bool flag) { m_shouldStyleWithCSS = flag; } 121 void setShouldStyleWithCSS(bool flag) { m_shouldStyleWithCSS = flag; }
122 bool shouldStyleWithCSS() const { return m_shouldStyleWithCSS; } 122 bool shouldStyleWithCSS() const { return m_shouldStyleWithCSS; }
123 123
124 class CORE_EXPORT Command { 124 class CORE_EXPORT Command {
125 STACK_ALLOCATED(); 125 STACK_ALLOCATED();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 bool findString(const String&, FindOptions); 207 bool findString(const String&, FindOptions);
208 208
209 Range* findStringAndScrollToVisible(const String&, Range*, FindOptions); 209 Range* findStringAndScrollToVisible(const String&, Range*, FindOptions);
210 Range* findRangeOfString(const String& target, const EphemeralRange& referen ceRange, FindOptions); 210 Range* findRangeOfString(const String& target, const EphemeralRange& referen ceRange, FindOptions);
211 Range* findRangeOfString(const String& target, const EphemeralRangeInFlatTre e& referenceRange, FindOptions); 211 Range* findRangeOfString(const String& target, const EphemeralRangeInFlatTre e& referenceRange, FindOptions);
212 212
213 const VisibleSelection& mark() const; // Mark, to be used as emacs uses it. 213 const VisibleSelection& mark() const; // Mark, to be used as emacs uses it.
214 void setMark(const VisibleSelection&); 214 void setMark(const VisibleSelection&);
215 215
216 void computeAndSetTypingStyle(StylePropertySet* , EditAction = EditActionUns pecified); 216 void computeAndSetTypingStyle(StylePropertySet*, InputEvent::InputType);
217 217
218 IntRect firstRectForRange(const EphemeralRange&) const; 218 IntRect firstRectForRange(const EphemeralRange&) const;
219 IntRect firstRectForRange(const Range*) const; 219 IntRect firstRectForRange(const Range*) const;
220 220
221 void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSe lection::SetSelectionOptions); 221 void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSe lection::SetSelectionOptions);
222 222
223 bool markedTextMatchesAreHighlighted() const; 223 bool markedTextMatchesAreHighlighted() const;
224 void setMarkedTextMatchesAreHighlighted(bool); 224 void setMarkedTextMatchesAreHighlighted(bool);
225 225
226 void replaceSelectionWithFragment(DocumentFragment*, bool selectReplacement, bool smartReplace, bool matchStyle); 226 void replaceSelectionWithFragment(DocumentFragment*, bool selectReplacement, bool smartReplace, bool matchStyle);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 inline bool Editor::markedTextMatchesAreHighlighted() const 314 inline bool Editor::markedTextMatchesAreHighlighted() const
315 { 315 {
316 return m_areMarkedTextMatchesHighlighted; 316 return m_areMarkedTextMatchesHighlighted;
317 } 317 }
318 318
319 319
320 } // namespace blink 320 } // namespace blink
321 321
322 #endif // Editor_h 322 #endif // Editor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698