OLD | NEW |
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 template <typename Strategy> | 109 template <typename Strategy> |
110 const VisibleSelectionTemplate<Strategy>& visibleSelection() const; | 110 const VisibleSelectionTemplate<Strategy>& visibleSelection() const; |
111 | 111 |
112 const VisibleSelection& selection() const; | 112 const VisibleSelection& selection() const; |
113 void setSelection(const VisibleSelection&, SetSelectionOptions = CloseTyping
| ClearTypingStyle, CursorAlignOnScroll = CursorAlignOnScroll::IfNeeded, TextGr
anularity = CharacterGranularity); | 113 void setSelection(const VisibleSelection&, SetSelectionOptions = CloseTyping
| ClearTypingStyle, CursorAlignOnScroll = CursorAlignOnScroll::IfNeeded, TextGr
anularity = CharacterGranularity); |
114 void setSelection(const VisibleSelectionInFlatTree&, SetSelectionOptions = C
loseTyping | ClearTypingStyle, CursorAlignOnScroll = CursorAlignOnScroll::IfNeed
ed, TextGranularity = CharacterGranularity); | 114 void setSelection(const VisibleSelectionInFlatTree&, SetSelectionOptions = C
loseTyping | ClearTypingStyle, CursorAlignOnScroll = CursorAlignOnScroll::IfNeed
ed, TextGranularity = CharacterGranularity); |
115 // TODO(yosin) We should get rid of two parameters version of | 115 // TODO(yosin) We should get rid of two parameters version of |
116 // |setSelection()| to avoid conflict of four parameters version. | 116 // |setSelection()| to avoid conflict of four parameters version. |
117 void setSelection(const VisibleSelection& selection, TextGranularity granula
rity) { setSelection(selection, CloseTyping | ClearTypingStyle, CursorAlignOnScr
oll::IfNeeded, granularity); } | 117 void setSelection(const VisibleSelection& selection, TextGranularity granula
rity) { setSelection(selection, CloseTyping | ClearTypingStyle, CursorAlignOnScr
oll::IfNeeded, granularity); } |
118 void setSelection(const VisibleSelectionInFlatTree& selection, TextGranulari
ty granularity) { setSelection(selection, CloseTyping | ClearTypingStyle, Cursor
AlignOnScroll::IfNeeded, granularity); } | |
119 // TODO(yosin) We should get rid of |Range| version of |setSelectedRagne()| | 118 // TODO(yosin) We should get rid of |Range| version of |setSelectedRagne()| |
120 // for Oilpan. | 119 // for Oilpan. |
121 bool setSelectedRange(Range*, TextAffinity, SelectionDirectionalMode = Selec
tionDirectionalMode::NonDirectional, SetSelectionOptions = CloseTyping | ClearTy
pingStyle); | 120 bool setSelectedRange(Range*, TextAffinity, SelectionDirectionalMode = Selec
tionDirectionalMode::NonDirectional, SetSelectionOptions = CloseTyping | ClearTy
pingStyle); |
122 bool setSelectedRange(const EphemeralRange&, TextAffinity, SelectionDirectio
nalMode = SelectionDirectionalMode::NonDirectional, FrameSelection::SetSelection
Options = CloseTyping | ClearTypingStyle); | 121 bool setSelectedRange(const EphemeralRange&, TextAffinity, SelectionDirectio
nalMode = SelectionDirectionalMode::NonDirectional, FrameSelection::SetSelection
Options = CloseTyping | ClearTypingStyle); |
123 void selectAll(); | 122 void selectAll(); |
124 void clear(); | 123 void clear(); |
125 void prepareForDestruction(); | 124 void prepareForDestruction(); |
126 | 125 |
127 // Call this after doing user-triggered selections to make it easy to delete
the frame you entirely selected. | 126 // Call this after doing user-triggered selections to make it easy to delete
the frame you entirely selected. |
128 void selectFrameElementInParentIfFullySelected(); | 127 void selectFrameElementInParentIfFullySelected(); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 } | 317 } |
319 } // namespace blink | 318 } // namespace blink |
320 | 319 |
321 #ifndef NDEBUG | 320 #ifndef NDEBUG |
322 // Outside the WebCore namespace for ease of invocation from gdb. | 321 // Outside the WebCore namespace for ease of invocation from gdb. |
323 void showTree(const blink::FrameSelection&); | 322 void showTree(const blink::FrameSelection&); |
324 void showTree(const blink::FrameSelection*); | 323 void showTree(const blink::FrameSelection*); |
325 #endif | 324 #endif |
326 | 325 |
327 #endif // FrameSelection_h | 326 #endif // FrameSelection_h |
OLD | NEW |