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

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

Issue 299353004: Oilpan: move editing objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make test wrapper class finalized Created 6 years, 6 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/EditingStyle.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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class SimpleFontData; 56 class SimpleFontData;
57 class SpellChecker; 57 class SpellChecker;
58 class StylePropertySet; 58 class StylePropertySet;
59 class Text; 59 class Text;
60 class TextEvent; 60 class TextEvent;
61 class UndoStack; 61 class UndoStack;
62 62
63 enum EditorCommandSource { CommandFromMenuOrKeyBinding, CommandFromDOM, CommandF romDOMWithUserInterface }; 63 enum EditorCommandSource { CommandFromMenuOrKeyBinding, CommandFromDOM, CommandF romDOMWithUserInterface };
64 enum EditorParagraphSeparator { EditorParagraphSeparatorIsDiv, EditorParagraphSe paratorIsP }; 64 enum EditorParagraphSeparator { EditorParagraphSeparatorIsDiv, EditorParagraphSe paratorIsP };
65 65
66 class Editor { 66 class Editor FINAL : public NoBaseWillBeGarbageCollectedFinalized<Editor> {
67 WTF_MAKE_NONCOPYABLE(Editor); 67 WTF_MAKE_NONCOPYABLE(Editor);
68 public: 68 public:
69 static PassOwnPtr<Editor> create(LocalFrame&); 69 static PassOwnPtrWillBeRawPtr<Editor> create(LocalFrame&);
70 ~Editor(); 70 ~Editor();
71 71
72 EditorClient& client() const; 72 EditorClient& client() const;
73 73
74 LocalFrame& frame() const { return m_frame; } 74 LocalFrame& frame() const { return m_frame; }
75 75
76 CompositeEditCommand* lastEditCommand() { return m_lastEditCommand.get(); } 76 CompositeEditCommand* lastEditCommand() { return m_lastEditCommand.get(); }
77 77
78 void handleKeyboardEvent(KeyboardEvent*); 78 void handleKeyboardEvent(KeyboardEvent*);
79 bool handleTextEvent(TextEvent*); 79 bool handleTextEvent(TextEvent*);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 void clearLastEditCommand(); 119 void clearLastEditCommand();
120 120
121 bool deleteWithDirection(SelectionDirection, TextGranularity, bool killRing, bool isTypingAction); 121 bool deleteWithDirection(SelectionDirection, TextGranularity, bool killRing, bool isTypingAction);
122 void deleteSelectionWithSmartDelete(bool smartDelete); 122 void deleteSelectionWithSmartDelete(bool smartDelete);
123 123
124 void applyStyle(StylePropertySet*, EditAction = EditActionUnspecified); 124 void applyStyle(StylePropertySet*, EditAction = EditActionUnspecified);
125 void applyParagraphStyle(StylePropertySet*, EditAction = EditActionUnspecifi ed); 125 void applyParagraphStyle(StylePropertySet*, EditAction = EditActionUnspecifi ed);
126 void applyStyleToSelection(StylePropertySet*, EditAction); 126 void applyStyleToSelection(StylePropertySet*, EditAction);
127 void applyParagraphStyleToSelection(StylePropertySet*, EditAction); 127 void applyParagraphStyleToSelection(StylePropertySet*, EditAction);
128 128
129 void appliedEditing(PassRefPtr<CompositeEditCommand>); 129 void appliedEditing(PassRefPtrWillBeRawPtr<CompositeEditCommand>);
130 void unappliedEditing(PassRefPtr<EditCommandComposition>); 130 void unappliedEditing(PassRefPtrWillBeRawPtr<EditCommandComposition>);
131 void reappliedEditing(PassRefPtr<EditCommandComposition>); 131 void reappliedEditing(PassRefPtrWillBeRawPtr<EditCommandComposition>);
132 132
133 void setShouldStyleWithCSS(bool flag) { m_shouldStyleWithCSS = flag; } 133 void setShouldStyleWithCSS(bool flag) { m_shouldStyleWithCSS = flag; }
134 bool shouldStyleWithCSS() const { return m_shouldStyleWithCSS; } 134 bool shouldStyleWithCSS() const { return m_shouldStyleWithCSS; }
135 135
136 class Command { 136 class Command {
137 public: 137 public:
138 Command(); 138 Command();
139 Command(const EditorInternalCommand*, EditorCommandSource, PassRefPtr<Lo calFrame>); 139 Command(const EditorInternalCommand*, EditorCommandSource, PassRefPtr<Lo calFrame>);
140 140
141 bool execute(const String& parameter = String(), Event* triggeringEvent = 0) const; 141 bool execute(const String& parameter = String(), Event* triggeringEvent = 0) const;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
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();
232 private: 232 private:
233 Editor* m_editor; 233 Editor* m_editor;
234 }; 234 };
235 friend class RevealSelectionScope; 235 friend class RevealSelectionScope;
236 236
237 void trace(Visitor*);
238
237 private: 239 private:
238 LocalFrame& m_frame; 240 LocalFrame& m_frame;
239 RefPtr<CompositeEditCommand> m_lastEditCommand; 241 RefPtrWillBeMember<CompositeEditCommand> m_lastEditCommand;
240 int m_preventRevealSelection; 242 int m_preventRevealSelection;
241 bool m_shouldStartNewKillRingSequence; 243 bool m_shouldStartNewKillRingSequence;
242 bool m_shouldStyleWithCSS; 244 bool m_shouldStyleWithCSS;
243 const OwnPtr<KillRing> m_killRing; 245 const OwnPtr<KillRing> m_killRing;
244 VisibleSelection m_mark; 246 VisibleSelection m_mark;
245 bool m_areMarkedTextMatchesHighlighted; 247 bool m_areMarkedTextMatchesHighlighted;
246 EditorParagraphSeparator m_defaultParagraphSeparator; 248 EditorParagraphSeparator m_defaultParagraphSeparator;
247 bool m_overwriteModeEnabled; 249 bool m_overwriteModeEnabled;
248 250
249 explicit Editor(LocalFrame&); 251 explicit Editor(LocalFrame&);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 294
293 inline bool Editor::markedTextMatchesAreHighlighted() const 295 inline bool Editor::markedTextMatchesAreHighlighted() const
294 { 296 {
295 return m_areMarkedTextMatchesHighlighted; 297 return m_areMarkedTextMatchesHighlighted;
296 } 298 }
297 299
298 300
299 } // namespace WebCore 301 } // namespace WebCore
300 302
301 #endif // Editor_h 303 #endif // Editor_h
OLDNEW
« no previous file with comments | « Source/core/editing/EditingStyle.cpp ('k') | Source/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698