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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 bool isContentEditable() const { return m_selection.isContentEditable(); } | 93 bool isContentEditable() const { return m_selection.isContentEditable(); } |
94 bool isContentRichlyEditable() const { return m_selection.isContentRichlyEdi table(); } | 94 bool isContentRichlyEditable() const { return m_selection.isContentRichlyEdi table(); } |
95 | 95 |
96 void moveTo(const VisiblePosition&, EUserTriggered = NotUserTriggered, Curso rAlignOnScroll = AlignCursorOnScrollIfNeeded); | 96 void moveTo(const VisiblePosition&, EUserTriggered = NotUserTriggered, Curso rAlignOnScroll = AlignCursorOnScrollIfNeeded); |
97 void moveTo(const VisiblePosition&, const VisiblePosition&, EUserTriggered = NotUserTriggered); | 97 void moveTo(const VisiblePosition&, const VisiblePosition&, EUserTriggered = NotUserTriggered); |
98 void moveTo(const Position&, EAffinity, EUserTriggered = NotUserTriggered); | 98 void moveTo(const Position&, EAffinity, EUserTriggered = NotUserTriggered); |
99 | 99 |
100 const VisibleSelection& selection() const { return m_selection; } | 100 const VisibleSelection& selection() const { return m_selection; } |
101 void setSelection(const VisibleSelection&, SetSelectionOptions = CloseTyping | ClearTypingStyle, CursorAlignOnScroll = AlignCursorOnScrollIfNeeded, TextGran ularity = CharacterGranularity); | 101 void setSelection(const VisibleSelection&, SetSelectionOptions = CloseTyping | ClearTypingStyle, CursorAlignOnScroll = AlignCursorOnScrollIfNeeded, TextGran ularity = CharacterGranularity); |
102 void setSelection(const VisibleSelection& selection, TextGranularity granula rity) { setSelection(selection, CloseTyping | ClearTypingStyle, AlignCursorOnScr ollIfNeeded, granularity); } | 102 void setSelection(const VisibleSelection& selection, TextGranularity granula rity) { setSelection(selection, CloseTyping | ClearTypingStyle, AlignCursorOnScr ollIfNeeded, granularity); } |
103 bool setSelectedRange(Range*, EAffinity, SetSelectionOptions = CloseTyping | ClearTypingStyle); | 103 bool setSelectedRange(Range*, EAffinity, bool isDirectional = false, SetSele ctionOptions = CloseTyping | ClearTypingStyle); |
tkent
2014/06/09 07:26:22
nit: We should not introduce new bool arguments.
yoichio
2014/06/09 07:38:31
What do you mean?
tkent
2014/06/09 07:44:17
Please refer to the 10th bullet of http://dev.chro
yoichio
2014/06/09 07:46:21
I see. Will fix later:) Thanks.
| |
104 void selectAll(); | 104 void selectAll(); |
105 void clear(); | 105 void clear(); |
106 void prepareForDestruction(); | 106 void prepareForDestruction(); |
107 | 107 |
108 // Call this after doing user-triggered selections to make it easy to delete the frame you entirely selected. | 108 // Call this after doing user-triggered selections to make it easy to delete the frame you entirely selected. |
109 void selectFrameElementInParentIfFullySelected(); | 109 void selectFrameElementInParentIfFullySelected(); |
110 | 110 |
111 bool contains(const LayoutPoint&); | 111 bool contains(const LayoutPoint&); |
112 | 112 |
113 SelectionType selectionType() const { return m_selection.selectionType(); } | 113 SelectionType selectionType() const { return m_selection.selectionType(); } |
(...skipping 28 matching lines...) Expand all Loading... | |
142 void setCaretRectNeedsUpdate() { CaretBase::setCaretRectNeedsUpdate(); } | 142 void setCaretRectNeedsUpdate() { CaretBase::setCaretRectNeedsUpdate(); } |
143 | 143 |
144 void didChangeFocus(); | 144 void didChangeFocus(); |
145 void willBeModified(EAlteration, SelectionDirection); | 145 void willBeModified(EAlteration, SelectionDirection); |
146 | 146 |
147 bool isNone() const { return m_selection.isNone(); } | 147 bool isNone() const { return m_selection.isNone(); } |
148 bool isCaret() const { return m_selection.isCaret(); } | 148 bool isCaret() const { return m_selection.isCaret(); } |
149 bool isRange() const { return m_selection.isRange(); } | 149 bool isRange() const { return m_selection.isRange(); } |
150 bool isCaretOrRange() const { return m_selection.isCaretOrRange(); } | 150 bool isCaretOrRange() const { return m_selection.isCaretOrRange(); } |
151 bool isInPasswordField() const; | 151 bool isInPasswordField() const; |
152 bool isDirectional() const { return m_selection.isDirectional(); } | |
152 | 153 |
153 // If this FrameSelection has a logical range which is still valid, this fun ction return its clone. Otherwise, | 154 // If this FrameSelection has a logical range which is still valid, this fun ction return its clone. Otherwise, |
154 // the return value from underlying VisibleSelection's firstRange() is retur ned. | 155 // the return value from underlying VisibleSelection's firstRange() is retur ned. |
155 PassRefPtrWillBeRawPtr<Range> firstRange() const; | 156 PassRefPtrWillBeRawPtr<Range> firstRange() const; |
156 | 157 |
157 PassRefPtrWillBeRawPtr<Range> toNormalizedRange() const { return m_selection .toNormalizedRange(); } | 158 PassRefPtrWillBeRawPtr<Range> toNormalizedRange() const { return m_selection .toNormalizedRange(); } |
158 | 159 |
159 void nodeWillBeRemoved(Node&); | 160 void nodeWillBeRemoved(Node&); |
160 void didUpdateCharacterData(CharacterData*, unsigned offset, unsigned oldLen gth, unsigned newLength); | 161 void didUpdateCharacterData(CharacterData*, unsigned offset, unsigned oldLen gth, unsigned newLength); |
161 void didMergeTextNodes(const Text& oldNode, unsigned offset); | 162 void didMergeTextNodes(const Text& oldNode, unsigned offset); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
299 } | 300 } |
300 } // namespace WebCore | 301 } // namespace WebCore |
301 | 302 |
302 #ifndef NDEBUG | 303 #ifndef NDEBUG |
303 // Outside the WebCore namespace for ease of invocation from gdb. | 304 // Outside the WebCore namespace for ease of invocation from gdb. |
304 void showTree(const WebCore::FrameSelection&); | 305 void showTree(const WebCore::FrameSelection&); |
305 void showTree(const WebCore::FrameSelection*); | 306 void showTree(const WebCore::FrameSelection*); |
306 #endif | 307 #endif |
307 | 308 |
308 #endif // FrameSelection_h | 309 #endif // FrameSelection_h |
OLD | NEW |