OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 return new FrameSelection(frame); | 80 return new FrameSelection(frame); |
81 } | 81 } |
82 ~FrameSelection(); | 82 ~FrameSelection(); |
83 | 83 |
84 enum EAlteration { AlterationMove, AlterationExtend }; | 84 enum EAlteration { AlterationMove, AlterationExtend }; |
85 enum SetSelectionOption { | 85 enum SetSelectionOption { |
86 // 1 << 0 is reserved for EUserTriggered | 86 // 1 << 0 is reserved for EUserTriggered |
87 CloseTyping = 1 << 1, | 87 CloseTyping = 1 << 1, |
88 ClearTypingStyle = 1 << 2, | 88 ClearTypingStyle = 1 << 2, |
89 DoNotSetFocus = 1 << 3, | 89 DoNotSetFocus = 1 << 3, |
90 DoNotUpdateAppearance = 1 << 4, | 90 DoNotClearStrategy = 1 << 4, |
91 DoNotClearStrategy = 1 << 5, | |
92 }; | 91 }; |
93 // Union of values in SetSelectionOption and EUserTriggered | 92 // Union of values in SetSelectionOption and EUserTriggered |
94 typedef unsigned SetSelectionOptions; | 93 typedef unsigned SetSelectionOptions; |
95 static inline EUserTriggered selectionOptionsToUserTriggered( | 94 static inline EUserTriggered selectionOptionsToUserTriggered( |
96 SetSelectionOptions options) { | 95 SetSelectionOptions options) { |
97 return static_cast<EUserTriggered>(options & UserTriggered); | 96 return static_cast<EUserTriggered>(options & UserTriggered); |
98 } | 97 } |
99 | 98 |
100 bool isAvailable() const { return lifecycleContext(); } | 99 bool isAvailable() const { return lifecycleContext(); } |
101 // You should not call |document()| when |!isAvailable()|. | 100 // You should not call |document()| when |!isAvailable()|. |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 357 |
359 } // namespace blink | 358 } // namespace blink |
360 | 359 |
361 #ifndef NDEBUG | 360 #ifndef NDEBUG |
362 // Outside the WebCore namespace for ease of invocation from gdb. | 361 // Outside the WebCore namespace for ease of invocation from gdb. |
363 void showTree(const blink::FrameSelection&); | 362 void showTree(const blink::FrameSelection&); |
364 void showTree(const blink::FrameSelection*); | 363 void showTree(const blink::FrameSelection*); |
365 #endif | 364 #endif |
366 | 365 |
367 #endif // FrameSelection_h | 366 #endif // FrameSelection_h |
OLD | NEW |