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