| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 template <typename Strategy> | 53 template <typename Strategy> |
| 54 class CORE_TEMPLATE_CLASS_EXPORT VisibleSelectionTemplate { | 54 class CORE_TEMPLATE_CLASS_EXPORT VisibleSelectionTemplate { |
| 55 DISALLOW_NEW(); | 55 DISALLOW_NEW(); |
| 56 | 56 |
| 57 public: | 57 public: |
| 58 VisibleSelectionTemplate(); | 58 VisibleSelectionTemplate(); |
| 59 VisibleSelectionTemplate(const VisibleSelectionTemplate&); | 59 VisibleSelectionTemplate(const VisibleSelectionTemplate&); |
| 60 VisibleSelectionTemplate& operator=(const VisibleSelectionTemplate&); | 60 VisibleSelectionTemplate& operator=(const VisibleSelectionTemplate&); |
| 61 | 61 |
| 62 // Note: |create()| should be used only by |createVisibleSelection| and | 62 // Note: |create()| should be used only by |createVisibleSelection|. |
| 63 // |selectionFromContentsOfNode|. | |
| 64 static VisibleSelectionTemplate create(const SelectionTemplate<Strategy>&); | 63 static VisibleSelectionTemplate create(const SelectionTemplate<Strategy>&); |
| 65 | 64 |
| 66 // TODO(editing-dev): We should get rid of this function and instead, use | |
| 67 // EphemeralRangeTemplate::rangeOfContents and SelectionTemplate::Builder. | |
| 68 static VisibleSelectionTemplate selectionFromContentsOfNode(Node*); | |
| 69 | |
| 70 SelectionType getSelectionType() const { return m_selectionType; } | 65 SelectionType getSelectionType() const { return m_selectionType; } |
| 71 | 66 |
| 72 void setAffinity(TextAffinity affinity) { m_affinity = affinity; } | 67 void setAffinity(TextAffinity affinity) { m_affinity = affinity; } |
| 73 TextAffinity affinity() const { return m_affinity; } | 68 TextAffinity affinity() const { return m_affinity; } |
| 74 | 69 |
| 75 // TODO(yosin): To make |VisibleSelection| as immutable object, we should | 70 // TODO(yosin): To make |VisibleSelection| as immutable object, we should |
| 76 // get rid of |setBase()| and |setExtent()| by replacing them with | 71 // get rid of |setBase()| and |setExtent()| by replacing them with |
| 77 // |createVisibleSelection()|. | 72 // |createVisibleSelection()|. |
| 78 void setBase(const PositionTemplate<Strategy>&); | 73 void setBase(const PositionTemplate<Strategy>&); |
| 79 void setBase(const VisiblePositionTemplate<Strategy>&); | 74 void setBase(const VisiblePositionTemplate<Strategy>&); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 250 |
| 256 #ifndef NDEBUG | 251 #ifndef NDEBUG |
| 257 // Outside the WebCore namespace for ease of invocation from gdb. | 252 // Outside the WebCore namespace for ease of invocation from gdb. |
| 258 void showTree(const blink::VisibleSelection&); | 253 void showTree(const blink::VisibleSelection&); |
| 259 void showTree(const blink::VisibleSelection*); | 254 void showTree(const blink::VisibleSelection*); |
| 260 void showTree(const blink::VisibleSelectionInFlatTree&); | 255 void showTree(const blink::VisibleSelectionInFlatTree&); |
| 261 void showTree(const blink::VisibleSelectionInFlatTree*); | 256 void showTree(const blink::VisibleSelectionInFlatTree*); |
| 262 #endif | 257 #endif |
| 263 | 258 |
| 264 #endif // VisibleSelection_h | 259 #endif // VisibleSelection_h |
| OLD | NEW |