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: third_party/WebKit/Source/core/editing/FrameSelection.h

Issue 2704123003: Expand FrameSeleciton::isCaret() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-21T12:50:46 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Bounds of (possibly transformed) caret in absolute coords 215 // Bounds of (possibly transformed) caret in absolute coords
216 IntRect absoluteCaretBounds(); 216 IntRect absoluteCaretBounds();
217 217
218 void didChangeFocus(); 218 void didChangeFocus();
219 219
220 const SelectionInDOMTree& selectionInDOMTree() const; 220 const SelectionInDOMTree& selectionInDOMTree() const;
221 // TODO(yosin): We should rename |isNone()| to |isVisibleNone()|. 221 // TODO(yosin): We should rename |isNone()| to |isVisibleNone()|.
222 bool isNone() const { 222 bool isNone() const {
223 return computeVisibleSelectionInDOMTreeDeprecated().isNone(); 223 return computeVisibleSelectionInDOMTreeDeprecated().isNone();
224 } 224 }
225 bool isCaret() const {
226 return computeVisibleSelectionInDOMTreeDeprecated().isCaret();
227 }
228 bool isRange() const { 225 bool isRange() const {
229 return computeVisibleSelectionInDOMTreeDeprecated().isRange(); 226 return computeVisibleSelectionInDOMTreeDeprecated().isRange();
230 } 227 }
231 bool isInPasswordField() const; 228 bool isInPasswordField() const;
232 bool isDirectional() const { return selectionInDOMTree().isDirectional(); } 229 bool isDirectional() const { return selectionInDOMTree().isDirectional(); }
233 230
234 // If this FrameSelection has a logical range which is still valid, this 231 // If this FrameSelection has a logical range which is still valid, this
235 // function return its clone. Otherwise, the return value from underlying 232 // function return its clone. Otherwise, the return value from underlying
236 // VisibleSelection's firstRange() is returned. 233 // VisibleSelection's firstRange() is returned.
237 Range* firstRange() const; 234 Range* firstRange() const;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 367
371 } // namespace blink 368 } // namespace blink
372 369
373 #ifndef NDEBUG 370 #ifndef NDEBUG
374 // Outside the WebCore namespace for ease of invocation from gdb. 371 // Outside the WebCore namespace for ease of invocation from gdb.
375 void showTree(const blink::FrameSelection&); 372 void showTree(const blink::FrameSelection&);
376 void showTree(const blink::FrameSelection*); 373 void showTree(const blink::FrameSelection*);
377 #endif 374 #endif
378 375
379 #endif // FrameSelection_h 376 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.cpp ('k') | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698