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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 Element* rootEditableElement() const { return selection().rootEditableElemen
t(); } | 97 Element* rootEditableElement() const { return selection().rootEditableElemen
t(); } |
98 Element* rootEditableElementOrDocumentElement() const; | 98 Element* rootEditableElementOrDocumentElement() const; |
99 ContainerNode* rootEditableElementOrTreeScopeRootNode() const; | 99 ContainerNode* rootEditableElementOrTreeScopeRootNode() const; |
100 | 100 |
101 bool hasEditableStyle() const { return selection().hasEditableStyle(); } | 101 bool hasEditableStyle() const { return selection().hasEditableStyle(); } |
102 bool isContentEditable() const { return selection().isContentEditable(); } | 102 bool isContentEditable() const { return selection().isContentEditable(); } |
103 bool isContentRichlyEditable() const { return selection().isContentRichlyEdi
table(); } | 103 bool isContentRichlyEditable() const { return selection().isContentRichlyEdi
table(); } |
104 | 104 |
105 void moveTo(const VisiblePosition&, EUserTriggered = NotUserTriggered, Curso
rAlignOnScroll = CursorAlignOnScroll::IfNeeded); | 105 void moveTo(const VisiblePosition&, EUserTriggered = NotUserTriggered, Curso
rAlignOnScroll = CursorAlignOnScroll::IfNeeded); |
106 void moveTo(const VisiblePosition&, const VisiblePosition&, EUserTriggered =
NotUserTriggered); | 106 void moveTo(const VisiblePosition&, const VisiblePosition&, EUserTriggered =
NotUserTriggered); |
107 void moveTo(const Position&, TextAffinity, EUserTriggered = NotUserTriggered
); | 107 void moveTo(const Position&, TextAffinity); |
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); } |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 } | 318 } |
319 } // namespace blink | 319 } // namespace blink |
320 | 320 |
321 #ifndef NDEBUG | 321 #ifndef NDEBUG |
322 // Outside the WebCore namespace for ease of invocation from gdb. | 322 // Outside the WebCore namespace for ease of invocation from gdb. |
323 void showTree(const blink::FrameSelection&); | 323 void showTree(const blink::FrameSelection&); |
324 void showTree(const blink::FrameSelection*); | 324 void showTree(const blink::FrameSelection*); |
325 #endif | 325 #endif |
326 | 326 |
327 #endif // FrameSelection_h | 327 #endif // FrameSelection_h |
OLD | NEW |