| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 WTF_MAKE_FAST_ALLOCATED; | 108 WTF_MAKE_FAST_ALLOCATED; |
| 109 public: | 109 public: |
| 110 enum EAlteration { AlterationMove, AlterationExtend }; | 110 enum EAlteration { AlterationMove, AlterationExtend }; |
| 111 enum CursorAlignOnScroll { AlignCursorOnScrollIfNeeded, | 111 enum CursorAlignOnScroll { AlignCursorOnScrollIfNeeded, |
| 112 AlignCursorOnScrollAlways }; | 112 AlignCursorOnScrollAlways }; |
| 113 enum SetSelectionOption { | 113 enum SetSelectionOption { |
| 114 // 1 << 0 is reserved for EUserTriggered | 114 // 1 << 0 is reserved for EUserTriggered |
| 115 CloseTyping = 1 << 1, | 115 CloseTyping = 1 << 1, |
| 116 ClearTypingStyle = 1 << 2, | 116 ClearTypingStyle = 1 << 2, |
| 117 SpellCorrectionTriggered = 1 << 3, | 117 SpellCorrectionTriggered = 1 << 3, |
| 118 DoNotSetFocus = 1 << 4, |
| 118 }; | 119 }; |
| 119 typedef unsigned SetSelectionOptions; // Union of values in SetSelectionOpti
on and EUserTriggered | 120 typedef unsigned SetSelectionOptions; // Union of values in SetSelectionOpti
on and EUserTriggered |
| 120 static inline EUserTriggered selectionOptionsToUserTriggered(SetSelectionOpt
ions options) | 121 static inline EUserTriggered selectionOptionsToUserTriggered(SetSelectionOpt
ions options) |
| 121 { | 122 { |
| 122 return static_cast<EUserTriggered>(options & UserTriggered); | 123 return static_cast<EUserTriggered>(options & UserTriggered); |
| 123 } | 124 } |
| 124 | 125 |
| 125 FrameSelection(Frame* = 0); | 126 FrameSelection(Frame* = 0); |
| 126 | 127 |
| 127 Element* rootEditableElement() const { return m_selection.rootEditableElemen
t(); } | 128 Element* rootEditableElement() const { return m_selection.rootEditableElemen
t(); } |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 } // namespace WebCore | 318 } // namespace WebCore |
| 318 | 319 |
| 319 #ifndef NDEBUG | 320 #ifndef NDEBUG |
| 320 // Outside the WebCore namespace for ease of invocation from gdb. | 321 // Outside the WebCore namespace for ease of invocation from gdb. |
| 321 void showTree(const WebCore::FrameSelection&); | 322 void showTree(const WebCore::FrameSelection&); |
| 322 void showTree(const WebCore::FrameSelection*); | 323 void showTree(const WebCore::FrameSelection*); |
| 323 #endif | 324 #endif |
| 324 | 325 |
| 325 #endif // FrameSelection_h | 326 #endif // FrameSelection_h |
| 326 | 327 |
| OLD | NEW |