| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 void moveTo(const Position&, EAffinity, EUserTriggered = NotUserTriggered); | 105 void moveTo(const Position&, EAffinity, EUserTriggered = NotUserTriggered); |
| 106 | 106 |
| 107 const VisibleSelection& selection() const { return m_selection; } | 107 const VisibleSelection& selection() const { return m_selection; } |
| 108 void setSelection(const VisibleSelection&, SetSelectionOptions = CloseTyping
| ClearTypingStyle, CursorAlignOnScroll = AlignCursorOnScrollIfNeeded, TextGran
ularity = CharacterGranularity); | 108 void setSelection(const VisibleSelection&, SetSelectionOptions = CloseTyping
| ClearTypingStyle, CursorAlignOnScroll = AlignCursorOnScrollIfNeeded, TextGran
ularity = CharacterGranularity); |
| 109 void setSelection(const VisibleSelection& selection, TextGranularity granula
rity) { setSelection(selection, CloseTyping | ClearTypingStyle, AlignCursorOnScr
ollIfNeeded, granularity); } | 109 void setSelection(const VisibleSelection& selection, TextGranularity granula
rity) { setSelection(selection, CloseTyping | ClearTypingStyle, AlignCursorOnScr
ollIfNeeded, granularity); } |
| 110 bool setSelectedRange(Range*, EAffinity, DirectoinalOption directional = Non
Directional, SetSelectionOptions = CloseTyping | ClearTypingStyle); | 110 bool setSelectedRange(Range*, EAffinity, DirectoinalOption directional = Non
Directional, SetSelectionOptions = CloseTyping | ClearTypingStyle); |
| 111 void selectAll(); | 111 void selectAll(); |
| 112 void clear(); | 112 void clear(); |
| 113 void prepareForDestruction(); | 113 void prepareForDestruction(); |
| 114 | 114 |
| 115 // Call this after doing user-triggered selections to make it easy to delete
the frame you entirely selected. | |
| 116 void selectFrameElementInParentIfFullySelected(); | |
| 117 | |
| 118 bool contains(const LayoutPoint&); | 115 bool contains(const LayoutPoint&); |
| 119 | 116 |
| 120 SelectionType selectionType() const { return m_selection.selectionType(); } | 117 SelectionType selectionType() const { return m_selection.selectionType(); } |
| 121 | 118 |
| 122 EAffinity affinity() const { return m_selection.affinity(); } | 119 EAffinity affinity() const { return m_selection.affinity(); } |
| 123 | 120 |
| 124 bool modify(EAlteration, SelectionDirection, TextGranularity, EUserTriggered
= NotUserTriggered); | 121 bool modify(EAlteration, SelectionDirection, TextGranularity, EUserTriggered
= NotUserTriggered); |
| 125 enum VerticalDirection { DirectionUp, DirectionDown }; | 122 enum VerticalDirection { DirectionUp, DirectionDown }; |
| 126 bool modify(EAlteration, unsigned verticalDistance, VerticalDirection, EUser
Triggered = NotUserTriggered, CursorAlignOnScroll = AlignCursorOnScrollIfNeeded)
; | 123 bool modify(EAlteration, unsigned verticalDistance, VerticalDirection, EUser
Triggered = NotUserTriggered, CursorAlignOnScroll = AlignCursorOnScrollIfNeeded)
; |
| 127 | 124 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 } | 285 } |
| 289 } // namespace blink | 286 } // namespace blink |
| 290 | 287 |
| 291 #ifndef NDEBUG | 288 #ifndef NDEBUG |
| 292 // Outside the WebCore namespace for ease of invocation from gdb. | 289 // Outside the WebCore namespace for ease of invocation from gdb. |
| 293 void showTree(const blink::FrameSelection&); | 290 void showTree(const blink::FrameSelection&); |
| 294 void showTree(const blink::FrameSelection*); | 291 void showTree(const blink::FrameSelection*); |
| 295 #endif | 292 #endif |
| 296 | 293 |
| 297 #endif // SKY_ENGINE_CORE_EDITING_FRAMESELECTION_H_ | 294 #endif // SKY_ENGINE_CORE_EDITING_FRAMESELECTION_H_ |
| OLD | NEW |