| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004 Apple Computer, 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 29 matching lines...) Expand all Loading... |
| 40 enum SelectionDirection { DirectionForward, DirectionBackward, DirectionRight, D
irectionLeft }; | 40 enum SelectionDirection { DirectionForward, DirectionBackward, DirectionRight, D
irectionLeft }; |
| 41 | 41 |
| 42 class CORE_EXPORT VisibleSelection { | 42 class CORE_EXPORT VisibleSelection { |
| 43 DISALLOW_ALLOCATION(); | 43 DISALLOW_ALLOCATION(); |
| 44 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(VisibleSelection); | 44 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(VisibleSelection); |
| 45 public: | 45 public: |
| 46 class InDOMTree { | 46 class InDOMTree { |
| 47 public: | 47 public: |
| 48 using PositionType = Position; | 48 using PositionType = Position; |
| 49 | 49 |
| 50 static bool equalSelections(const VisibleSelection&, const VisibleSelect
ion&); |
| 50 static PositionType selectionBase(const VisibleSelection& selection) { r
eturn selection.base(); } | 51 static PositionType selectionBase(const VisibleSelection& selection) { r
eturn selection.base(); } |
| 51 static PositionType selectionExtent(const VisibleSelection& selection) {
return selection.extent(); } | 52 static PositionType selectionExtent(const VisibleSelection& selection) {
return selection.extent(); } |
| 52 static PositionType selectionStart(const VisibleSelection& selection) {
return selection.start(); } | 53 static PositionType selectionStart(const VisibleSelection& selection) {
return selection.start(); } |
| 53 static PositionType selectionEnd(const VisibleSelection& selection) { re
turn selection.end(); } | 54 static PositionType selectionEnd(const VisibleSelection& selection) { re
turn selection.end(); } |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 VisibleSelection(); | 57 VisibleSelection(); |
| 57 | 58 |
| 58 VisibleSelection(const Position&, EAffinity, bool isDirectional = false); | 59 VisibleSelection(const Position&, EAffinity, bool isDirectional = false); |
| 59 VisibleSelection(const Position&, const Position&, EAffinity = SEL_DEFAULT_A
FFINITY, bool isDirectional = false); | 60 VisibleSelection(const Position&, const Position&, EAffinity = SEL_DEFAULT_A
FFINITY, bool isDirectional = false); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 210 |
| 210 } // namespace blink | 211 } // namespace blink |
| 211 | 212 |
| 212 #ifndef NDEBUG | 213 #ifndef NDEBUG |
| 213 // Outside the WebCore namespace for ease of invocation from gdb. | 214 // Outside the WebCore namespace for ease of invocation from gdb. |
| 214 void showTree(const blink::VisibleSelection&); | 215 void showTree(const blink::VisibleSelection&); |
| 215 void showTree(const blink::VisibleSelection*); | 216 void showTree(const blink::VisibleSelection*); |
| 216 #endif | 217 #endif |
| 217 | 218 |
| 218 #endif // VisibleSelection_h | 219 #endif // VisibleSelection_h |
| OLD | NEW |