| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 bool isNone() const { return m_selection.isNone(); } | 145 bool isNone() const { return m_selection.isNone(); } |
| 146 bool isCaret() const { return m_selection.isCaret(); } | 146 bool isCaret() const { return m_selection.isCaret(); } |
| 147 bool isRange() const { return m_selection.isRange(); } | 147 bool isRange() const { return m_selection.isRange(); } |
| 148 bool isCaretOrRange() const { return m_selection.isCaretOrRange(); } | 148 bool isCaretOrRange() const { return m_selection.isCaretOrRange(); } |
| 149 bool isInPasswordField() const; | 149 bool isInPasswordField() const; |
| 150 bool isAll(EditingBoundaryCrossingRule rule = CannotCrossEditingBoundary) co
nst { return m_selection.isAll(rule); } | 150 bool isAll(EditingBoundaryCrossingRule rule = CannotCrossEditingBoundary) co
nst { return m_selection.isAll(rule); } |
| 151 | 151 |
| 152 PassRefPtr<Range> toNormalizedRange() const { return m_selection.toNormalize
dRange(); } | 152 PassRefPtr<Range> toNormalizedRange() const { return m_selection.toNormalize
dRange(); } |
| 153 | 153 |
| 154 void nodeWillBeRemoved(Node*); | 154 void nodeWillBeRemoved(Node&); |
| 155 void didUpdateCharacterData(CharacterData*, unsigned offset, unsigned oldLen
gth, unsigned newLength); | 155 void didUpdateCharacterData(CharacterData*, unsigned offset, unsigned oldLen
gth, unsigned newLength); |
| 156 void didMergeTextNodes(const Text& oldNode, unsigned offset); | 156 void didMergeTextNodes(const Text& oldNode, unsigned offset); |
| 157 void didSplitTextNode(const Text& oldNode); | 157 void didSplitTextNode(const Text& oldNode); |
| 158 | 158 |
| 159 void setCaretVisible(bool caretIsVisible) { setCaretVisibility(caretIsVisibl
e ? Visible : Hidden); } | 159 void setCaretVisible(bool caretIsVisible) { setCaretVisibility(caretIsVisibl
e ? Visible : Hidden); } |
| 160 bool recomputeCaretRect(); | 160 bool recomputeCaretRect(); |
| 161 void invalidateCaretRect(); | 161 void invalidateCaretRect(); |
| 162 void paintCaret(GraphicsContext*, const LayoutPoint&, const LayoutRect& clip
Rect); | 162 void paintCaret(GraphicsContext*, const LayoutPoint&, const LayoutRect& clip
Rect); |
| 163 | 163 |
| 164 // Used to suspend caret blinking while the mouse is down. | 164 // Used to suspend caret blinking while the mouse is down. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIf
Needed, RevealExtentOption = DoNotRevealExtent); | 203 void revealSelection(const ScrollAlignment& = ScrollAlignment::alignCenterIf
Needed, RevealExtentOption = DoNotRevealExtent); |
| 204 void setSelectionFromNone(); | 204 void setSelectionFromNone(); |
| 205 | 205 |
| 206 bool shouldShowBlockCursor() const { return m_shouldShowBlockCursor; } | 206 bool shouldShowBlockCursor() const { return m_shouldShowBlockCursor; } |
| 207 void setShouldShowBlockCursor(bool); | 207 void setShouldShowBlockCursor(bool); |
| 208 | 208 |
| 209 private: | 209 private: |
| 210 enum EPositionType { START, END, BASE, EXTENT }; | 210 enum EPositionType { START, END, BASE, EXTENT }; |
| 211 | 211 |
| 212 void respondToNodeModification(Node*, bool baseRemoved, bool extentRemoved,
bool startRemoved, bool endRemoved); | 212 void respondToNodeModification(Node&, bool baseRemoved, bool extentRemoved,
bool startRemoved, bool endRemoved); |
| 213 TextDirection directionOfEnclosingBlock(); | 213 TextDirection directionOfEnclosingBlock(); |
| 214 TextDirection directionOfSelection(); | 214 TextDirection directionOfSelection(); |
| 215 | 215 |
| 216 VisiblePosition positionForPlatform(bool isGetStart) const; | 216 VisiblePosition positionForPlatform(bool isGetStart) const; |
| 217 VisiblePosition startForPlatform() const; | 217 VisiblePosition startForPlatform() const; |
| 218 VisiblePosition endForPlatform() const; | 218 VisiblePosition endForPlatform() const; |
| 219 VisiblePosition nextWordPositionForPlatform(const VisiblePosition&); | 219 VisiblePosition nextWordPositionForPlatform(const VisiblePosition&); |
| 220 | 220 |
| 221 VisiblePosition modifyExtendingRight(TextGranularity); | 221 VisiblePosition modifyExtendingRight(TextGranularity); |
| 222 VisiblePosition modifyExtendingForward(TextGranularity); | 222 VisiblePosition modifyExtendingForward(TextGranularity); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 282 } |
| 283 } // namespace WebCore | 283 } // namespace WebCore |
| 284 | 284 |
| 285 #ifndef NDEBUG | 285 #ifndef NDEBUG |
| 286 // Outside the WebCore namespace for ease of invocation from gdb. | 286 // Outside the WebCore namespace for ease of invocation from gdb. |
| 287 void showTree(const WebCore::FrameSelection&); | 287 void showTree(const WebCore::FrameSelection&); |
| 288 void showTree(const WebCore::FrameSelection*); | 288 void showTree(const WebCore::FrameSelection*); |
| 289 #endif | 289 #endif |
| 290 | 290 |
| 291 #endif // FrameSelection_h | 291 #endif // FrameSelection_h |
| OLD | NEW |