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

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

Issue 2710883002: Expand FrameSeleciton::isNone() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-23T16:27:43 rebase to resolve conflict with DOMSelection in r452402 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // Returns true if specified layout block should paint caret. This function is 183 // Returns true if specified layout block should paint caret. This function is
184 // called during painting only. 184 // called during painting only.
185 bool shouldPaintCaret(const LayoutBlock&) const; 185 bool shouldPaintCaret(const LayoutBlock&) const;
186 186
187 // Bounds of (possibly transformed) caret in absolute coords 187 // Bounds of (possibly transformed) caret in absolute coords
188 IntRect absoluteCaretBounds(); 188 IntRect absoluteCaretBounds();
189 189
190 void didChangeFocus(); 190 void didChangeFocus();
191 191
192 const SelectionInDOMTree& selectionInDOMTree() const; 192 const SelectionInDOMTree& selectionInDOMTree() const;
193 // TODO(yosin): We should rename |isNone()| to |isVisibleNone()|.
194 bool isNone() const {
195 return computeVisibleSelectionInDOMTreeDeprecated().isNone();
196 }
197 bool isInPasswordField() const; 193 bool isInPasswordField() const;
198 bool isDirectional() const { return selectionInDOMTree().isDirectional(); } 194 bool isDirectional() const { return selectionInDOMTree().isDirectional(); }
199 195
200 // If this FrameSelection has a logical range which is still valid, this 196 // If this FrameSelection has a logical range which is still valid, this
201 // function return its clone. Otherwise, the return value from underlying 197 // function return its clone. Otherwise, the return value from underlying
202 // VisibleSelection's firstRange() is returned. 198 // VisibleSelection's firstRange() is returned.
203 Range* firstRange() const; 199 Range* firstRange() const;
204 200
205 void documentAttached(Document*); 201 void documentAttached(Document*);
206 202
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 332
337 } // namespace blink 333 } // namespace blink
338 334
339 #ifndef NDEBUG 335 #ifndef NDEBUG
340 // Outside the WebCore namespace for ease of invocation from gdb. 336 // Outside the WebCore namespace for ease of invocation from gdb.
341 void showTree(const blink::FrameSelection&); 337 void showTree(const blink::FrameSelection&);
342 void showTree(const blink::FrameSelection*); 338 void showTree(const blink::FrameSelection*);
343 #endif 339 #endif
344 340
345 #endif // FrameSelection_h 341 #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