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

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

Issue 2450213002: Utilize EditCommand::setEndingSelection() taking SelectionInDOMTree (Closed)
Patch Set: 2016-10-28T14:44:14 Created 4 years, 1 month 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) 2005, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 DECLARE_VIRTUAL_TRACE(); 63 DECLARE_VIRTUAL_TRACE();
64 64
65 protected: 65 protected:
66 explicit EditCommand(Document&); 66 explicit EditCommand(Document&);
67 67
68 Document& document() const { return *m_document.get(); } 68 Document& document() const { return *m_document.get(); }
69 CompositeEditCommand* parent() const { return m_parent; } 69 CompositeEditCommand* parent() const { return m_parent; }
70 void setStartingSelection(const VisibleSelection&); 70 void setStartingSelection(const VisibleSelection&);
71 void setEndingSelection(const SelectionInDOMTree&); 71 void setEndingSelection(const SelectionInDOMTree&);
72 // TODO(yosin): We should get rid of overloads of |setEndingSelection()| 72 // TODO(yosin): |setEndingVisibleSelection()| will take |SelectionInUndoStep|
73 // except for taking |SelectionInDOMTree|. 73 // You should not use this function other than copying existing selection.
74 void setEndingSelection(const VisibleSelection&); 74 void setEndingVisibleSelection(const VisibleSelection&);
75 75
76 // TODO(yosin) |isRenderedCharacter()| should be removed, and we should use 76 // TODO(yosin) |isRenderedCharacter()| should be removed, and we should use
77 // |VisiblePosition::characterAfter()| and 77 // |VisiblePosition::characterAfter()| and
78 // |VisiblePosition::characterBefore()|. 78 // |VisiblePosition::characterBefore()|.
79 static bool isRenderedCharacter(const Position&); 79 static bool isRenderedCharacter(const Position&);
80 80
81 private: 81 private:
82 Member<Document> m_document; 82 Member<Document> m_document;
83 VisibleSelection m_startingSelection; 83 VisibleSelection m_startingSelection;
84 VisibleSelection m_endingSelection; 84 VisibleSelection m_endingSelection;
(...skipping 19 matching lines...) Expand all
104 104
105 DEFINE_TYPE_CASTS(SimpleEditCommand, 105 DEFINE_TYPE_CASTS(SimpleEditCommand,
106 EditCommand, 106 EditCommand,
107 command, 107 command,
108 command->isSimpleEditCommand(), 108 command->isSimpleEditCommand(),
109 command.isSimpleEditCommand()); 109 command.isSimpleEditCommand());
110 110
111 } // namespace blink 111 } // namespace blink
112 112
113 #endif // EditCommand_h 113 #endif // EditCommand_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698