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

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

Issue 289273002: Oilpan: make DocumentFragment a heap allocated object. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + add WillBeGarbageCollected FIXME. Created 6 years, 7 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
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/Editor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 VisibleSelection selectionForCommand(Event*); 188 VisibleSelection selectionForCommand(Event*);
189 189
190 KillRing& killRing() const { return *m_killRing; } 190 KillRing& killRing() const { return *m_killRing; }
191 191
192 EditingBehavior behavior() const; 192 EditingBehavior behavior() const;
193 193
194 PassRefPtrWillBeRawPtr<Range> selectedRange(); 194 PassRefPtrWillBeRawPtr<Range> selectedRange();
195 195
196 void addToKillRing(Range*, bool prepend); 196 void addToKillRing(Range*, bool prepend);
197 197
198 void pasteAsFragment(PassRefPtr<DocumentFragment>, bool smartReplace, bool m atchStyle); 198 void pasteAsFragment(PassRefPtrWillBeRawPtr<DocumentFragment>, bool smartRep lace, bool matchStyle);
199 void pasteAsPlainText(const String&, bool smartReplace); 199 void pasteAsPlainText(const String&, bool smartReplace);
200 200
201 Node* findEventTargetFrom(const VisibleSelection&) const; 201 Node* findEventTargetFrom(const VisibleSelection&) const;
202 202
203 bool findString(const String&, FindOptions); 203 bool findString(const String&, FindOptions);
204 // FIXME: Switch callers over to the FindOptions version and retire this one . 204 // FIXME: Switch callers over to the FindOptions version and retire this one .
205 bool findString(const String&, bool forward, bool caseFlag, bool wrapFlag, b ool startInSelection); 205 bool findString(const String&, bool forward, bool caseFlag, bool wrapFlag, b ool startInSelection);
206 206
207 PassRefPtrWillBeRawPtr<Range> findStringAndScrollToVisible(const String&, Ra nge*, FindOptions); 207 PassRefPtrWillBeRawPtr<Range> findStringAndScrollToVisible(const String&, Ra nge*, FindOptions);
208 208
209 const VisibleSelection& mark() const; // Mark, to be used as emacs uses it. 209 const VisibleSelection& mark() const; // Mark, to be used as emacs uses it.
210 void setMark(const VisibleSelection&); 210 void setMark(const VisibleSelection&);
211 211
212 void computeAndSetTypingStyle(StylePropertySet* , EditAction = EditActionUns pecified); 212 void computeAndSetTypingStyle(StylePropertySet* , EditAction = EditActionUns pecified);
213 213
214 IntRect firstRectForRange(Range*) const; 214 IntRect firstRectForRange(Range*) const;
215 215
216 void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSe lection::SetSelectionOptions); 216 void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSe lection::SetSelectionOptions);
217 217
218 bool markedTextMatchesAreHighlighted() const; 218 bool markedTextMatchesAreHighlighted() const;
219 void setMarkedTextMatchesAreHighlighted(bool); 219 void setMarkedTextMatchesAreHighlighted(bool);
220 220
221 void replaceSelectionWithFragment(PassRefPtr<DocumentFragment>, bool selectR eplacement, bool smartReplace, bool matchStyle); 221 void replaceSelectionWithFragment(PassRefPtrWillBeRawPtr<DocumentFragment>, bool selectReplacement, bool smartReplace, bool matchStyle);
222 void replaceSelectionWithText(const String&, bool selectReplacement, bool sm artReplace); 222 void replaceSelectionWithText(const String&, bool selectReplacement, bool sm artReplace);
223 223
224 EditorParagraphSeparator defaultParagraphSeparator() const { return m_defaul tParagraphSeparator; } 224 EditorParagraphSeparator defaultParagraphSeparator() const { return m_defaul tParagraphSeparator; }
225 void setDefaultParagraphSeparator(EditorParagraphSeparator separator) { m_de faultParagraphSeparator = separator; } 225 void setDefaultParagraphSeparator(EditorParagraphSeparator separator) { m_de faultParagraphSeparator = separator; }
226 226
227 class RevealSelectionScope { 227 class RevealSelectionScope {
228 WTF_MAKE_NONCOPYABLE(RevealSelectionScope); 228 WTF_MAKE_NONCOPYABLE(RevealSelectionScope);
229 public: 229 public:
230 RevealSelectionScope(Editor*); 230 RevealSelectionScope(Editor*);
231 ~RevealSelectionScope(); 231 ~RevealSelectionScope();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 inline bool Editor::markedTextMatchesAreHighlighted() const 293 inline bool Editor::markedTextMatchesAreHighlighted() const
294 { 294 {
295 return m_areMarkedTextMatchesHighlighted; 295 return m_areMarkedTextMatchesHighlighted;
296 } 296 }
297 297
298 298
299 } // namespace WebCore 299 } // namespace WebCore
300 300
301 #endif // Editor_h 301 #endif // Editor_h
OLDNEW
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698