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

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

Issue 1123563003: Improving direction-based selection strategy. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressing remaining review feedback. Created 5 years, 6 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 reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 SelectionType selectionType() const { return m_selection.selectionType(); } 121 SelectionType selectionType() const { return m_selection.selectionType(); }
122 122
123 EAffinity affinity() const { return m_selection.affinity(); } 123 EAffinity affinity() const { return m_selection.affinity(); }
124 124
125 bool modify(EAlteration, SelectionDirection, TextGranularity, EUserTriggered = NotUserTriggered); 125 bool modify(EAlteration, SelectionDirection, TextGranularity, EUserTriggered = NotUserTriggered);
126 enum VerticalDirection { DirectionUp, DirectionDown }; 126 enum VerticalDirection { DirectionUp, DirectionDown };
127 bool modify(EAlteration, unsigned verticalDistance, VerticalDirection, EUser Triggered = NotUserTriggered, CursorAlignOnScroll = AlignCursorOnScrollIfNeeded) ; 127 bool modify(EAlteration, unsigned verticalDistance, VerticalDirection, EUser Triggered = NotUserTriggered, CursorAlignOnScroll = AlignCursorOnScrollIfNeeded) ;
128 128
129 // Moves the selection extent based on the selection granularity strategy. 129 // Moves the selection extent based on the selection granularity strategy.
130 // This function does not allow the selection to collapse. If the new extent 130 // This function does not allow the selection to collapse. If the new extent
131 // is set to the same position as the current base, this function will do 131 // is set to the same position as the current base, this function will do
leviw_travelin_and_unemployed 2015/06/03 22:29:47 If the new extent is 'resolved' to the same positi
mfomitchev 2015/06/05 17:38:39 Done.
132 // nothing. 132 // nothing.
133 void moveRangeSelectionExtent(const VisiblePosition&); 133 void moveRangeSelectionExtent(const IntPoint&);
134 void moveRangeSelection(const VisiblePosition& base, const VisiblePosition& extent, TextGranularity); 134 void moveRangeSelection(const VisiblePosition& base, const VisiblePosition& extent, TextGranularity);
135 135
136 TextGranularity granularity() const { return m_granularity; } 136 TextGranularity granularity() const { return m_granularity; }
137 137
138 void setStart(const VisiblePosition &, EUserTriggered = NotUserTriggered); 138 void setStart(const VisiblePosition &, EUserTriggered = NotUserTriggered);
139 void setEnd(const VisiblePosition &, EUserTriggered = NotUserTriggered); 139 void setEnd(const VisiblePosition &, EUserTriggered = NotUserTriggered);
140 140
141 void setBase(const VisiblePosition&, EUserTriggered = NotUserTriggered); 141 void setBase(const VisiblePosition&, EUserTriggered = NotUserTriggered);
142 void setExtent(const VisiblePosition&, EUserTriggered = NotUserTriggered); 142 void setExtent(const VisiblePosition&, EUserTriggered = NotUserTriggered);
143 143
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 327 }
328 } // namespace blink 328 } // namespace blink
329 329
330 #ifndef NDEBUG 330 #ifndef NDEBUG
331 // Outside the WebCore namespace for ease of invocation from gdb. 331 // Outside the WebCore namespace for ease of invocation from gdb.
332 void showTree(const blink::FrameSelection&); 332 void showTree(const blink::FrameSelection&);
333 void showTree(const blink::FrameSelection*); 333 void showTree(const blink::FrameSelection*);
334 #endif 334 #endif
335 335
336 #endif // FrameSelection_h 336 #endif // FrameSelection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698