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

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

Issue 2374743002: [InputEvent] Support |deleteByDrag|, |insertFromDrop| and fire in sequential order (Closed)
Patch Set: Created 4 years, 2 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 bool selectionStartHasStyle(CSSPropertyID, const String& value) const; 103 bool selectionStartHasStyle(CSSPropertyID, const String& value) const;
104 TriState selectionHasStyle(CSSPropertyID, const String& value) const; 104 TriState selectionHasStyle(CSSPropertyID, const String& value) const;
105 String selectionStartCSSPropertyValue(CSSPropertyID); 105 String selectionStartCSSPropertyValue(CSSPropertyID);
106 106
107 void removeFormattingAndStyle(); 107 void removeFormattingAndStyle();
108 108
109 void clearLastEditCommand(); 109 void clearLastEditCommand();
110 110
111 bool deleteWithDirection(DeleteDirection, TextGranularity, bool killRing, bo ol isTypingAction); 111 bool deleteWithDirection(DeleteDirection, TextGranularity, bool killRing, bo ol isTypingAction);
112 void deleteSelectionWithSmartDelete(bool smartDelete, InputEvent::InputType) ; 112 void deleteSelectionWithSmartDelete(bool smartDelete, InputEvent::InputType, const Position& referenceMovePosition = Position());
113 113
114 void applyStyle(StylePropertySet*, InputEvent::InputType); 114 void applyStyle(StylePropertySet*, InputEvent::InputType);
115 void applyParagraphStyle(StylePropertySet*, InputEvent::InputType); 115 void applyParagraphStyle(StylePropertySet*, InputEvent::InputType);
116 void applyStyleToSelection(StylePropertySet*, InputEvent::InputType); 116 void applyStyleToSelection(StylePropertySet*, InputEvent::InputType);
117 void applyParagraphStyleToSelection(StylePropertySet*, InputEvent::InputType ); 117 void applyParagraphStyleToSelection(StylePropertySet*, InputEvent::InputType );
118 118
119 void appliedEditing(CompositeEditCommand*); 119 void appliedEditing(CompositeEditCommand*);
120 void unappliedEditing(EditCommandComposition*); 120 void unappliedEditing(EditCommandComposition*);
121 void reappliedEditing(EditCommandComposition*); 121 void reappliedEditing(EditCommandComposition*);
122 122
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 EditingBehavior behavior() const; 198 EditingBehavior behavior() const;
199 199
200 EphemeralRange selectedRange(); 200 EphemeralRange selectedRange();
201 201
202 void addToKillRing(const EphemeralRange&); 202 void addToKillRing(const EphemeralRange&);
203 203
204 void pasteAsFragment(DocumentFragment*, bool smartReplace, bool matchStyle); 204 void pasteAsFragment(DocumentFragment*, bool smartReplace, bool matchStyle);
205 void pasteAsPlainText(const String&, bool smartReplace); 205 void pasteAsPlainText(const String&, bool smartReplace);
206 206
207 Element* findEventTargetFrom(const VisibleSelection&) const; 207 Element* findEventTargetFrom(const VisibleSelection&) const;
208 Element* findEventTargetFromSelection() const;
208 209
209 bool findString(const String&, FindOptions); 210 bool findString(const String&, FindOptions);
210 211
211 Range* findStringAndScrollToVisible(const String&, Range*, FindOptions); 212 Range* findStringAndScrollToVisible(const String&, Range*, FindOptions);
212 Range* findRangeOfString(const String& target, const EphemeralRange& referen ceRange, FindOptions); 213 Range* findRangeOfString(const String& target, const EphemeralRange& referen ceRange, FindOptions);
213 Range* findRangeOfString(const String& target, const EphemeralRangeInFlatTre e& referenceRange, FindOptions); 214 Range* findRangeOfString(const String& target, const EphemeralRangeInFlatTre e& referenceRange, FindOptions);
214 215
215 const VisibleSelection& mark() const; // Mark, to be used as emacs uses it. 216 const VisibleSelection& mark() const; // Mark, to be used as emacs uses it.
216 void setMark(const VisibleSelection&); 217 void setMark(const VisibleSelection&);
217 218
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 bool canSmartReplaceWithPasteboard(Pasteboard*); 283 bool canSmartReplaceWithPasteboard(Pasteboard*);
283 void pasteAsPlainTextWithPasteboard(Pasteboard*); 284 void pasteAsPlainTextWithPasteboard(Pasteboard*);
284 void pasteWithPasteboard(Pasteboard*); 285 void pasteWithPasteboard(Pasteboard*);
285 void writeSelectionToPasteboard(); 286 void writeSelectionToPasteboard();
286 bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy, PasteMo de = AllMimeTypes); 287 bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy, PasteMo de = AllMimeTypes);
287 288
288 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAli gnment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent); 289 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAli gnment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent);
289 void changeSelectionAfterCommand(const VisibleSelection& newSelection, Frame Selection::SetSelectionOptions); 290 void changeSelectionAfterCommand(const VisibleSelection& newSelection, Frame Selection::SetSelectionOptions);
290 void notifyComponentsOnChangedSelection(); 291 void notifyComponentsOnChangedSelection();
291 292
292 Element* findEventTargetFromSelection() const;
293
294 SpellChecker& spellChecker() const; 293 SpellChecker& spellChecker() const;
295 294
296 bool handleEditingKeyboardEvent(KeyboardEvent*); 295 bool handleEditingKeyboardEvent(KeyboardEvent*);
297 }; 296 };
298 297
299 inline void Editor::setStartNewKillRingSequence(bool flag) 298 inline void Editor::setStartNewKillRingSequence(bool flag)
300 { 299 {
301 m_shouldStartNewKillRingSequence = flag; 300 m_shouldStartNewKillRingSequence = flag;
302 } 301 }
303 302
304 inline const VisibleSelection& Editor::mark() const 303 inline const VisibleSelection& Editor::mark() const
305 { 304 {
306 return m_mark; 305 return m_mark;
307 } 306 }
308 307
309 inline void Editor::setMark(const VisibleSelection& selection) 308 inline void Editor::setMark(const VisibleSelection& selection)
310 { 309 {
311 m_mark = selection; 310 m_mark = selection;
312 } 311 }
313 312
314 inline bool Editor::markedTextMatchesAreHighlighted() const 313 inline bool Editor::markedTextMatchesAreHighlighted() const
315 { 314 {
316 return m_areMarkedTextMatchesHighlighted; 315 return m_areMarkedTextMatchesHighlighted;
317 } 316 }
318 317
319 318
320 } // namespace blink 319 } // namespace blink
321 320
322 #endif // Editor_h 321 #endif // Editor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698