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

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

Issue 2288913002: [InputEvent] Support |deleteByDrag| and |insertFromDrop| (Closed)
Patch Set: yosin's review 3, check |ownerDocument()| Created 4 years, 3 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 187 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 bool canSmartReplaceWithPasteboard(Pasteboard*); 284 bool canSmartReplaceWithPasteboard(Pasteboard*);
284 void pasteAsPlainTextWithPasteboard(Pasteboard*); 285 void pasteAsPlainTextWithPasteboard(Pasteboard*);
285 void pasteWithPasteboard(Pasteboard*); 286 void pasteWithPasteboard(Pasteboard*);
286 void writeSelectionToPasteboard(); 287 void writeSelectionToPasteboard();
287 bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy, PasteMo de = AllMimeTypes); 288 bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy, PasteMo de = AllMimeTypes);
288 289
289 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAli gnment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent); 290 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAli gnment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent);
290 void changeSelectionAfterCommand(const VisibleSelection& newSelection, Frame Selection::SetSelectionOptions); 291 void changeSelectionAfterCommand(const VisibleSelection& newSelection, Frame Selection::SetSelectionOptions);
291 void notifyComponentsOnChangedSelection(); 292 void notifyComponentsOnChangedSelection();
292 293
293 Element* findEventTargetFromSelection() const;
294
295 SpellChecker& spellChecker() const; 294 SpellChecker& spellChecker() const;
296 295
297 bool handleEditingKeyboardEvent(KeyboardEvent*); 296 bool handleEditingKeyboardEvent(KeyboardEvent*);
298 }; 297 };
299 298
300 inline void Editor::setStartNewKillRingSequence(bool flag) 299 inline void Editor::setStartNewKillRingSequence(bool flag)
301 { 300 {
302 m_shouldStartNewKillRingSequence = flag; 301 m_shouldStartNewKillRingSequence = flag;
303 } 302 }
304 303
305 inline const VisibleSelection& Editor::mark() const 304 inline const VisibleSelection& Editor::mark() const
306 { 305 {
307 return m_mark; 306 return m_mark;
308 } 307 }
309 308
310 inline void Editor::setMark(const VisibleSelection& selection) 309 inline void Editor::setMark(const VisibleSelection& selection)
311 { 310 {
312 m_mark = selection; 311 m_mark = selection;
313 } 312 }
314 313
315 inline bool Editor::markedTextMatchesAreHighlighted() const 314 inline bool Editor::markedTextMatchesAreHighlighted() const
316 { 315 {
317 return m_areMarkedTextMatchesHighlighted; 316 return m_areMarkedTextMatchesHighlighted;
318 } 317 }
319 318
320 319
321 } // namespace blink 320 } // namespace blink
322 321
323 #endif // Editor_h 322 #endif // Editor_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingUtilities.cpp ('k') | third_party/WebKit/Source/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698