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

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

Issue 2709943004: Expand FrameSeleciton::extent() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-23T18:48:11 Created 3 years, 9 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 | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.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, 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // This function does not allow the selection to collapse. If the new 169 // This function does not allow the selection to collapse. If the new
170 // extent is resolved to the same position as the current base, this 170 // extent is resolved to the same position as the current base, this
171 // function will do nothing. 171 // function will do nothing.
172 void moveRangeSelectionExtent(const IntPoint&); 172 void moveRangeSelectionExtent(const IntPoint&);
173 void moveRangeSelection(const VisiblePosition& base, 173 void moveRangeSelection(const VisiblePosition& base,
174 const VisiblePosition& extent, 174 const VisiblePosition& extent,
175 TextGranularity); 175 TextGranularity);
176 176
177 TextGranularity granularity() const { return m_granularity; } 177 TextGranularity granularity() const { return m_granularity; }
178 178
179 Position extent() const {
180 return computeVisibleSelectionInDOMTreeDeprecated().extent();
181 }
182
183 // Returns true if specified layout block should paint caret. This function is 179 // Returns true if specified layout block should paint caret. This function is
184 // called during painting only. 180 // called during painting only.
185 bool shouldPaintCaret(const LayoutBlock&) const; 181 bool shouldPaintCaret(const LayoutBlock&) const;
186 182
187 // Bounds of (possibly transformed) caret in absolute coords 183 // Bounds of (possibly transformed) caret in absolute coords
188 IntRect absoluteCaretBounds(); 184 IntRect absoluteCaretBounds();
189 185
190 void didChangeFocus(); 186 void didChangeFocus();
191 187
192 const SelectionInDOMTree& selectionInDOMTree() const; 188 const SelectionInDOMTree& selectionInDOMTree() const;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 328
333 } // namespace blink 329 } // namespace blink
334 330
335 #ifndef NDEBUG 331 #ifndef NDEBUG
336 // Outside the WebCore namespace for ease of invocation from gdb. 332 // Outside the WebCore namespace for ease of invocation from gdb.
337 void showTree(const blink::FrameSelection&); 333 void showTree(const blink::FrameSelection&);
338 void showTree(const blink::FrameSelection*); 334 void showTree(const blink::FrameSelection*);
339 #endif 335 #endif
340 336
341 #endif // FrameSelection_h 337 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698