| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 bool equalSelections(const VisibleSelection&, const VisibleSelect
ion&); |
| 51 static PositionType selectionBase(const VisibleSelection& selection) { r
eturn selection.base(); } | 51 static PositionType selectionBase(const VisibleSelection& selection) { r
eturn selection.base(); } |
| 52 static PositionType selectionExtent(const VisibleSelection& selection) {
return selection.extent(); } | 52 static PositionType selectionExtent(const VisibleSelection& selection) {
return selection.extent(); } |
| 53 static PositionType selectionStart(const VisibleSelection& selection) {
return selection.start(); } | 53 static PositionType selectionStart(const VisibleSelection& selection) {
return selection.start(); } |
| 54 static PositionType selectionEnd(const VisibleSelection& selection) { re
turn selection.end(); } | 54 static PositionType selectionEnd(const VisibleSelection& selection) { re
turn selection.end(); } |
| 55 static VisiblePosition selectionVisibleStart(const VisibleSelection& sel
ection) { return selection.visibleStart(); } | 55 static VisiblePosition selectionVisibleStart(const VisibleSelection& sel
ection) { return selection.visibleStart(); } |
| 56 static VisiblePosition selectionVisibleEnd(const VisibleSelection& selec
tion) { return selection.visibleEnd(); } | 56 static VisiblePosition selectionVisibleEnd(const VisibleSelection& selec
tion) { return selection.visibleEnd(); } |
| 57 static PositionType toPositionType(const Position& position) { return po
sition; } |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 VisibleSelection(); | 60 VisibleSelection(); |
| 60 | 61 |
| 61 VisibleSelection(const Position&, EAffinity, bool isDirectional = false); | 62 VisibleSelection(const Position&, EAffinity, bool isDirectional = false); |
| 62 VisibleSelection(const Position&, const Position&, EAffinity = SEL_DEFAULT_A
FFINITY, bool isDirectional = false); | 63 VisibleSelection(const Position&, const Position&, EAffinity = SEL_DEFAULT_A
FFINITY, bool isDirectional = false); |
| 63 | 64 |
| 64 explicit VisibleSelection(const Range*, EAffinity = SEL_DEFAULT_AFFINITY, bo
ol isDirectional = false); | 65 explicit VisibleSelection(const Range*, EAffinity = SEL_DEFAULT_AFFINITY, bo
ol isDirectional = false); |
| 65 | 66 |
| 66 explicit VisibleSelection(const VisiblePosition&, bool isDirectional = false
); | 67 explicit VisibleSelection(const VisiblePosition&, bool isDirectional = false
); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 213 |
| 213 } // namespace blink | 214 } // namespace blink |
| 214 | 215 |
| 215 #ifndef NDEBUG | 216 #ifndef NDEBUG |
| 216 // Outside the WebCore namespace for ease of invocation from gdb. | 217 // Outside the WebCore namespace for ease of invocation from gdb. |
| 217 void showTree(const blink::VisibleSelection&); | 218 void showTree(const blink::VisibleSelection&); |
| 218 void showTree(const blink::VisibleSelection*); | 219 void showTree(const blink::VisibleSelection*); |
| 219 #endif | 220 #endif |
| 220 | 221 |
| 221 #endif // VisibleSelection_h | 222 #endif // VisibleSelection_h |
| OLD | NEW |