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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class Text; | 46 class Text; |
47 class VisiblePosition; | 47 class VisiblePosition; |
48 | 48 |
49 enum EUserTriggered { NotUserTriggered = 0, UserTriggered = 1 }; | 49 enum EUserTriggered { NotUserTriggered = 0, UserTriggered = 1 }; |
50 | 50 |
51 enum RevealExtentOption { | 51 enum RevealExtentOption { |
52 RevealExtent, | 52 RevealExtent, |
53 DoNotRevealExtent | 53 DoNotRevealExtent |
54 }; | 54 }; |
55 | 55 |
56 class FrameSelection FINAL : public NoBaseWillBeGarbageCollectedFinalized<FrameS
election>, public VisibleSelection::ChangeObserver, private CaretBase { | 56 class FrameSelection final : public NoBaseWillBeGarbageCollectedFinalized<FrameS
election>, public VisibleSelection::ChangeObserver, private CaretBase { |
57 WTF_MAKE_NONCOPYABLE(FrameSelection); | 57 WTF_MAKE_NONCOPYABLE(FrameSelection); |
58 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 58 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
59 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FrameSelection); | 59 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FrameSelection); |
60 public: | 60 public: |
61 static PassOwnPtrWillBeRawPtr<FrameSelection> create(LocalFrame* frame = 0) | 61 static PassOwnPtrWillBeRawPtr<FrameSelection> create(LocalFrame* frame = 0) |
62 { | 62 { |
63 return adoptPtrWillBeNoop(new FrameSelection(frame)); | 63 return adoptPtrWillBeNoop(new FrameSelection(frame)); |
64 } | 64 } |
65 virtual ~FrameSelection(); | 65 virtual ~FrameSelection(); |
66 | 66 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 FloatRect bounds() const; | 204 FloatRect bounds() const; |
205 | 205 |
206 HTMLFormElement* currentForm() const; | 206 HTMLFormElement* currentForm() const; |
207 | 207 |
208 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIf
Needed, RevealExtentOption = DoNotRevealExtent); | 208 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIf
Needed, RevealExtentOption = DoNotRevealExtent); |
209 void setSelectionFromNone(); | 209 void setSelectionFromNone(); |
210 | 210 |
211 void setShouldShowBlockCursor(bool); | 211 void setShouldShowBlockCursor(bool); |
212 | 212 |
213 // VisibleSelection::ChangeObserver interface. | 213 // VisibleSelection::ChangeObserver interface. |
214 virtual void didChangeVisibleSelection() OVERRIDE; | 214 virtual void didChangeVisibleSelection() override; |
215 | 215 |
216 virtual void trace(Visitor*) OVERRIDE; | 216 virtual void trace(Visitor*) override; |
217 | 217 |
218 private: | 218 private: |
219 explicit FrameSelection(LocalFrame*); | 219 explicit FrameSelection(LocalFrame*); |
220 | 220 |
221 enum EPositionType { START, END, BASE, EXTENT }; | 221 enum EPositionType { START, END, BASE, EXTENT }; |
222 | 222 |
223 void respondToNodeModification(Node&, bool baseRemoved, bool extentRemoved,
bool startRemoved, bool endRemoved); | 223 void respondToNodeModification(Node&, bool baseRemoved, bool extentRemoved,
bool startRemoved, bool endRemoved); |
224 TextDirection directionOfEnclosingBlock(); | 224 TextDirection directionOfEnclosingBlock(); |
225 TextDirection directionOfSelection(); | 225 TextDirection directionOfSelection(); |
226 | 226 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 } | 306 } |
307 } // namespace blink | 307 } // namespace blink |
308 | 308 |
309 #ifndef NDEBUG | 309 #ifndef NDEBUG |
310 // Outside the WebCore namespace for ease of invocation from gdb. | 310 // Outside the WebCore namespace for ease of invocation from gdb. |
311 void showTree(const blink::FrameSelection&); | 311 void showTree(const blink::FrameSelection&); |
312 void showTree(const blink::FrameSelection*); | 312 void showTree(const blink::FrameSelection*); |
313 #endif | 313 #endif |
314 | 314 |
315 #endif // FrameSelection_h | 315 #endif // FrameSelection_h |
OLD | NEW |