Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 RefPtr<LocalFrame> m_frame; | 153 RefPtr<LocalFrame> m_frame; |
| 154 }; | 154 }; |
| 155 Command command(const String& commandName); // Command source is CommandFrom MenuOrKeyBinding. | 155 Command command(const String& commandName); // Command source is CommandFrom MenuOrKeyBinding. |
| 156 Command command(const String& commandName, EditorCommandSource); | 156 Command command(const String& commandName, EditorCommandSource); |
| 157 | 157 |
| 158 // |Editor::executeCommand| is implementation of |WebFrame::executeCommand| | 158 // |Editor::executeCommand| is implementation of |WebFrame::executeCommand| |
| 159 // rather than |Document::execCommand|. | 159 // rather than |Document::execCommand|. |
| 160 bool executeCommand(const String&); | 160 bool executeCommand(const String&); |
| 161 bool executeCommand(const String& commandName, const String& value); | 161 bool executeCommand(const String& commandName, const String& value); |
| 162 | 162 |
| 163 bool insertText(const String&, Event* triggeringEvent); | 163 bool insertText(const String&, KeyboardEvent* triggeringEvent); |
|
eseidel
2014/07/26 21:17:51
I guess paste doesn't use this code?
| |
| 164 bool insertTextWithoutSendingTextEvent(const String&, bool selectInsertedTex t, TextEvent* triggeringEvent); | 164 bool insertTextWithoutSendingTextEvent(const String&, bool selectInsertedTex t, TextEvent* triggeringEvent); |
| 165 bool insertLineBreak(); | 165 bool insertLineBreak(); |
| 166 bool insertParagraphSeparator(); | 166 bool insertParagraphSeparator(); |
| 167 | 167 |
| 168 bool isOverwriteModeEnabled() const { return m_overwriteModeEnabled; } | 168 bool isOverwriteModeEnabled() const { return m_overwriteModeEnabled; } |
| 169 void toggleOverwriteModeEnabled(); | 169 void toggleOverwriteModeEnabled(); |
| 170 | 170 |
| 171 bool canUndo(); | 171 bool canUndo(); |
| 172 void undo(); | 172 void undo(); |
| 173 bool canRedo(); | 173 bool canRedo(); |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 192 | 192 |
| 193 EditingBehavior behavior() const; | 193 EditingBehavior behavior() const; |
| 194 | 194 |
| 195 PassRefPtrWillBeRawPtr<Range> selectedRange(); | 195 PassRefPtrWillBeRawPtr<Range> selectedRange(); |
| 196 | 196 |
| 197 void addToKillRing(Range*, bool prepend); | 197 void addToKillRing(Range*, bool prepend); |
| 198 | 198 |
| 199 void pasteAsFragment(PassRefPtrWillBeRawPtr<DocumentFragment>, bool smartRep lace, bool matchStyle); | 199 void pasteAsFragment(PassRefPtrWillBeRawPtr<DocumentFragment>, bool smartRep lace, bool matchStyle); |
| 200 void pasteAsPlainText(const String&, bool smartReplace); | 200 void pasteAsPlainText(const String&, bool smartReplace); |
| 201 | 201 |
| 202 Node* findEventTargetFrom(const VisibleSelection&) const; | 202 Element* findEventTargetFrom(const VisibleSelection&) const; |
| 203 | 203 |
| 204 bool findString(const String&, FindOptions); | 204 bool findString(const String&, FindOptions); |
| 205 // FIXME: Switch callers over to the FindOptions version and retire this one . | 205 // FIXME: Switch callers over to the FindOptions version and retire this one . |
| 206 bool findString(const String&, bool forward, bool caseFlag, bool wrapFlag, b ool startInSelection); | 206 bool findString(const String&, bool forward, bool caseFlag, bool wrapFlag, b ool startInSelection); |
| 207 | 207 |
| 208 PassRefPtrWillBeRawPtr<Range> findStringAndScrollToVisible(const String&, Ra nge*, FindOptions); | 208 PassRefPtrWillBeRawPtr<Range> findStringAndScrollToVisible(const String&, Ra nge*, FindOptions); |
| 209 | 209 |
| 210 const VisibleSelection& mark() const; // Mark, to be used as emacs uses it. | 210 const VisibleSelection& mark() const; // Mark, to be used as emacs uses it. |
| 211 void setMark(const VisibleSelection&); | 211 void setMark(const VisibleSelection&); |
| 212 | 212 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 bool canSmartReplaceWithPasteboard(Pasteboard*); | 262 bool canSmartReplaceWithPasteboard(Pasteboard*); |
| 263 void pasteAsPlainTextWithPasteboard(Pasteboard*); | 263 void pasteAsPlainTextWithPasteboard(Pasteboard*); |
| 264 void pasteWithPasteboard(Pasteboard*); | 264 void pasteWithPasteboard(Pasteboard*); |
| 265 void writeSelectionToPasteboard(Pasteboard*, Range*, const String& plainText ); | 265 void writeSelectionToPasteboard(Pasteboard*, Range*, const String& plainText ); |
| 266 bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy, PasteMo de = AllMimeTypes); | 266 bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy, PasteMo de = AllMimeTypes); |
| 267 | 267 |
| 268 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAli gnment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent); | 268 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAli gnment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent); |
| 269 void changeSelectionAfterCommand(const VisibleSelection& newSelection, Frame Selection::SetSelectionOptions); | 269 void changeSelectionAfterCommand(const VisibleSelection& newSelection, Frame Selection::SetSelectionOptions); |
| 270 void notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection , FrameSelection::SetSelectionOptions); | 270 void notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection , FrameSelection::SetSelectionOptions); |
| 271 | 271 |
| 272 Node* findEventTargetFromSelection() const; | 272 Element* findEventTargetFromSelection() const; |
| 273 | 273 |
| 274 PassRefPtrWillBeRawPtr<Range> rangeOfString(const String&, Range*, FindOptio ns); | 274 PassRefPtrWillBeRawPtr<Range> rangeOfString(const String&, Range*, FindOptio ns); |
| 275 | 275 |
| 276 SpellChecker& spellChecker() const; | 276 SpellChecker& spellChecker() const; |
| 277 | 277 |
| 278 bool handleEditingKeyboardEvent(blink::KeyboardEvent*); | 278 bool handleEditingKeyboardEvent(blink::KeyboardEvent*); |
| 279 }; | 279 }; |
| 280 | 280 |
| 281 inline void Editor::setStartNewKillRingSequence(bool flag) | 281 inline void Editor::setStartNewKillRingSequence(bool flag) |
| 282 { | 282 { |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 295 | 295 |
| 296 inline bool Editor::markedTextMatchesAreHighlighted() const | 296 inline bool Editor::markedTextMatchesAreHighlighted() const |
| 297 { | 297 { |
| 298 return m_areMarkedTextMatchesHighlighted; | 298 return m_areMarkedTextMatchesHighlighted; |
| 299 } | 299 } |
| 300 | 300 |
| 301 | 301 |
| 302 } // namespace blink | 302 } // namespace blink |
| 303 | 303 |
| 304 #endif // Editor_h | 304 #endif // Editor_h |
| OLD | NEW |