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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 Member<UndoStack> m_undoStack; | |
yosin_UTC9
2016/07/04 07:27:41
nit: Let's use|const Member<UndoStack>|, since it
Xiaocheng
2016/07/04 08:03:37
Done.
| |
256 int m_preventRevealSelection; | 257 int m_preventRevealSelection; |
257 bool m_shouldStartNewKillRingSequence; | 258 bool m_shouldStartNewKillRingSequence; |
258 bool m_shouldStyleWithCSS; | 259 bool m_shouldStyleWithCSS; |
259 const std::unique_ptr<KillRing> m_killRing; | 260 const std::unique_ptr<KillRing> m_killRing; |
260 VisibleSelection m_mark; | 261 VisibleSelection m_mark; |
261 bool m_areMarkedTextMatchesHighlighted; | 262 bool m_areMarkedTextMatchesHighlighted; |
262 EditorParagraphSeparator m_defaultParagraphSeparator; | 263 EditorParagraphSeparator m_defaultParagraphSeparator; |
263 bool m_overwriteModeEnabled; | 264 bool m_overwriteModeEnabled; |
264 | 265 |
265 explicit Editor(LocalFrame&); | 266 explicit Editor(LocalFrame&); |
266 | 267 |
267 LocalFrame& frame() const | 268 LocalFrame& frame() const |
268 { | 269 { |
269 DCHECK(m_frame); | 270 DCHECK(m_frame); |
270 return *m_frame; | 271 return *m_frame; |
271 } | 272 } |
272 | 273 |
273 bool canDeleteRange(const EphemeralRange&) const; | 274 bool canDeleteRange(const EphemeralRange&) const; |
274 bool shouldDeleteRange(const EphemeralRange&) const; | 275 bool shouldDeleteRange(const EphemeralRange&) const; |
275 | 276 |
276 UndoStack* undoStack() const; | |
277 | |
278 bool tryDHTMLCopy(); | 277 bool tryDHTMLCopy(); |
279 bool tryDHTMLCut(); | 278 bool tryDHTMLCut(); |
280 bool tryDHTMLPaste(PasteMode); | 279 bool tryDHTMLPaste(PasteMode); |
281 | 280 |
282 bool canSmartReplaceWithPasteboard(Pasteboard*); | 281 bool canSmartReplaceWithPasteboard(Pasteboard*); |
283 void pasteAsPlainTextWithPasteboard(Pasteboard*); | 282 void pasteAsPlainTextWithPasteboard(Pasteboard*); |
284 void pasteWithPasteboard(Pasteboard*); | 283 void pasteWithPasteboard(Pasteboard*); |
285 void writeSelectionToPasteboard(); | 284 void writeSelectionToPasteboard(); |
286 bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy, PasteMo de = AllMimeTypes); | 285 bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy, PasteMo de = AllMimeTypes); |
287 | 286 |
(...skipping 26 matching lines...) Expand all Loading... | |
314 | 313 |
315 inline bool Editor::markedTextMatchesAreHighlighted() const | 314 inline bool Editor::markedTextMatchesAreHighlighted() const |
316 { | 315 { |
317 return m_areMarkedTextMatchesHighlighted; | 316 return m_areMarkedTextMatchesHighlighted; |
318 } | 317 } |
319 | 318 |
320 | 319 |
321 } // namespace blink | 320 } // namespace blink |
322 | 321 |
323 #endif // Editor_h | 322 #endif // Editor_h |
OLD | NEW |