| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 Document& document(); | 100 Document& document(); |
| 101 LocalFrame* frame() const { return m_frame; } | 101 LocalFrame* frame() const { return m_frame; } |
| 102 Element* rootEditableElement() const { return selection().rootEditableElemen
t(); } | 102 Element* rootEditableElement() const { return selection().rootEditableElemen
t(); } |
| 103 Element* rootEditableElementOrDocumentElement() const; | 103 Element* rootEditableElementOrDocumentElement() const; |
| 104 ContainerNode* rootEditableElementOrTreeScopeRootNode() const; | 104 ContainerNode* rootEditableElementOrTreeScopeRootNode() const; |
| 105 | 105 |
| 106 bool hasEditableStyle() const { return selection().hasEditableStyle(); } | 106 bool hasEditableStyle() const { return selection().hasEditableStyle(); } |
| 107 bool isContentEditable() const { return selection().isContentEditable(); } | 107 bool isContentEditable() const { return selection().isContentEditable(); } |
| 108 bool isContentRichlyEditable() const { return selection().isContentRichlyEdi
table(); } | 108 bool isContentRichlyEditable() const { return selection().isContentRichlyEdi
table(); } |
| 109 | 109 |
| 110 // TODO(xiaochengh): Remove the |moveTo(VisiblePosition)| overload. |
| 110 void moveTo(const VisiblePosition&, EUserTriggered = NotUserTriggered, Curso
rAlignOnScroll = CursorAlignOnScroll::IfNeeded); | 111 void moveTo(const VisiblePosition&, EUserTriggered = NotUserTriggered, Curso
rAlignOnScroll = CursorAlignOnScroll::IfNeeded); |
| 111 void moveTo(const Position&, TextAffinity); | 112 void moveTo(const Position&, TextAffinity); |
| 112 | 113 |
| 113 template <typename Strategy> | 114 template <typename Strategy> |
| 114 const VisibleSelectionTemplate<Strategy>& visibleSelection() const; | 115 const VisibleSelectionTemplate<Strategy>& visibleSelection() const; |
| 115 | 116 |
| 116 const VisibleSelection& selection() const; | 117 const VisibleSelection& selection() const; |
| 117 void setSelection(const VisibleSelection&, SetSelectionOptions = CloseTyping
| ClearTypingStyle, CursorAlignOnScroll = CursorAlignOnScroll::IfNeeded, TextGr
anularity = CharacterGranularity); | 118 void setSelection(const VisibleSelection&, SetSelectionOptions = CloseTyping
| ClearTypingStyle, CursorAlignOnScroll = CursorAlignOnScroll::IfNeeded, TextGr
anularity = CharacterGranularity); |
| 118 void setSelection(const VisibleSelectionInFlatTree&, SetSelectionOptions = C
loseTyping | ClearTypingStyle, CursorAlignOnScroll = CursorAlignOnScroll::IfNeed
ed, TextGranularity = CharacterGranularity); | 119 void setSelection(const VisibleSelectionInFlatTree&, SetSelectionOptions = C
loseTyping | ClearTypingStyle, CursorAlignOnScroll = CursorAlignOnScroll::IfNeed
ed, TextGranularity = CharacterGranularity); |
| 119 // TODO(yosin) We should get rid of two parameters version of | 120 // TODO(yosin) We should get rid of two parameters version of |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 } | 321 } |
| 321 } // namespace blink | 322 } // namespace blink |
| 322 | 323 |
| 323 #ifndef NDEBUG | 324 #ifndef NDEBUG |
| 324 // Outside the WebCore namespace for ease of invocation from gdb. | 325 // Outside the WebCore namespace for ease of invocation from gdb. |
| 325 void showTree(const blink::FrameSelection&); | 326 void showTree(const blink::FrameSelection&); |
| 326 void showTree(const blink::FrameSelection*); | 327 void showTree(const blink::FrameSelection*); |
| 327 #endif | 328 #endif |
| 328 | 329 |
| 329 #endif // FrameSelection_h | 330 #endif // FrameSelection_h |
| OLD | NEW |