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

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

Issue 315493004: reset VisibleSelection at the Undo command. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add the VisibleSelection::validateIfNeeded method 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/Editor.cpp ('k') | Source/core/editing/VisibleSelection.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) 2004 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004 Apple Computer, 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 virtual void didChangeVisibleSelection() = 0; 125 virtual void didChangeVisibleSelection() = 0;
126 virtual void trace(Visitor*) { } 126 virtual void trace(Visitor*) { }
127 }; 127 };
128 128
129 void setChangeObserver(ChangeObserver&); 129 void setChangeObserver(ChangeObserver&);
130 void clearChangeObserver(); 130 void clearChangeObserver();
131 void didChange(); // Fire the change observer, if any. 131 void didChange(); // Fire the change observer, if any.
132 132
133 void trace(Visitor*); 133 void trace(Visitor*);
134 134
135 void validatePositionsIfNeeded();
136
135 #ifndef NDEBUG 137 #ifndef NDEBUG
136 void debugPosition() const; 138 void debugPosition() const;
137 void formatForDebugger(char* buffer, unsigned length) const; 139 void formatForDebugger(char* buffer, unsigned length) const;
138 void showTreeForThis() const; 140 void showTreeForThis() const;
139 #endif 141 #endif
140 142
141 private: 143 private:
142 void validate(TextGranularity = CharacterGranularity); 144 void validate(TextGranularity = CharacterGranularity);
143 145
144 // Support methods for validate() 146 // Support methods for validate()
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 185
184 } // namespace WebCore 186 } // namespace WebCore
185 187
186 #ifndef NDEBUG 188 #ifndef NDEBUG
187 // Outside the WebCore namespace for ease of invocation from gdb. 189 // Outside the WebCore namespace for ease of invocation from gdb.
188 void showTree(const WebCore::VisibleSelection&); 190 void showTree(const WebCore::VisibleSelection&);
189 void showTree(const WebCore::VisibleSelection*); 191 void showTree(const WebCore::VisibleSelection*);
190 #endif 192 #endif
191 193
192 #endif // VisibleSelection_h 194 #endif // VisibleSelection_h
OLDNEW
« no previous file with comments | « Source/core/editing/Editor.cpp ('k') | Source/core/editing/VisibleSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698