| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // Call this after doing user-triggered selections to make it easy to delete | 162 // Call this after doing user-triggered selections to make it easy to delete |
| 163 // the frame you entirely selected. | 163 // the frame you entirely selected. |
| 164 void selectFrameElementInParentIfFullySelected(); | 164 void selectFrameElementInParentIfFullySelected(); |
| 165 | 165 |
| 166 bool contains(const LayoutPoint&); | 166 bool contains(const LayoutPoint&); |
| 167 | 167 |
| 168 SelectionType getSelectionType() const { | 168 SelectionType getSelectionType() const { |
| 169 return selection().getSelectionType(); | 169 return selection().getSelectionType(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 TextAffinity affinity() const { return selection().affinity(); } | 172 TextAffinity affinity() const { return selectionInDOMTree().affinity(); } |
| 173 | 173 |
| 174 bool modify(EAlteration, | 174 bool modify(EAlteration, |
| 175 SelectionDirection, | 175 SelectionDirection, |
| 176 TextGranularity, | 176 TextGranularity, |
| 177 EUserTriggered = NotUserTriggered); | 177 EUserTriggered = NotUserTriggered); |
| 178 enum VerticalDirection { DirectionUp, DirectionDown }; | 178 enum VerticalDirection { DirectionUp, DirectionDown }; |
| 179 bool modify(EAlteration, unsigned verticalDistance, VerticalDirection); | 179 bool modify(EAlteration, unsigned verticalDistance, VerticalDirection); |
| 180 | 180 |
| 181 // Moves the selection extent based on the selection granularity strategy. | 181 // Moves the selection extent based on the selection granularity strategy. |
| 182 // This function does not allow the selection to collapse. If the new | 182 // This function does not allow the selection to collapse. If the new |
| (...skipping 14 matching lines...) Expand all Loading... |
| 197 // Returns true if specified layout block should paint caret. This function is | 197 // Returns true if specified layout block should paint caret. This function is |
| 198 // called during painting only. | 198 // called during painting only. |
| 199 bool shouldPaintCaret(const LayoutBlock&) const; | 199 bool shouldPaintCaret(const LayoutBlock&) const; |
| 200 | 200 |
| 201 // Bounds of (possibly transformed) caret in absolute coords | 201 // Bounds of (possibly transformed) caret in absolute coords |
| 202 IntRect absoluteCaretBounds(); | 202 IntRect absoluteCaretBounds(); |
| 203 | 203 |
| 204 void didChangeFocus(); | 204 void didChangeFocus(); |
| 205 | 205 |
| 206 const SelectionInDOMTree& selectionInDOMTree() const; | 206 const SelectionInDOMTree& selectionInDOMTree() const; |
| 207 // TODO(yosin): We should rename |isNone()| to |isVisibleNone()|. | |
| 208 bool isNone() const { return selection().isNone(); } | 207 bool isNone() const { return selection().isNone(); } |
| 209 bool isCaret() const { return selection().isCaret(); } | 208 bool isCaret() const { return selection().isCaret(); } |
| 210 bool isRange() const { return selection().isRange(); } | 209 bool isRange() const { return selection().isRange(); } |
| 211 bool isInPasswordField() const; | 210 bool isInPasswordField() const; |
| 212 bool isDirectional() const { return selectionInDOMTree().isDirectional(); } | 211 bool isDirectional() const { return selectionInDOMTree().isDirectional(); } |
| 213 | 212 |
| 214 // If this FrameSelection has a logical range which is still valid, this | 213 // If this FrameSelection has a logical range which is still valid, this |
| 215 // function return its clone. Otherwise, the return value from underlying | 214 // function return its clone. Otherwise, the return value from underlying |
| 216 // VisibleSelection's firstRange() is returned. | 215 // VisibleSelection's firstRange() is returned. |
| 217 Range* firstRange() const; | 216 Range* firstRange() const; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 349 |
| 351 } // namespace blink | 350 } // namespace blink |
| 352 | 351 |
| 353 #ifndef NDEBUG | 352 #ifndef NDEBUG |
| 354 // Outside the WebCore namespace for ease of invocation from gdb. | 353 // Outside the WebCore namespace for ease of invocation from gdb. |
| 355 void showTree(const blink::FrameSelection&); | 354 void showTree(const blink::FrameSelection&); |
| 356 void showTree(const blink::FrameSelection*); | 355 void showTree(const blink::FrameSelection*); |
| 357 #endif | 356 #endif |
| 358 | 357 |
| 359 #endif // FrameSelection_h | 358 #endif // FrameSelection_h |
| OLD | NEW |