| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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| and |
| 63 // |selectionFromContentsOfNode|. | 63 // |selectionFromContentsOfNode|. |
| 64 static VisibleSelectionTemplate create(const SelectionTemplate<Strategy>&); | 64 static VisibleSelectionTemplate create(const SelectionTemplate<Strategy>&); |
| 65 | 65 |
| 66 // TODO(editing-dev): We should get rid of this function and instead, use |
| 67 // EphemeralRangeTemplate::rangeOfContents and SelectionTemplate::Builder. |
| 66 static VisibleSelectionTemplate selectionFromContentsOfNode(Node*); | 68 static VisibleSelectionTemplate selectionFromContentsOfNode(Node*); |
| 67 | 69 |
| 68 SelectionType getSelectionType() const { return m_selectionType; } | 70 SelectionType getSelectionType() const { return m_selectionType; } |
| 69 | 71 |
| 70 void setAffinity(TextAffinity affinity) { m_affinity = affinity; } | 72 void setAffinity(TextAffinity affinity) { m_affinity = affinity; } |
| 71 TextAffinity affinity() const { return m_affinity; } | 73 TextAffinity affinity() const { return m_affinity; } |
| 72 | 74 |
| 73 // TODO(yosin): To make |VisibleSelection| as immutable object, we should | 75 // TODO(yosin): To make |VisibleSelection| as immutable object, we should |
| 74 // get rid of |setBase()| and |setExtent()| by replacing them with | 76 // get rid of |setBase()| and |setExtent()| by replacing them with |
| 75 // |createVisibleSelection()|. | 77 // |createVisibleSelection()|. |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 273 |
| 272 #ifndef NDEBUG | 274 #ifndef NDEBUG |
| 273 // Outside the WebCore namespace for ease of invocation from gdb. | 275 // Outside the WebCore namespace for ease of invocation from gdb. |
| 274 void showTree(const blink::VisibleSelection&); | 276 void showTree(const blink::VisibleSelection&); |
| 275 void showTree(const blink::VisibleSelection*); | 277 void showTree(const blink::VisibleSelection*); |
| 276 void showTree(const blink::VisibleSelectionInFlatTree&); | 278 void showTree(const blink::VisibleSelectionInFlatTree&); |
| 277 void showTree(const blink::VisibleSelectionInFlatTree*); | 279 void showTree(const blink::VisibleSelectionInFlatTree*); |
| 278 #endif | 280 #endif |
| 279 | 281 |
| 280 #endif // VisibleSelection_h | 282 #endif // VisibleSelection_h |
| OLD | NEW |