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

Side by Side Diff: sky/engine/core/editing/Editor.h

Issue 928393003: Remove the concept of document.documentElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « sky/engine/core/dom/Position.cpp ('k') | sky/engine/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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 VisibleSelection selectionForCommand(Event*); 170 VisibleSelection selectionForCommand(Event*);
171 171
172 EditingBehavior behavior() const; 172 EditingBehavior behavior() const;
173 173
174 PassRefPtr<Range> selectedRange(); 174 PassRefPtr<Range> selectedRange();
175 175
176 void pasteAsFragment(PassRefPtr<DocumentFragment>, bool smartReplace, bool m atchStyle); 176 void pasteAsFragment(PassRefPtr<DocumentFragment>, bool smartReplace, bool m atchStyle);
177 void pasteAsPlainText(const String&, bool smartReplace); 177 void pasteAsPlainText(const String&, bool smartReplace);
178 178
179 Element* findEventTargetFrom(const VisibleSelection&) const; 179 ContainerNode* findEventTargetFrom(const VisibleSelection&) const;
180 180
181 bool findString(const String&, FindOptions); 181 bool findString(const String&, FindOptions);
182 // FIXME: Switch callers over to the FindOptions version and retire this one . 182 // FIXME: Switch callers over to the FindOptions version and retire this one .
183 bool findString(const String&, bool forward, bool caseFlag, bool wrapFlag, b ool startInSelection); 183 bool findString(const String&, bool forward, bool caseFlag, bool wrapFlag, b ool startInSelection);
184 184
185 PassRefPtr<Range> findStringAndScrollToVisible(const String&, Range*, FindOp tions); 185 PassRefPtr<Range> findStringAndScrollToVisible(const String&, Range*, FindOp tions);
186 186
187 const VisibleSelection& mark() const; // Mark, to be used as emacs uses it. 187 const VisibleSelection& mark() const; // Mark, to be used as emacs uses it.
188 void setMark(const VisibleSelection&); 188 void setMark(const VisibleSelection&);
189 189
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 UndoStack* undoStack() const; 229 UndoStack* undoStack() const;
230 230
231 bool tryDHTMLCopy(); 231 bool tryDHTMLCopy();
232 bool tryDHTMLCut(); 232 bool tryDHTMLCut();
233 233
234 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAli gnment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent); 234 void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAli gnment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent);
235 void changeSelectionAfterCommand(const VisibleSelection& newSelection, Frame Selection::SetSelectionOptions); 235 void changeSelectionAfterCommand(const VisibleSelection& newSelection, Frame Selection::SetSelectionOptions);
236 void notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection , FrameSelection::SetSelectionOptions); 236 void notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection , FrameSelection::SetSelectionOptions);
237 237
238 Element* findEventTargetFromSelection() const; 238 ContainerNode* findEventTargetFromSelection() const;
239 239
240 PassRefPtr<Range> rangeOfString(const String&, Range*, FindOptions); 240 PassRefPtr<Range> rangeOfString(const String&, Range*, FindOptions);
241 241
242 SpellChecker& spellChecker() const; 242 SpellChecker& spellChecker() const;
243 243
244 bool handleEditingKeyboardEvent(blink::KeyboardEvent*); 244 bool handleEditingKeyboardEvent(blink::KeyboardEvent*);
245 }; 245 };
246 246
247 inline const VisibleSelection& Editor::mark() const 247 inline const VisibleSelection& Editor::mark() const
248 { 248 {
249 return m_mark; 249 return m_mark;
250 } 250 }
251 251
252 inline void Editor::setMark(const VisibleSelection& selection) 252 inline void Editor::setMark(const VisibleSelection& selection)
253 { 253 {
254 m_mark = selection; 254 m_mark = selection;
255 } 255 }
256 256
257 inline bool Editor::markedTextMatchesAreHighlighted() const 257 inline bool Editor::markedTextMatchesAreHighlighted() const
258 { 258 {
259 return m_areMarkedTextMatchesHighlighted; 259 return m_areMarkedTextMatchesHighlighted;
260 } 260 }
261 261
262 262
263 } // namespace blink 263 } // namespace blink
264 264
265 #endif // SKY_ENGINE_CORE_EDITING_EDITOR_H_ 265 #endif // SKY_ENGINE_CORE_EDITING_EDITOR_H_
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Position.cpp ('k') | sky/engine/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698