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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 VisibleSelectionTemplate(const VisibleSelectionTemplate&); | 58 VisibleSelectionTemplate(const VisibleSelectionTemplate&); |
59 VisibleSelectionTemplate& operator=(const VisibleSelectionTemplate&); | 59 VisibleSelectionTemplate& operator=(const VisibleSelectionTemplate&); |
60 | 60 |
61 // Note: |create()| should be used only by |createVisibleSelection|. | 61 // Note: |create()| should be used only by |createVisibleSelection|. |
62 static VisibleSelectionTemplate Create(const SelectionTemplate<Strategy>&); | 62 static VisibleSelectionTemplate Create(const SelectionTemplate<Strategy>&); |
63 | 63 |
64 SelectionType GetSelectionType() const { return selection_type_; } | 64 SelectionType GetSelectionType() const { return selection_type_; } |
65 | 65 |
66 TextAffinity Affinity() const { return affinity_; } | 66 TextAffinity Affinity() const { return affinity_; } |
67 | 67 |
68 SelectionTemplate<Strategy> AsSelection() const; | 68 SelectionTemplate<Strategy> AsSelection(bool is_handle_visible = false) const; |
69 PositionTemplate<Strategy> Base() const { return base_; } | 69 PositionTemplate<Strategy> Base() const { return base_; } |
70 PositionTemplate<Strategy> Extent() const { return extent_; } | 70 PositionTemplate<Strategy> Extent() const { return extent_; } |
71 PositionTemplate<Strategy> Start() const { return start_; } | 71 PositionTemplate<Strategy> Start() const { return start_; } |
72 PositionTemplate<Strategy> end() const { return end_; } | 72 PositionTemplate<Strategy> end() const { return end_; } |
73 | 73 |
74 VisiblePositionTemplate<Strategy> VisibleStart() const { | 74 VisiblePositionTemplate<Strategy> VisibleStart() const { |
75 return CreateVisiblePosition( | 75 return CreateVisiblePosition( |
76 start_, IsRange() ? TextAffinity::kDownstream : Affinity()); | 76 start_, IsRange() ? TextAffinity::kDownstream : Affinity()); |
77 } | 77 } |
78 VisiblePositionTemplate<Strategy> VisibleEnd() const { | 78 VisiblePositionTemplate<Strategy> VisibleEnd() const { |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 #ifndef NDEBUG | 205 #ifndef NDEBUG |
206 // Outside the WebCore namespace for ease of invocation from gdb. | 206 // Outside the WebCore namespace for ease of invocation from gdb. |
207 void showTree(const blink::VisibleSelection&); | 207 void showTree(const blink::VisibleSelection&); |
208 void showTree(const blink::VisibleSelection*); | 208 void showTree(const blink::VisibleSelection*); |
209 void showTree(const blink::VisibleSelectionInFlatTree&); | 209 void showTree(const blink::VisibleSelectionInFlatTree&); |
210 void showTree(const blink::VisibleSelectionInFlatTree*); | 210 void showTree(const blink::VisibleSelectionInFlatTree*); |
211 #endif | 211 #endif |
212 | 212 |
213 #endif // VisibleSelection_h | 213 #endif // VisibleSelection_h |
OLD | NEW |