| 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 19 matching lines...) Expand all Loading... |
| 30 #include "core/dom/DocumentMarker.h" | 30 #include "core/dom/DocumentMarker.h" |
| 31 #include "core/editing/EditAction.h" | 31 #include "core/editing/EditAction.h" |
| 32 #include "core/editing/EditingBehavior.h" | 32 #include "core/editing/EditingBehavior.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/TextIterator.h" | 35 #include "core/editing/TextIterator.h" |
| 36 #include "core/editing/VisibleSelection.h" | 36 #include "core/editing/VisibleSelection.h" |
| 37 #include "core/editing/WritingDirection.h" | 37 #include "core/editing/WritingDirection.h" |
| 38 #include "core/frame/FrameDestructionObserver.h" | 38 #include "core/frame/FrameDestructionObserver.h" |
| 39 #include "platform/PasteMode.h" | 39 #include "platform/PasteMode.h" |
| 40 #include "platform/heap/Handle.h" |
| 40 | 41 |
| 41 namespace WebCore { | 42 namespace WebCore { |
| 42 | 43 |
| 43 class Clipboard; | 44 class Clipboard; |
| 44 class CompositeEditCommand; | 45 class CompositeEditCommand; |
| 45 class EditCommand; | 46 class EditCommand; |
| 46 class EditCommandComposition; | 47 class EditCommandComposition; |
| 47 class EditorClient; | 48 class EditorClient; |
| 48 class EditorInternalCommand; | 49 class EditorInternalCommand; |
| 49 class LocalFrame; | 50 class LocalFrame; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 void setStartNewKillRingSequence(bool); | 182 void setStartNewKillRingSequence(bool); |
| 182 | 183 |
| 183 void clear(); | 184 void clear(); |
| 184 | 185 |
| 185 VisibleSelection selectionForCommand(Event*); | 186 VisibleSelection selectionForCommand(Event*); |
| 186 | 187 |
| 187 KillRing& killRing() const { return *m_killRing; } | 188 KillRing& killRing() const { return *m_killRing; } |
| 188 | 189 |
| 189 EditingBehavior behavior() const; | 190 EditingBehavior behavior() const; |
| 190 | 191 |
| 191 PassRefPtr<Range> selectedRange(); | 192 PassRefPtrWillBeRawPtr<Range> selectedRange(); |
| 192 | 193 |
| 193 void addToKillRing(Range*, bool prepend); | 194 void addToKillRing(Range*, bool prepend); |
| 194 | 195 |
| 195 void pasteAsFragment(PassRefPtr<DocumentFragment>, bool smartReplace, bool m
atchStyle); | 196 void pasteAsFragment(PassRefPtr<DocumentFragment>, bool smartReplace, bool m
atchStyle); |
| 196 void pasteAsPlainText(const String&, bool smartReplace); | 197 void pasteAsPlainText(const String&, bool smartReplace); |
| 197 | 198 |
| 198 Node* findEventTargetFrom(const VisibleSelection&) const; | 199 Node* findEventTargetFrom(const VisibleSelection&) const; |
| 199 | 200 |
| 200 bool findString(const String&, FindOptions); | 201 bool findString(const String&, FindOptions); |
| 201 // FIXME: Switch callers over to the FindOptions version and retire this one
. | 202 // FIXME: Switch callers over to the FindOptions version and retire this one
. |
| 202 bool findString(const String&, bool forward, bool caseFlag, bool wrapFlag, b
ool startInSelection); | 203 bool findString(const String&, bool forward, bool caseFlag, bool wrapFlag, b
ool startInSelection); |
| 203 | 204 |
| 204 PassRefPtr<Range> findStringAndScrollToVisible(const String&, Range*, FindOp
tions); | 205 PassRefPtrWillBeRawPtr<Range> findStringAndScrollToVisible(const String&, Ra
nge*, FindOptions); |
| 205 | 206 |
| 206 const VisibleSelection& mark() const; // Mark, to be used as emacs uses it. | 207 const VisibleSelection& mark() const; // Mark, to be used as emacs uses it. |
| 207 void setMark(const VisibleSelection&); | 208 void setMark(const VisibleSelection&); |
| 208 | 209 |
| 209 void computeAndSetTypingStyle(StylePropertySet* , EditAction = EditActionUns
pecified); | 210 void computeAndSetTypingStyle(StylePropertySet* , EditAction = EditActionUns
pecified); |
| 210 | 211 |
| 211 IntRect firstRectForRange(Range*) const; | 212 IntRect firstRectForRange(Range*) const; |
| 212 | 213 |
| 213 void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSe
lection::SetSelectionOptions); | 214 void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSe
lection::SetSelectionOptions); |
| 214 | 215 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 void pasteWithPasteboard(Pasteboard*); | 259 void pasteWithPasteboard(Pasteboard*); |
| 259 void writeSelectionToPasteboard(Pasteboard*, Range*, const String& plainText
); | 260 void writeSelectionToPasteboard(Pasteboard*, Range*, const String& plainText
); |
| 260 bool dispatchCPPEvent(const AtomicString&, ClipboardAccessPolicy, PasteMode
= AllMimeTypes); | 261 bool dispatchCPPEvent(const AtomicString&, ClipboardAccessPolicy, PasteMode
= AllMimeTypes); |
| 261 | 262 |
| 262 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAli
gnment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent); | 263 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAli
gnment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent); |
| 263 void changeSelectionAfterCommand(const VisibleSelection& newSelection, Frame
Selection::SetSelectionOptions); | 264 void changeSelectionAfterCommand(const VisibleSelection& newSelection, Frame
Selection::SetSelectionOptions); |
| 264 void notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection
, FrameSelection::SetSelectionOptions); | 265 void notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection
, FrameSelection::SetSelectionOptions); |
| 265 | 266 |
| 266 Node* findEventTargetFromSelection() const; | 267 Node* findEventTargetFromSelection() const; |
| 267 | 268 |
| 268 PassRefPtr<Range> rangeOfString(const String&, Range*, FindOptions); | 269 PassRefPtrWillBeRawPtr<Range> rangeOfString(const String&, Range*, FindOptio
ns); |
| 269 | 270 |
| 270 SpellChecker& spellChecker() const; | 271 SpellChecker& spellChecker() const; |
| 271 | 272 |
| 272 bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*); | 273 bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*); |
| 273 }; | 274 }; |
| 274 | 275 |
| 275 inline void Editor::setStartNewKillRingSequence(bool flag) | 276 inline void Editor::setStartNewKillRingSequence(bool flag) |
| 276 { | 277 { |
| 277 m_shouldStartNewKillRingSequence = flag; | 278 m_shouldStartNewKillRingSequence = flag; |
| 278 } | 279 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 289 | 290 |
| 290 inline bool Editor::markedTextMatchesAreHighlighted() const | 291 inline bool Editor::markedTextMatchesAreHighlighted() const |
| 291 { | 292 { |
| 292 return m_areMarkedTextMatchesHighlighted; | 293 return m_areMarkedTextMatchesHighlighted; |
| 293 } | 294 } |
| 294 | 295 |
| 295 | 296 |
| 296 } // namespace WebCore | 297 } // namespace WebCore |
| 297 | 298 |
| 298 #endif // Editor_h | 299 #endif // Editor_h |
| OLD | NEW |