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

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

Issue 2708703003: Expand FrameSeleciton::isRange() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-21T23:48:22 rebase Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // Bounds of (possibly transformed) caret in absolute coords 206 // Bounds of (possibly transformed) caret in absolute coords
207 IntRect absoluteCaretBounds(); 207 IntRect absoluteCaretBounds();
208 208
209 void didChangeFocus(); 209 void didChangeFocus();
210 210
211 const SelectionInDOMTree& selectionInDOMTree() const; 211 const SelectionInDOMTree& selectionInDOMTree() const;
212 // TODO(yosin): We should rename |isNone()| to |isVisibleNone()|. 212 // TODO(yosin): We should rename |isNone()| to |isVisibleNone()|.
213 bool isNone() const { 213 bool isNone() const {
214 return computeVisibleSelectionInDOMTreeDeprecated().isNone(); 214 return computeVisibleSelectionInDOMTreeDeprecated().isNone();
215 } 215 }
216 bool isRange() const {
217 return computeVisibleSelectionInDOMTreeDeprecated().isRange();
218 }
219 bool isInPasswordField() const; 216 bool isInPasswordField() const;
220 bool isDirectional() const { return selectionInDOMTree().isDirectional(); } 217 bool isDirectional() const { return selectionInDOMTree().isDirectional(); }
221 218
222 // If this FrameSelection has a logical range which is still valid, this 219 // If this FrameSelection has a logical range which is still valid, this
223 // function return its clone. Otherwise, the return value from underlying 220 // function return its clone. Otherwise, the return value from underlying
224 // VisibleSelection's firstRange() is returned. 221 // VisibleSelection's firstRange() is returned.
225 Range* firstRange() const; 222 Range* firstRange() const;
226 223
227 void documentAttached(Document*); 224 void documentAttached(Document*);
228 225
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 355
359 } // namespace blink 356 } // namespace blink
360 357
361 #ifndef NDEBUG 358 #ifndef NDEBUG
362 // Outside the WebCore namespace for ease of invocation from gdb. 359 // Outside the WebCore namespace for ease of invocation from gdb.
363 void showTree(const blink::FrameSelection&); 360 void showTree(const blink::FrameSelection&);
364 void showTree(const blink::FrameSelection*); 361 void showTree(const blink::FrameSelection*);
365 #endif 362 #endif
366 363
367 #endif // FrameSelection_h 364 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.cpp ('k') | third_party/WebKit/Source/core/editing/SelectionController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698