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

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

Issue 2698793003: Get rid of redundant layout tree update related to selection (Closed)
Patch Set: 2017-02-17T16:13:56 selectionTypeWithLegacyGranularity() 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // Call this after doing user-triggered selections to make it easy to delete 162 // Call this after doing user-triggered selections to make it easy to delete
163 // the frame you entirely selected. 163 // the frame you entirely selected.
164 void selectFrameElementInParentIfFullySelected(); 164 void selectFrameElementInParentIfFullySelected();
165 165
166 bool contains(const LayoutPoint&); 166 bool contains(const LayoutPoint&);
167 167
168 SelectionType getSelectionType() const { 168 SelectionType getSelectionType() const {
169 return selection().getSelectionType(); 169 return selection().getSelectionType();
170 } 170 }
171 171
172 TextAffinity affinity() const { return selection().affinity(); } 172 TextAffinity affinity() const { return selectionInDOMTree().affinity(); }
173 173
174 bool modify(EAlteration, 174 bool modify(EAlteration,
175 SelectionDirection, 175 SelectionDirection,
176 TextGranularity, 176 TextGranularity,
177 EUserTriggered = NotUserTriggered); 177 EUserTriggered = NotUserTriggered);
178 enum VerticalDirection { DirectionUp, DirectionDown }; 178 enum VerticalDirection { DirectionUp, DirectionDown };
179 bool modify(EAlteration, unsigned verticalDistance, VerticalDirection); 179 bool modify(EAlteration, unsigned verticalDistance, VerticalDirection);
180 180
181 // Moves the selection extent based on the selection granularity strategy. 181 // Moves the selection extent based on the selection granularity strategy.
182 // This function does not allow the selection to collapse. If the new 182 // This function does not allow the selection to collapse. If the new
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 } // namespace blink 351 } // namespace blink
352 352
353 #ifndef NDEBUG 353 #ifndef NDEBUG
354 // Outside the WebCore namespace for ease of invocation from gdb. 354 // Outside the WebCore namespace for ease of invocation from gdb.
355 void showTree(const blink::FrameSelection&); 355 void showTree(const blink::FrameSelection&);
356 void showTree(const blink::FrameSelection*); 356 void showTree(const blink::FrameSelection*);
357 #endif 357 #endif
358 358
359 #endif // FrameSelection_h 359 #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