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

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

Issue 2127463002: Revert of Move UndoStack from Page to Editor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 private: 246 private:
247 Member<Editor> m_editor; 247 Member<Editor> m_editor;
248 }; 248 };
249 friend class RevealSelectionScope; 249 friend class RevealSelectionScope;
250 250
251 DECLARE_TRACE(); 251 DECLARE_TRACE();
252 252
253 private: 253 private:
254 Member<LocalFrame> m_frame; 254 Member<LocalFrame> m_frame;
255 Member<CompositeEditCommand> m_lastEditCommand; 255 Member<CompositeEditCommand> m_lastEditCommand;
256 const Member<UndoStack> m_undoStack;
257 int m_preventRevealSelection; 256 int m_preventRevealSelection;
258 bool m_shouldStartNewKillRingSequence; 257 bool m_shouldStartNewKillRingSequence;
259 bool m_shouldStyleWithCSS; 258 bool m_shouldStyleWithCSS;
260 const std::unique_ptr<KillRing> m_killRing; 259 const std::unique_ptr<KillRing> m_killRing;
261 VisibleSelection m_mark; 260 VisibleSelection m_mark;
262 bool m_areMarkedTextMatchesHighlighted; 261 bool m_areMarkedTextMatchesHighlighted;
263 EditorParagraphSeparator m_defaultParagraphSeparator; 262 EditorParagraphSeparator m_defaultParagraphSeparator;
264 bool m_overwriteModeEnabled; 263 bool m_overwriteModeEnabled;
265 264
266 explicit Editor(LocalFrame&); 265 explicit Editor(LocalFrame&);
267 266
268 LocalFrame& frame() const 267 LocalFrame& frame() const
269 { 268 {
270 DCHECK(m_frame); 269 DCHECK(m_frame);
271 return *m_frame; 270 return *m_frame;
272 } 271 }
273 272
274 bool canDeleteRange(const EphemeralRange&) const; 273 bool canDeleteRange(const EphemeralRange&) const;
275 bool shouldDeleteRange(const EphemeralRange&) const; 274 bool shouldDeleteRange(const EphemeralRange&) const;
276 275
276 UndoStack* undoStack() const;
277
277 bool tryDHTMLCopy(); 278 bool tryDHTMLCopy();
278 bool tryDHTMLCut(); 279 bool tryDHTMLCut();
279 bool tryDHTMLPaste(PasteMode); 280 bool tryDHTMLPaste(PasteMode);
280 281
281 bool canSmartReplaceWithPasteboard(Pasteboard*); 282 bool canSmartReplaceWithPasteboard(Pasteboard*);
282 void pasteAsPlainTextWithPasteboard(Pasteboard*); 283 void pasteAsPlainTextWithPasteboard(Pasteboard*);
283 void pasteWithPasteboard(Pasteboard*); 284 void pasteWithPasteboard(Pasteboard*);
284 void writeSelectionToPasteboard(); 285 void writeSelectionToPasteboard();
285 bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy, PasteMo de = AllMimeTypes); 286 bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy, PasteMo de = AllMimeTypes);
286 287
(...skipping 26 matching lines...) Expand all
313 314
314 inline bool Editor::markedTextMatchesAreHighlighted() const 315 inline bool Editor::markedTextMatchesAreHighlighted() const
315 { 316 {
316 return m_areMarkedTextMatchesHighlighted; 317 return m_areMarkedTextMatchesHighlighted;
317 } 318 }
318 319
319 320
320 } // namespace blink 321 } // namespace blink
321 322
322 #endif // Editor_h 323 #endif // Editor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698